473,372 Members | 802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Monitoring external processes

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

Oct 23 '07 #1
4 2278
On Oct 23, 3:09 pm, arunasu...@gmail.com 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

Oct 23 '07 #2
On 10/23/07, ar********@gmail.com <ar********@gmail.comwrote:
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.
si***@brunningonline.net
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values | Yahoo: smallvalues
Oct 23 '07 #3
On Oct 22, 11:33 pm, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:
On Oct 23, 3:09 pm, arunasu...@gmail.com 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.

Oct 23 '07 #4
On Oct 22, 11:33 pm, Graham Dumpleton <Graham.Dumple...@gmail.com>
wrote:
On Oct 23, 3:09 pm, arunasu...@gmail.com 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.

Oct 23 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: SQLDBA | last post by:
I am in the process of evaluating some SQL Performance Monitoring /DBA tool to purchase (For SQL Server 2000). I have the following list of software that I came across and have to finalize which...
0
by: Ralf Gross | last post by:
Hi, I'm monitoring a RedHat Enterprise 4 server with a DB2 8.2 database. Last week I added some processes which should be checked, to the net-snmp config. db2fmcd db2fmp db2dasrrm db2fmd
6
by: TIM | last post by:
for example i have one simple programm int main() { int test = NULL; while(1){ printf("%d\n",test); getch(); test++; }
0
by: Paul Steele | last post by:
I am working in a C# program what monitors the activity on a computer. I have been able to accomplish quite a bit so far, but one item I have not been able to figure out is if there is a way to...
4
by: Bob | last post by:
I've got dot net Winform apps that are running in a backroom server with no user interaction. They are supposed to run unattended 24 7 365. They are IVR apps taking orders via telephony. Problem is...
1
by: amit.vasu | last post by:
Hi I have created a web serivces using .net framework 2.0. When I try to execute the web service I get the following error. Failed to start monitoring changes to 'e:\Default Web Site' because...
7
by: mojtaba_danai | last post by:
Hi Hope that some one can help with the following. I wish to write a Visual C++ program, which monitors 3-4 other services (process/programs also written in VC++). The program shall monitor, if...
5
by: Ben | last post by:
I am building a web app using ASP.NET 2.0. One of the requirements is that we link to a third party vendor's site, display their content. let the user make choices on the vendors site and then...
0
by: Vinod Sadanandan | last post by:
STANDBY DATABASE MONITORING & PROTECION MODES (9iR2) This document is written for understanding and monitoring standby database configured with diffrent protection modes . MAXIMUM PROTECTION ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.