Monitors Processes in Linux Machine and logs in syslog incase of threshold limitations. Threshold limits will be read from /etc/security/limits.conf file. You can learn about limits.conf file by just opening that file
For Now this utility supports cpu, rss memory and nproc
- Install procps and uthash libraries
Ubuntu :
apt-get install libproc-dev
apt-get install uthash-dev
- Pull the source code.
- Compile the code using command gcc -o monitor codelearnmonitor.c -lproc
monitor Group_or_User_name
Syslog will be updated, whenever a process exceeds the limits given in arguments.
Log Format: memory_limit, cur_usage, username, command, pid
Use statwatch.c to see cpu% and memory usage of all the processes running in the machine. this is just like top command.
use insall.sh to install the utility in your Linux Machine
sudo sh install.sh
After installation you can use "monitor" utility to start monitoring the processes.