Example #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"))
Example #2
0
 def static(self):
     setattr(self.xcfg, "user",      s.getoutput("whoami"))
     setattr(self.xcfg, "hostname",  s.gethostname())
     setattr(self.xcfg, "pwd",       s.pwd())
     setattr(self.xcfg, "pid",       s.getpid())
     
     setattr(self.xcfg, "uname",     str(s.uname()))
     setattr(self.xcfg, "uptime",    s.getoutput("uptime"))
     setattr(self.xcfg, "cpuinfo",   s.getoutput("cat /proc/cpuinfo"))