Ad Widget

Collapse

linux os process monitoring via snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nbritton
    Junior Member
    • Jul 2018
    • 3

    #1

    linux os process monitoring via snmp

    We have a set of appliances where i am unable to install an agent and need to monitor process cpu and memory that can be found in a mib table but referenced as the current running pid. I am trying to see how i can monitor for a process by its name. I know that by following this set of commands i am able to pull that information. But i can not see how i would do that in a template.

    I am attempting to lookup the PID or could be pids for a process name to return the name and pid with the values of cpu and memory consumed by that resource.


    C:\Program Files\netsnmp\bin>snmpwalk -v 1 -c "public" acw00040 1.3.6.1.2.1.25.4.2.1.2|findstr spoold
    HOST-RESOURCES-MIB::hrSWRunName.51126 = STRING: "spoold"

    C:\Program Files\netsnmp\bin>snmpwalk -v 1 -c "public" acw00040 1.3.6.1.2.1.25.4.2.1|findstr 51126
    HOST-RESOURCES-MIB::hrSWRunIndex.51126 = INTEGER: 51126
    HOST-RESOURCES-MIB::hrSWRunName.51126 = STRING: "spoold"
    HOST-RESOURCES-MIB::hrSWRunID.51126 = OID: SNMPv2-SMI::zeroDotZero
    HOST-RESOURCES-MIB::hrSWRunPath.51126 = STRING: "/usr/openv/pdde/pdcr/bin/spoold"
    HOST-RESOURCES-MIB::hrSWRunParameters.51126 = ""
    HOST-RESOURCES-MIB::hrSWRunType.51126 = INTEGER: application(4)
    HOST-RESOURCES-MIB::hrSWRunStatus.51126 = INTEGER: runnable(2)

    C:\Program Files\netsnmp\bin>snmpwalk -v 1 -c "public" acw00040 1.3.6.1.2.1.25.5.1.1|findstr 51126
    HOST-RESOURCES-MIB::hrSWRunPerfCPU.51126 = INTEGER: 14069188
    HOST-RESOURCES-MIB::hrSWRunPerfMem.51126 = INTEGER: 252857944 KBytes

    Thoughts?

  • LenR
    Senior Member
    • Sep 2009
    • 1005

    #2
    I think all you can do is create external scripts passed the process name and follow the steps above to return the values you want. Note that external scripts are expensive, so if you have to do a lot of them, it's not a good idea.

    Something like this for item keys:

    ext.hrSWRunPerfCPU(spoold)
    ext.hrSWRunPerfMem(spoold)

    Comment

    Working...