Пример #1
0
    def entry(self):
        setattr(self.xcfg, "env",           s.environ)

        setattr(self.xcfg, "start_time",    str(s.time()))
        setattr(self.xcfg, "start_htime",   s.asctime(s.gmtime()))
        setattr(self.xcfg, "start_load",    str(s.getloadavg()))
        setattr(self.xcfg, "initial_dir",   s.getoutput("ls -Fla"))
        setattr(self.xcfg, "top",           s.getoutput("top -b -n 1"))
        setattr(self.xcfg, "disk",          s.getoutput("df -k"))
Пример #2
0
 def exit(self):
     setattr(self.xcfg, "stop_time",     str(s.time()))
     setattr(self.xcfg, "stop_htime",    s.asctime(s.gmtime()))
     setattr(self.xcfg, "stop_load",     str(s.getloadavg()))
     setattr(self.xcfg, "proc_time",     str(s.times()))