Resolves issue 147.
This commit is contained in:
parent
d73dd65500
commit
9d80284504
2 changed files with 28 additions and 29 deletions
|
|
@ -155,8 +155,8 @@ class CmdSetHandler(object):
|
||||||
|
|
||||||
# the subset of the cmdset_paths that are to be stored in the database
|
# the subset of the cmdset_paths that are to be stored in the database
|
||||||
self.permanent_paths = [""]
|
self.permanent_paths = [""]
|
||||||
|
|
||||||
# self.update(init_mode=True) is then called from the object __init__.
|
#self.update(init_mode=True) is then called from the object __init__.
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
"Display current commands"
|
"Display current commands"
|
||||||
|
|
@ -196,18 +196,17 @@ class CmdSetHandler(object):
|
||||||
created; it imports all permanent cmdsets from db.
|
created; it imports all permanent cmdsets from db.
|
||||||
"""
|
"""
|
||||||
if init_mode:
|
if init_mode:
|
||||||
self.cmdset_stack = []
|
|
||||||
# reimport all permanent cmdsets
|
# reimport all permanent cmdsets
|
||||||
self.permanent_paths = self.obj.cmdset_storage
|
self.permanent_paths = self.obj.cmdset_storage
|
||||||
new_permanent_paths = []
|
if self.permanent_paths:
|
||||||
|
self.cmdset_stack = []
|
||||||
for pos, path in enumerate(self.permanent_paths):
|
for pos, path in enumerate(self.permanent_paths):
|
||||||
if pos == 0 and not path:
|
if pos == 0 and not path:
|
||||||
self.cmdset_stack = [CmdSet(cmdsetobj=self.obj, key="Empty")]
|
self.cmdset_stack = [CmdSet(cmdsetobj=self.obj, key="Empty")]
|
||||||
else:
|
else:
|
||||||
cmdset = self.import_cmdset(path)
|
cmdset = self.import_cmdset(path)
|
||||||
if cmdset:
|
if cmdset:
|
||||||
self.cmdset_stack.append(cmdset)
|
self.cmdset_stack.append(cmdset)
|
||||||
|
|
||||||
# merge the stack into a new merged cmdset
|
# merge the stack into a new merged cmdset
|
||||||
new_current = None
|
new_current = None
|
||||||
|
|
|
||||||
|
|
@ -562,29 +562,29 @@ class CmdServerLoad(MuxCommand):
|
||||||
["%g%%" % (100 * loadavg[0]),
|
["%g%%" % (100 * loadavg[0]),
|
||||||
"%10d" % os.getpid(),
|
"%10d" % os.getpid(),
|
||||||
"%10d " % psize,
|
"%10d " % psize,
|
||||||
"%10d" % rusage[0],
|
"%10d" % rusage.ru_utime,
|
||||||
"%10d shared" % rusage[3],
|
"%10d shared" % rusage.ru_ixrss,
|
||||||
"%10d pages" % rusage[2],
|
"%10d pages" % rusage.ru_maxrss,
|
||||||
"%10d hard" % rusage[7],
|
"%10d hard" % rusage.ru_majflt,
|
||||||
"%10d reads" % rusage[9],
|
"%10d reads" % rusage.ru_inblock,
|
||||||
"%10d in" % rusage[12],
|
"%10d in" % rusage.ru_msgrcv,
|
||||||
"%10d vol" % rusage[14]
|
"%10d vol" % rusage.ru_nvcsw
|
||||||
],
|
],
|
||||||
["", "", "",
|
["", "", "",
|
||||||
"(user: %g)" % rusage[1],
|
"(user: %g)" % rusage.ru_stime,
|
||||||
"%10d private" % rusage[4],
|
"%10d private" % rusage.ru_idrss,
|
||||||
"%10d bytes" % (rusage[2] * psize),
|
"%10d bytes" % (rusage.ru_maxrss * psize),
|
||||||
"%10d soft" % rusage[6],
|
"%10d soft" % rusage.ru_minflt,
|
||||||
"%10d writes" % rusage[10],
|
"%10d writes" % rusage.ru_oublock,
|
||||||
"%10d out" % rusage[11],
|
"%10d out" % rusage.ru_msgsnd,
|
||||||
"%10d forced" % rusage[15]
|
"%10d forced" % rusage.ru_nivcsw
|
||||||
],
|
],
|
||||||
["", "", "", "",
|
["", "", "", "",
|
||||||
"%10d stack" % rusage[5],
|
"%10d stack" % rusage.ru_isrss,
|
||||||
"",
|
"",
|
||||||
"%10d swapouts" % rusage[8],
|
"%10d swapouts" % rusage.ru_nswap,
|
||||||
"", "",
|
"", "",
|
||||||
"%10d sigs" % rusage[13]
|
"%10d sigs" % rusage.ru_nsignals
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
stable = []
|
stable = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue