def __str__(self): res = "PID: {0} ({1})\n".format(self.pid(), self.name()) if (self == curproc()): res = "\033[1m{0}\033[22m".format(res) if (self.state() == "EXITED"): res += "{0} ({1})\n".format(self.state(), self.status()) else: res += "{0}\n".format(self.state()) if (self.parent() != None): res += "Parent:\n" res += "{0}\n".format(self.parent().str_short()) if (len(list(self.children())) > 0): res += "Children:\n" for child in self.children(): res += "{0}\n".format(child.str_short()) return res
def __str__(self): res = "name: {0}\n".format(self.name()) res += "slabcount: {0}\n".format(len(list(self.slabs()))) res += "objsize: {0}\n".format(self.size()) res += "objcount: {0}".format(len(list(self.objs()))) return res