Ad Widget

Collapse

Getting On/Off (1/0) from proc.num?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlindquist
    Junior Member
    • Jun 2007
    • 14

    #1

    Getting On/Off (1/0) from proc.num?

    The linux template has some great items that tell me how many apache, metalog, etc, etc processes are running, but I need to get 'service state' type of data from it for graphing.

    The reason is, I'm putting together a great graph that makes use of the fact that the on/off flags are 1/0 to create a stacked graph that shows history of service states.

    Is there a way that I can somehow 'transform' the 'number of processes' data into a '1 or 0' number? Or is there some other easy way to get service states for 'random' processes?

    Basically, I need to be able to do "Math.sign(proc.num[apache2])".

    Any ideas?
Working...