#9170: cygwin: get_memory_usage isn't implemented, e.g., because there's no top
----------------------+-----------------------------------------------------
   Reporter:  was     |       Owner:  tbd       
       Type:  defect  |      Status:  needs_work
   Priority:  major   |   Milestone:  sage-4.6  
  Component:  cygwin  |    Keywords:            
     Author:          |    Upstream:  N/A       
   Reviewer:          |      Merged:            
Work_issues:          |  
----------------------+-----------------------------------------------------
Changes (by gbe):

  * status:  new => needs_work


Comment:

 Replying to [comment:2 drkirkby]:
 > I assume this means that
 >
 > {{{
 > sage: top()
 > }}}
 >
 > will not work either.

 I'm not at home so I can't test on my machine, but

 {{{
 File "/home/wstein/sage-4.4.3/devel/sage/sage/misc/getusage.py", line 30:
     sage: print "ignore this";  top()              # random output
 }}}

 looks like the line that's causing the first error to be throwing. The
 offending line(s) should be

 {{{
     if U == 'linux':
         cmd = 'top -b -n 1 -p %s' % pid
     elif U == 'darwin':
         cmd = 'top -l 1 |grep "^ *%s "' % pid
     elif U == 'sunos':
         cmd = '/usr/bin/prstat -n 100000 1 1  | grep "^ *%s "' % pid
     else:
         raise NotImplementedError("top not implemented on platform %s" %
 U)
 }}}

 I've double checked, and cygwin ''does'' ship with a top, so I suspect all
 that needs to be done is add a few instances along the line of "or U ==
 'cygwin'" and these issue would be resolved.

 I'll try to test this over the weekend and have a patch prepared.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9170#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to