diff options
Diffstat (limited to 'client/profilers/vmstat/vmstat.py')
-rwxr-xr-x | client/profilers/vmstat/vmstat.py | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/client/profilers/vmstat/vmstat.py b/client/profilers/vmstat/vmstat.py index 632cc34b..b381649a 100755 --- a/client/profilers/vmstat/vmstat.py +++ b/client/profilers/vmstat/vmstat.py @@ -3,24 +3,23 @@ import profiler,time,os,subprocess class vmstat(profiler.profiler): - version = 1 + version = 1 - def initialize(self, interval = 1): - self.interval = interval + def initialize(self, interval = 1): + self.interval = interval - def start(self, test): - cmd = "/usr/bin/vmstat %d" % self.interval - logfile = open(os.path.join(test.profdir, "vmstat"), 'w') - p = subprocess.Popen(cmd, shell=True, stdout=logfile, \ - stderr=subprocess.STDOUT) - self.pid = p.pid + def start(self, test): + cmd = "/usr/bin/vmstat %d" % self.interval + logfile = open(os.path.join(test.profdir, "vmstat"), 'w') + p = subprocess.Popen(cmd, shell=True, stdout=logfile, \ + stderr=subprocess.STDOUT) + self.pid = p.pid - def stop(self, test): - os.kill(self.pid, 15) + def stop(self, test): + os.kill(self.pid, 15) - def report(self, test): - return None - + def report(self, test): + return None |