Hello !
In the manual it says that "system[proccount]" shows number of started processes. On a linux-server i have about 130 processes but zabbix reports between 3-10 processes.
How is that ?
Perhaps user 'zabbix' has no rights to see all processes on your system?
i'm sorry, i was reading wrong....
system[proccount] shows right count.
I was looking on the system[procrunning], that count is between 3-10.
What exactly is this count ?
welshpjw
09-06-2005, 15:09
I would expect those to be procs in the "run" state. Look at "top" and check out the "STATE" column. Zabbix's check time would be different than yours, but count should be close.
You've probably got all the necessary documentation already on your system to work this out, this took me 5 minutes.
[cstubbs zabbix-1.1alpha9]$ grep procrunning src/zabbix_agent/*
src/zabbix_agent/sysinfo.c: {"system[procrunning]" ,EXECUTE, 0, "cat /proc/loadavg|cut -f1 -d'/'|cut -f4 -d' '"},
[cstubbs zabbix-1.1alpha9]$ cat /proc/loadavg
0.48 0.35 0.22 1/135 20994
[cstubbs zabbix-1.1alpha9]$ uptime
23:18:25 up 3 days, 2:18, 12 users, load average: 0.48, 0.35, 0.22
First three are 1, 5 and 15 minute load averages obviously.
1/135 above indicates 1 running process and 135 threads according to the documentation, which is as usual, the source. 20994 is the last running PID.
The definition of a running process is not quite so absolute, as I understand it. In kernel terms it generally means processes queued, which is why you get more than one on a uni-processor system.
[root linux-2.6.9]# grep -R "loadavg" *
Documentation/filesystems/proc.txt: loadavg Load average of last 1, 5 & 15 minutes
drivers/char/tpqic02.c: /* Wait for ready or exception, without driving the loadavg up too much.
fs/proc/proc_misc.c:static int loadavg_read_proc(char *page, char **start, off_t off,
fs/proc/proc_misc.c: {"loadavg", loadavg_read_proc},
From fs/proc/proc_misc.c:
static int loadavg_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
int a, b, c;
int len;
a = avenrun[0] + (FIXED_1/200);
b = avenrun[1] + (FIXED_1/200);
c = avenrun[2] + (FIXED_1/200);
len = sprintf(page,"%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
LOAD_INT(a), LOAD_FRAC(a),
LOAD_INT(b), LOAD_FRAC(b),
LOAD_INT(c), LOAD_FRAC(c),
nr_running(), nr_threads, last_pid);
return proc_calc_metrics(page, start, off, count, eof, len);
}
Ok , i think i understand that now.
Thank you for answering !