fixed some formatting on windows @server command
This commit is contained in:
parent
9e8c307bc4
commit
5191ace2a1
1 changed files with 3 additions and 3 deletions
|
|
@ -680,7 +680,7 @@ class CmdServerLoad(MuxCommand):
|
||||||
if has_psutil:
|
if has_psutil:
|
||||||
loadavg = psutil.cpu_percent()
|
loadavg = psutil.cpu_percent()
|
||||||
_mem = psutil.virtual_memory()
|
_mem = psutil.virtual_memory()
|
||||||
rmem = _mem.used
|
rmem = _mem.used / (1000 * 1000)
|
||||||
vmem = "N/A on Windows"
|
vmem = "N/A on Windows"
|
||||||
pmem = _mem.percent
|
pmem = _mem.percent
|
||||||
rusage = "N/A on Windows"
|
rusage = "N/A on Windows"
|
||||||
|
|
@ -691,9 +691,9 @@ class CmdServerLoad(MuxCommand):
|
||||||
return
|
return
|
||||||
# Display table
|
# Display table
|
||||||
loadtable = EvTable("property", "statistic", align="l")
|
loadtable = EvTable("property", "statistic", align="l")
|
||||||
loadtable.add_row("Server load", "%g" % loadavg)
|
loadtable.add_row("Total CPU load", "%g %%" % loadavg)
|
||||||
|
loadtable.add_row("Total computer memory usage","%g MB (%g%%)" % (rmem, pmem))
|
||||||
loadtable.add_row("Process ID", "%g" % pid),
|
loadtable.add_row("Process ID", "%g" % pid),
|
||||||
loadtable.add_row("Memory usage","%g MB (%g%%)" % (rmem, pmem))
|
|
||||||
else:
|
else:
|
||||||
loadtable = "Not available on Windows without 'psutil' library " \
|
loadtable = "Not available on Windows without 'psutil' library " \
|
||||||
"(install with {wpip install psutil{n)."
|
"(install with {wpip install psutil{n)."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue