Solved Zabbix processes question

Hi all,

I have Zabbix up and running and I get a lot of these emails:
Code:
Trigger: Too many processes on Cluster-02
Trigger status: OK
Trigger severity: Warning
Trigger URL:

Item values:

1. Number of processes (Cluster-02:proc.num[]): 293
2. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*
3. *UNKNOWN* (*UNKNOWN*:*UNKNOWN*): *UNKNOWN*

Can anyone please tell me if the value 293 is the number of running processes or the process ID?

Thank you
 
That's the number of processes. You will need to adjust the trigger level if it's normal this machine has a lot of processes running.

Not sure if this is still the default:
Code:
{Template OS FreeBSD:proc.num[].avg(5m)}>300
As you can see this is triggered when the average number of processes over the last 5 minutes exceeds 300.
 
Is there a way to see the list of the processes?
Not in Zabbix, no. You will have to login on the machine and look for yourself. You can see a graph over time of the recorded number of processes.
 
root@FreeBSD-node1:~ # ps -ef | awk '{print $8}' | sort -n | uniq -c | sort -n | tail -5
Code:
   1
   1 MAIL=/var/mail/sysadmin
   1 NO_CBSD_HISTORY=yes
   1 ttyv0
   1 ttyv1
   1 ttyv2
   1 ttyv3
   1 ttyv4
   1 ttyv5
   1 ttyv6
   1 ttyv7
   7 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
Can you please tell me if the values are the amount of running processes or the process ID.
I know this question is basic, but I am trying to wrap my head around it
 
As you can see this is triggered when the average number of processes over the last 5 minutes exceeds 300.
What approach do I need to do in order to see if something like 300 processes in 5 minutes is normal or not?
 
It's one of your servers, so I hope you have some idea of what's running on it.
 
root@FreeBSD-node1:~ # ps -ef | awk '{print $8}' | sort -n | uniq -c | sort -n | tail -5
Code:
   1
   1 MAIL=/var/mail/sysadmin
   1 NO_CBSD_HISTORY=yes
   1 ttyv0
   1 ttyv1
   1 ttyv2
   1 ttyv3
   1 ttyv4
   1 ttyv5
   1 ttyv6
   1 ttyv7
   7 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
Can you please tell me if the values are the amount of running processes or the process ID.
I know this question is basic, but I am trying to wrap my head around it
I'm not exactly sure what you're trying to accomplish with this command. It seems you're coming from a Linux background in that "ps -ef" is not going to list all the processes on the machine under BSD as you're expecting. If you want something that looks like Linux, use this:

$ ps ax -o user=UID -o pid=PID -o ppid=PPID -o cpu=C -o start=STIME -o tty=TTY -o time=TIME -o command=CMD

Anyway, it looks like you're trying to count the number of processes that have the same name. Not necessarily their command lines. If that's the case, I think the information you're trying to get is more appropriately gathered this way on a FreeBSD system:
Code:
$ procstat -ac | awk '{print $2}' | sort | uniq -cd | sort -n
   2 crypto
   2 sendmail
   2 sort
   2 tmux
   3 dhclient
   4 smbd
   5 sshd
   7 postgres
   7 sh
   8 getty
  11 httpd
$
You may use "tail" at the end to limit the output as you like.
 
Back
Top