11 lines
280 B
Python
11 lines
280 B
Python
import os
|
|
class Processes:
|
|
interval = 10;
|
|
loopCount = 0
|
|
def __init__(self, exporter):
|
|
self.exporter = exporter
|
|
|
|
def run(self):
|
|
stream = os.popen('ps fax | wc -l')
|
|
output = stream.read()
|
|
self.exporter.gauge("processes", int(output))
|