Fixing @serverload to work on Mac/BSD. Use -o rss instead of rsz. This works on Linux/BSD/Mac with no extra per-OS logic needed.
This commit is contained in:
parent
7dc4901ccc
commit
ce2a8e9ffe
1 changed files with 76 additions and 76 deletions
|
|
@ -524,7 +524,7 @@ class CmdServerLoad(MuxCommand):
|
|||
loadavg = os.getloadavg()
|
||||
psize = resource.getpagesize()
|
||||
pid = os.getpid()
|
||||
rmem = float(os.popen('ps -p %d -o %s | tail -1' % (pid, "rsz")).read()) / 1024.0
|
||||
rmem = float(os.popen('ps -p %d -o %s | tail -1' % (pid, "rss")).read()) / 1024.0
|
||||
vmem = float(os.popen('ps -p %d -o %s | tail -1' % (pid, "vsz")).read()) / 1024.0
|
||||
|
||||
rusage = resource.getrusage(resource.RUSAGE_SELF)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue