Ad Widget

Collapse

Program start counter

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gergelyk3
    Member
    • Oct 2010
    • 32

    #1

    Program start counter

    Hi

    I could make a statistic. It will be contain how many times started the program in one month.

    I monitor the .exe with procnum[program.exe], but How able to make the monthly statistic from this item.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Are you wanting to do this under Linux/Unix or windows?

    Two ways you could do this, one is to create a wrapper which incremets a counter every time it executes a file. You can have the script loop if the process quits. Otherwise you could write a script which periodically polls your process list looking for how long a program has been running(elapsed time). If the elapsed time goes backwards between executions of the script then it increments the counter for that process. The downside with option two is if the script restarts multiple times between runs of the check script you won't know.
    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

    • gergelyk3
      Member
      • Oct 2010
      • 32

      #3
      I could make it under Windows

      Comment

      Working...