Unix Programming - Re: Memory testing in Python

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > March 2007 > Re: Memory testing in Python





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Memory testing in Python
Cameron Laird

2007-03-30, 1:19 pm

In article <1175266111.159492.131320@l77g2000hsb.googlegroups.com>,
mkPyVS <mikeminer53@hotmail.com> wrote:
>
>I agree but for monitoring...
>
>I've had good luck with executing a popen to grab and parse output
>from ps -Af and pass it your own process ID as the search. It adds
>overhead to the cpu exec time but it is much less than 1sec so you
>won't see it.
>


Fair enough.

Did you intend to suggest "ps -F"? While ps remains not-so-well
standardized, I know of no version where "ps -Af" details *memory*
usage.

Parsing can be simplified with such invocations as
ps -o pid -o rss -o size -o cmd
(which can itself be rewritten in various ways, depending on the
flavor of ps involved).
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com