Suggestion needed from guru's

Cameron Laird claird at lairds.com
Tue Dec 31 16:17:08 EST 2002


In article <mailman.1041263403.6134.python-list at python.org>,
Raaijmakers, Vincent (IndSys, GE Interlogix) <Vincent.Raaijmakers at ge.com> wrote:
			.
			.
			.
>My python test application needs a feature that monitors memory usage of
>any application on a AIX, Linux and Windows os system.
>WHAT are the best approaches?
>It has to behave like 'top' for Linux/Unix. 
			.
			.
			.
Then use top.

"memory usage" is a poorly standardized notion.  That's
not a criticism of your project; it's just a fact you
need to know.  You'll probably have to write a bit of
platform-compensation glue to make this work.

Start, though, by study of the command-line options for
top on your chosen platforms; you'll probably come up
with something like
  "top -b -n 1 -p %s" % pid
that displays the information you're after.  At that
point, all you have to do is parse the output.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html



More information about the Python-list mailing list