perf-monitor: print load avg
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
import sys, time
|
import sys, time
|
||||||
|
|
||||||
from gnuradio import gr, ctrlport
|
from gnuradio import gr, ctrlport
|
||||||
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
class MyApp(object):
|
class MyApp(object):
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
@@ -63,7 +64,7 @@ class MyApp(object):
|
|||||||
client.setKnobs(knobs)
|
client.setKnobs(knobs)
|
||||||
|
|
||||||
# let the flow graph run for some time
|
# let the flow graph run for some time
|
||||||
time.sleep(30)
|
time.sleep(60)
|
||||||
|
|
||||||
## get work time for all blocks
|
## get work time for all blocks
|
||||||
kl = map(lambda x: "%s::total work time" % x, blocks)
|
kl = map(lambda x: "%s::total work time" % x, blocks)
|
||||||
@@ -75,4 +76,7 @@ class MyApp(object):
|
|||||||
|
|
||||||
print(",".join(map(lambda x: str(x[1]), sorted(work_times.items()))))
|
print(",".join(map(lambda x: str(x[1]), sorted(work_times.items()))))
|
||||||
|
|
||||||
|
p = Popen("uptime", stdout=PIPE, close_fds=True, shell=True)
|
||||||
|
print(p.stdout.read())
|
||||||
|
|
||||||
MyApp(sys.argv)
|
MyApp(sys.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user