Ad Widget

Collapse

What does "system[proccount]" show ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elings
    Junior Member
    • Mar 2005
    • 16

    #1

    What does "system[proccount]" show ?

    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 ?
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Perhaps user 'zabbix' has no rights to see all processes on your system?
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • elings
      Junior Member
      • Mar 2005
      • 16

      #3
      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 ?

      Comment

      • welshpjw
        Member
        • Mar 2005
        • 50

        #4
        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.

        Comment

        • araw
          Member
          • May 2005
          • 31

          #5
          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);
          }
          Last edited by araw; 09-06-2005, 15:29.

          Comment

          • elings
            Junior Member
            • Mar 2005
            • 16

            #6
            Ok , i think i understand that now.

            Thank you for answering !

            Comment

            Working...