Attachment '3.2.3.final-solaris-getrusage.patch'
Download 1 # HG changeset patch
2 # User mabshoff@fulvia
3 # Date 1230955265 18000
4 # Node ID e69ceb84399b53c56c712d1cbf02eff690d15aad
5 # Parent 64c6e7e3e30e27ddc950ea0f8ec8854db616a00c
6 Fix getrusage for Solaris
7
8 diff -r 64c6e7e3e30e -r e69ceb84399b sage/misc/getusage.py
9 --- a/sage/misc/getusage.py Sat Aug 09 18:30:07 2008 -0400
10 +++ b/sage/misc/getusage.py Fri Jan 02 23:01:05 2009 -0500
11 @@ -27,6 +27,8 @@
12 cmd = 'top -b -n 1 -p %s'%pid
13 elif U == 'darwin':
14 cmd = 'top -l 1 |grep "^ *%s "'%pid
15 + elif U == 'sunos':
16 + cmd = 'top -b -n 65635 |grep "^ *%s "'%pid
17 else:
18 raise NotImplementedError, "top not implemented on platform %s"%U
19
20 @@ -57,6 +59,8 @@
21 return linux_memory_usage() - t
22 elif U == 'darwin':
23 return top().split()[-1]
24 + elif U == 'sunos':
25 + return top().split()[-5]
26 else:
27 raise NotImplementedError, "memory usage not implemented on platform %s"%U
28
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.