Ad Widget

Collapse

proc.num always shows 1 running procs when its zero

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • worksyn
    Junior Member
    • Jun 2015
    • 18

    #1

    proc.num always shows 1 running procs when its zero

    Hi,

    I am using proc.num[,,run] as monitoring item (Zabbix agent type) on my linux server (CentOS 6.x), however even if no running processes on the server - it always shows - 1.

    the same result if i use zabbix_get:

    [root@zabbix ~]# zabbix_get -s 10.39.81.57 -p 10050 -k proc.num[,,run]
    1

    at the same time on the monitoring server:

    [root@rets ~]# vmstat 1
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
    r b swpd free buff cache si so bi bo in cs us sy id wa st
    0 0 0 5642460 0 2656752 0 0 2 1 0 15 1 0 99 0 0
    0 0 0 5642460 0 2656744 0 0 0 12 0 184 0 0 100 0 0
    0 0 0 5642460 0 2656744 0 0 0 0 0 170 0 0 100 0 0
    0 0 0 5642460 0 2656744 0 0 0 0 0 317 0 0 100 0 0

    I guess, zabbix agent for finding number of running procs looks into /proc/loadavg file:

    # cat /proc/loadavg
    0.00 0.00 0.00 1/2277 20091

    it always shows 1 - active task in 4th column.

    it shows correct result if I use user name:

    [root@zabbix ~]# zabbix_get -s 10.39.81.57 -p 10050 -k proc.num[,root,run]
    0

    but for all users it shows - 1.

    is it bug?


    ps. my zabbix server and agent version: 2.4

    zabbix-server-2.4.5-1.el6.x86_64
    zabbix-agent-2.4.5-1.el6.x86_64
  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    Maybe the agent making the check is counted as a running process.

    Comment

    • worksyn
      Junior Member
      • Jun 2015
      • 18

      #3
      Originally posted by LenR
      Maybe the agent making the check is counted as a running process.
      anyway it's not accurate, and should be fixed

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        I think correct that a process in running is zabbix agent.

        zabbix_agentd is run by zabbix user.
        Please check proc.num[,zabbix,run] value.

        Therefore, I think that it is functioning normally.

        Comment

        • worksyn
          Junior Member
          • Jun 2015
          • 18

          #5
          Originally posted by Atsushi
          I think correct that a process in running is zabbix agent.

          zabbix_agentd is run by zabbix user.
          Please check proc.num[,zabbix,run] value.

          Therefore, I think that it is functioning normally.
          well, u are right:

          [root@zabbix ~]# zabbix_get -s 10.39.81.57 -p 10050 -k proc.num[,zabbix,run]
          1

          but that process runs for very short period of time, i suppose its 0.05 second or similar. But on the graph I see that system always have 1 process in running state - which obviously not correct.

          Comment

          • worksyn
            Junior Member
            • Jun 2015
            • 18

            #6
            # ps -eo pid,user,stime,cputime,stat,comm | sed -n '1p;/zabbix/p'
            PID USER STIME TIME STAT COMMAND
            1201 zabbix Jun03 00:00:00 S zabbix_agentd
            1204 zabbix Jun03 00:00:16 S zabbix_agentd
            1205 zabbix Jun03 00:00:08 S zabbix_agentd
            1206 zabbix Jun03 00:00:08 S zabbix_agentd
            1207 zabbix Jun03 00:00:08 S zabbix_agentd
            1208 zabbix Jun03 00:00:02 S zabbix_agentd

            for the last day zabbix processes have been running for 42 seconds, it is 42/(3600*24) = 0.0004 processes per day. I suppose such kind of check should exclude zabbix agent process

            Comment

            • Atsushi
              Senior Member
              • Aug 2013
              • 2028

              #7
              It will always be run state at the moment of getting value.
              I think the value is not in the less than 1.

              It can not be confirmed at the ps command
              because it is the change in instantaneous state.

              Comment

              • worksyn
                Junior Member
                • Jun 2015
                • 18

                #8
                Originally posted by Atsushi
                It can not be confirmed at the ps command
                because it is the change in instantaneous state.
                I understand that, but i am talking about Graph, that shows that my server always have 1 running process, which is not true:
                Attached Files

                Comment

                • worksyn
                  Junior Member
                  • Jun 2015
                  • 18

                  #9
                  guys, I want that you pay attention to this, because your competitor ganglia doesn't have such issue. In Running processes graph it doesn't calculate gmond process(ganglia agent)

                  Comment

                  Working...