How is it possible to monitor attributes like cpu usage, memory usage for a certain process?
Ad Widget
Collapse
Monitoring Process Attributes - How?
Collapse
X
-
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 -
Yes, I am!Originally posted by tuhl@Alexei: Are you planning to integrate a deeper monitoring capability for processes?Comment
Comment