Peter Jeremy wrote:
On 2010-Feb-28 01:48:35 +0000, "Dr. David Kirkby" <david.kir...@onetel.net>
wrote:
and dirty ugly patch, I've changed the call to 'top' from one to 'prstat' on
Solaris. Unlike 'top', 'prstat' is standard command.
I call it 'ugly' as I don't think calling 'prstat' it an ideal way, but it is
better than calling 'top' on Solaris.
...
http://trac.sagemath.org/sage_trac/ticket/8391
I'll be Devil's Advocate and suggest that this is the wrong solution.
I agree that system('top') is a really bad idea but dispute that
system('prstat') is much of an advance. IMHO, rather than band-aiding
the current problem, we should fix it properly.
Note that we have had this discussion before - last August in a
thread "Where is 'top' used in Sage?"
I fully agree 'prstat', is not an optimal solution.
But doing this properly is not so quick & easy as I don't know the system calls,
nor the python skills to integrate it. So would have to do quite a bit of work
to find out how to do it properly then rely on someone else to integrate the C
-> python.
Quite honestly, I don't have the time to devote to finding out how to do it
properly.
The current solution with 'top' suffers three big problems.
1) 'top' does not exist on Solaris.
2) top is called in an infinite loop, to supposedly avoid some race condition.
That makes doc-testing Sage very difficult.
3) If you install 'top', then it is slow.
That ticket is a *huge* improvement in that
1) 'prstat' exits as part of the operating system.
2) On a 900 MHz machine it is taking less than 10ms to get the data.
Sure, a better solution can be found. I totally agree. But that is 1000x better
than what we currently have.
Dave
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org