A lightweight system monitoring tool written in C for Linux distributions. Monitor your CPU, GPU, battery, and disk in real-time.
https://github.com/Dacraezy1/linux-sysmon
#Linux System Monitor
1 messages · Page 1 of 1 (latest)
whats unique about this project?
we already have btop and htop
whats the selling point?
procps-ng top.c is 7600 lines his is like 300
also i took a look at the repo and here are some suggestions:
- normally speaking you wouldn't commit the compiled binary
- instead of asking user to compile with gcc and installing manually, you should utilize the Makefile so user can simply
makethenmake install - instead of hardcoding paths and commands, put them in a config file. If you are going for suckless style, use a
config.def.h - this is more of an opinionated recommendation but: if you are going for a suckless style which you seem to be, its better to avoid reinventing wheels. which here i would suggest removing the continuous mode, and instruct user to use
watchto achieve such functionality. though the project is already small enough so it doesn't matter much here. - if you don't plan on expanding the project to include other functionalities, seem like everything you are doing here are better off as a shell script
- lastly, in the makefile, you did
-O2which is fine but suckless projects usually optimize for size over speed so-Osmay be a better fit. though again considering the scale it doesnt matter that much
can htop only gives usage of ram and cpu
while this one gievs usage and cpu and gpu temp too same for the battery and the ahrd disk
Btop has all of them too
does btop show temp?
for cpu and gpu and battery
Features
CPU: Usage percentage and temperature
GPU: Support for NVIDIA, AMD, and Intel GPUs (usage and temperature)
Battery: Level, health, temperature, and charging status
Disk: Read/write statistics and temperature (with smartmontools)
here is mine
also i updated it and made it in a suckless style
i think it works perfect now
i hope so
I think btop does this already
And yes it shows temp for cpu and gpu but i dont know if it shows temp the battery tho
Yes, btop shows CPU and GPU temperatures and usage, but it doesn’t show battery temperature.
My program reads everything directly from the kernel (/sys/class/...), including battery temp if available, is extremely lightweight, and doesn’t require a lot of extra dependencies , just standard C and the kernel interfaces.