Ad Widget

Collapse

proc.num on FreeBSD 7 (Zabbix 1.5.3 b)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lufa
    Member
    • Jul 2007
    • 46

    #1

    proc.num on FreeBSD 7 (Zabbix 1.5.3 b)

    Hi!
    I have just upgraded Zabbix server and agent to 1.5.3b on my FreeBSD 7.0 and founded that many items are not working with the "Not supported by ZABBIX agent" error.

    For example proc.num item. But, from console it works just fine:
    Code:
    # /usr/local/sbin/zabbix_agentd -t "proc.num"
    proc.num[]                                    [u|237]
    # /usr/local/sbin/zabbix_agentd -t "proc.num[httpd]"
    proc.num[httpd]                               [u|12]
    Why it is not working for Zabbix? Is it normal for current beta?
    Thank you.

    P.S.
    Fresh install did not help.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    This should work in 1.5.x!
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • Lufa
      Member
      • Jul 2007
      • 46

      #3
      Originally posted by Alexei
      This should work in 1.5.x!
      But not 1.5.3 beta?

      Comment

      • NOB
        Senior Member
        Zabbix Certified Specialist
        • Mar 2007
        • 469

        #4
        Originally posted by Lufa
        Hi!
        I have just upgraded Zabbix server and agent to 1.5.3b on my FreeBSD 7.0 and founded that many items are not working with the "Not supported by ZABBIX agent" error.

        For example proc.num item. But, from console it works just fine:
        Code:
        # /usr/local/sbin/zabbix_agentd -t "proc.num"
        proc.num[]                                    [u|237]
        # /usr/local/sbin/zabbix_agentd -t "proc.num[httpd]"
        proc.num[httpd]                               [u|12]
        Why it is not working for Zabbix? Is it normal for current beta?
        Thank you.

        P.S.
        Fresh install did not help.
        The FreeBSD agent is still based on the layout of the /proc filesystem
        in use by FreeBSD 4.x/5.x

        I modified the agent to either use the FreeBSD 6.x /proc layout
        (completely different to the older one) or the libkvm interface.
        Either has disadvantages (/proc doesn't show everything to
        a usual zabbix user, libkvm needs read access to /dev/kmem), so I'm not sure which one is better, yet.

        It might have changed in the latest SVN versions.
        I didn't have time to check them for modifications.

        Regards

        Norbert.

        P.S. I'll do the check tonight on my home machine againt R5900 (checked out yesterday).
        Last edited by NOB; 13-08-2008, 09:42. Reason: Fixed a typo / Added promise to check it

        Comment

        • NOB
          Senior Member
          Zabbix Certified Specialist
          • Mar 2007
          • 469

          #5
          Check on FreeBSD6.1

          Hi

          I checked the source code yesterday.
          Indeed it was changed to use "sysctl" now.
          And in the comments it states "Checked on 7.0".

          However, on my FreeBSD 6.1 laptop it doesn't work that well.
          It shows the number of some processes just fine, e.g.
          sshd, ntpd, zabbix_agentd, etc.
          But my own processes, e.g. nautilus, audacity, etc. always show up with
          a count of 4 although just one is running.
          All tests were done with a command like
          Code:
          zabbix_get -s 127.0.0.1 -k 'proc.num[nautilus]'
          It could be a problem on 6.1, I'll check it on 7.0 tonight.

          I don't have a ZABBIX-Server running, so I can't check the
          ZABBIX agent active mode.

          Regards

          Norbert.

          Comment

          • Lufa
            Member
            • Jul 2007
            • 46

            #6
            Originally posted by Lufa
            Hi!
            I have just upgraded Zabbix server and agent to 1.5.3b on my FreeBSD 7.0 and founded that many items are not working with the "Not supported by ZABBIX agent" error.

            For example proc.num item. But, from console it works just fine:
            Seems to be worked on my FreeBSD 7 and new Zabbix 1.5.4!

            Comment

            • Lufa
              Member
              • Jul 2007
              • 46

              #7
              Originally posted by Lufa
              Seems to be worked on my FreeBSD 7 and new Zabbix 1.5.4!
              But not on FreeBSD 6.2, despite working welll from console...

              Comment

              • Lufa
                Member
                • Jul 2007
                • 46

                #8
                Solved

                OK. All I needed to do is unlunk the host from my FreeBSD templated, save it and link it back again!

                May be I am upgrading Zabbix from nightly builds too often?

                Thanks!!!

                Comment

                • slash5k1
                  Junior Member
                  • Sep 2008
                  • 11

                  #9
                  Just thought i would chime in here...
                  Looking at my output for proc.num[] the number reported is alot higher then the actual process listed from ps and top.

                  Looking at /src/libs/zbxsysinfo/freebsd/proc.c i can see that KERN_PROC_ALL is being used to display the results which will return all processes and kernel visible threads.

                  As im not interested in proc+threads, i changed the two entries to KERN_PROC_PROC which will return all processes, without threads.

                  thought this may help someone else...

                  Comment

                  • Alexei
                    Founder, CEO
                    Zabbix Certified Trainer
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Sep 2004
                    • 5654

                    #10
                    Thanks for your patch!
                    Alexei Vladishev
                    Creator of Zabbix, Product manager
                    New York | Tokyo | Riga
                    My Twitter

                    Comment

                    • Sasha
                      Zabbix developer
                      • Sep 2007
                      • 60

                      #11
                      Thanks!
                      Problems with threads is fixed in rev. 6109.
                      ZABBIX Developer
                      Riga, Latvia

                      Comment

                      Working...