Ad Widget

Collapse

How to get CPU % for a process

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ulrike.gerhards
    Junior Member
    • Sep 2007
    • 12

    #1

    How to get CPU % for a process

    Hello,

    I need to monitor the CPU% used by a single process. Can anybody help me with that?
    Is there a key similar to proc.mem to get the used CPU% for a process under Linux systems?

    Thanks in advance
  • sushilk
    Junior Member
    • Feb 2007
    • 26

    #2
    Try this

    I don't know whether there another way around in zabbix o implement this... This is the way which i have tried...

    Net-snmp lets you to add custom scripts resuls for monitoring by using 'exe' option.. for this what you may need to do write a script for monitoring the cpu usage(top and grep will do)... and add the same in cron. call the script using exe option in snmpd.conf file.. This allocates an OID for the script and give you the results.

    cheers,
    Sushi

    Comment

    • nelsonab
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2006
      • 1233

      #3
      There was some code I came across the other day which would allow you to drill down for one process in Linux. I'll see if I can find it again and then I'll post it here, maybe someone else more familiar with the Agent code could add it. Or perhaps it could be used as an external process.
      RHCE, author of zbxapi
      Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
      Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

      Comment

      Working...