Re: Monitoring external processes

2007-10-23 Thread Graham Dumpleton
On Oct 23, 3:09 pm, [EMAIL PROTECTED] wrote:
 Hi,

 Is there a way to track external processes launched by python on the
 Mac? I am using subprocess module to launch the process.

 Thanks
 Sunil

If using Python 2.3/2.4, you can use os.wait().

If using Python 2.5, there is also have os.wait3() and os.wait4().

See the operating system manual pages for the difference. Ie.,

  man wait4

Graham

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Monitoring external processes

2007-10-23 Thread Simon Brunning
On 10/23/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 Is there a way to track external processes launched by python on the
 Mac? I am using subprocess module to launch the process.

Depending on how much detail you are looking for, PSI might be worth a look.

http://www.psychofx.com/psi/

-- 
Cheers,
Simon B.
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Monitoring external processes

2007-10-23 Thread arunasunil
On Oct 22, 11:33 pm, Graham Dumpleton [EMAIL PROTECTED]
wrote:
 On Oct 23, 3:09 pm, [EMAIL PROTECTED] wrote:

  Hi,

  Is there a way to track external processes launched by python on the
  Mac? I am using subprocess module to launch the process.

  Thanks
  Sunil

 If using Python 2.3/2.4, you can use os.wait().

 If using Python 2.5, there is also have os.wait3() and os.wait4().

 See the operating system manual pages for the difference. Ie.,

   man wait4

 Graham

Ah! Exactly what I needed.

Thanks
Sunil.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Monitoring external processes

2007-10-23 Thread arunasunil
On Oct 22, 11:33 pm, Graham Dumpleton [EMAIL PROTECTED]
wrote:
 On Oct 23, 3:09 pm, [EMAIL PROTECTED] wrote:

  Hi,

  Is there a way to track external processes launched by python on the
  Mac? I am using subprocess module to launch the process.

  Thanks
  Sunil

 If using Python 2.3/2.4, you can use os.wait().

 If using Python 2.5, there is also have os.wait3() and os.wait4().

 See the operating system manual pages for the difference. Ie.,

   man wait4

 Graham

I'm having a slight problem using wait3 or wait4. I want monitor a
launched process and get its resource usage information. When I call
os.wait4 with the pid the first time the call returns successfully but
the second time around I get a OSError with No child processes
error. I have tried using WCONTINUED, WNOHANG and WUNTRACED options.

Sunil.

-- 
http://mail.python.org/mailman/listinfo/python-list


Monitoring external processes

2007-10-22 Thread arunasunil
Hi,

Is there a way to track external processes launched by python on the
Mac? I am using subprocess module to launch the process.

Thanks
Sunil

-- 
http://mail.python.org/mailman/listinfo/python-list