2 Sets up a subprocess to run mpstat on a specified interval, default 1 second
4 import time
, os
, subprocess
5 from autotest_lib
.client
.bin
import profiler
8 class mpstat(profiler
.profiler
):
12 def initialize(self
, interval
= 1):
13 self
.interval
= interval
16 def start(self
, test
):
17 cmd
= "mpstat -P ALL %d" % self
.interval
18 logfile
= open(os
.path
.join(test
.profdir
, "mpstat"), 'w')
19 p
= subprocess
.Popen(cmd
, shell
=True, stdout
=logfile
,
20 stderr
=subprocess
.STDOUT
)
28 def report(self
, test
):