From 686bc92888e55ae4d24cab6b59a499ad0239d19d Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 7 Mar 2015 22:20:26 +0100 Subject: [PATCH] Added the ability for Windows users to use a (very limited version of the service command. Resolves #570. --- evennia/commands/default/system.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/evennia/commands/default/system.py b/evennia/commands/default/system.py index 2d586c5437..995106fe69 100644 --- a/evennia/commands/default/system.py +++ b/evennia/commands/default/system.py @@ -670,7 +670,9 @@ class CmdServerLoad(MuxCommand): pid = os.getpid() if os_windows: - # Windows requires the psutil module to get statistics like this + # Windows requires the psutil module to even get paltry + # statistics like this (it's pretty much worthless, + # unfortunately, since it's not specific to the process) /rant try: import psutil has_psutil = True @@ -681,12 +683,10 @@ class CmdServerLoad(MuxCommand): loadavg = psutil.cpu_percent() _mem = psutil.virtual_memory() rmem = _mem.used / (1000 * 1000) - vmem = "N/A on Windows" pmem = _mem.percent - rusage = "N/A on Windows" if "mem" in self.switches: - string = "Memory usage: {w%g{n MB (%g%%)" + string = "Total computer memory usage: {w%g{n MB (%g%%)" self.caller.msg(string % (rmem, pmem)) return # Display table @@ -699,7 +699,7 @@ class CmdServerLoad(MuxCommand): "(install with {wpip install psutil{n)." else: - # Linux / BSD (OSX) + # Linux / BSD (OSX) - proper pid-based statistics global _RESOURCE if not _RESOURCE: