PDA

View Full Version : Monitoring Process Attributes - How?


tuhl
16-05-2005, 16:13
How is it possible to monitor attributes like cpu usage, memory usage for a certain process?

cadbury
17-05-2005, 10:13
if you want to monitor a linux process, you can use the ps command
for example, i monitor cpu usage for the zabbix agent like that :

i have a userparameter in my /etc/zabbix/zabbix_agentd.conf :

UserParameter=agentdload,ps -o "%C" -C zabbix_agentd | awk '{total += $1} END {print total}'

the ps command show only the cpu usage (-o "%C") for the processes named zabbix_agentd. As several lines are returned (one for each process), i use awk to make the total usage

other options are availiable for memory usage, see the ps manual

tuhl
17-05-2005, 10:26
I think there should be an "internal" mechanism to monitor these values.

@Alexei: Are you planning to integrate a deeper monitoring capability for
processes?

Yours
Tom

Alexei
17-05-2005, 10:38
@Alexei: Are you planning to integrate a deeper monitoring capability for processes? Yes, I am!