On Mon, Sep 01, 2008 at 08:40:42AM +0200, Diez B. Roggisch wrote:
> Johny schrieb:
> >To get a number of the http processes running on my Linux( Debia box)
> >I use
> >ps -ef | grep "[h]ttpd" | wc -l
[...]
> The shell does the exact same thing. And by the way: i think you miss a
>
> grep -v grep
On Sun, 31 Aug 2008 23:25:56 -0700 (PDT), Johny wrote:
> To get a number of the http processes running on my Linux( Debia box)
> I use
> ps -ef | grep "[h]ttpd" | wc -l
...
> So my question is:
> Is it possible to get a number of the http processes running on Linux
> directly from Python ?
Yes, i
Johny wrote:
Is it possible to get a number of the http processes running on Linux
directly from Python ?
The Python core has no direct API for the job. However you can use the
virtual /proc/ file system for the job. Or check out my enumprocess
package.
http://pypi.python.org/pypi?:action=di
Johny schrieb:
To get a number of the http processes running on my Linux( Debia box)
I use
ps -ef | grep "[h]ttpd" | wc -l
But If I want to use to get a number of the http processes from my
Python program I must use a popen command e.g.
popen2.popen3('ps -ef | grep "[h]ttpd" | wc -l')
that is