| Author |
problem with Runtime.exec()
|
prashanthNair
Greenhorn
Joined: May 13, 2004
Posts: 18
|
|
I have a process monitoring program in linux which executes the class through Runtime.exec() and monitors the status of the child processes periodically from a Thread.i am looking up the processes from an rmi registry and will write the status periodically. when a "ps -ef | grep java" is done from the terminal,it was showing 3 process ids.One for the monitoring Main class,another for rmiregistry and the third for the program which is being monitored If i start this monitoring program ,its observed that the system becomes slow. I am not able to find out why is this happening Is it because i am starting another jvm instance? cheers prashanth
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
Is it because i am starting another jvm instance?
Starting another jvm instance would only cause a temporary pause. I suspect your problem lies elsewhere - how frequently does your monitoring program run? Bill
|
Java Resources at www.wbrogden.com
|
 |
Stefan Wagner
Ranch Hand
Joined: Jun 02, 2003
Posts: 1923
|
|
Just by the way: ps -C java is more efficient than ps -ef | grep java - i.e. the grep java might find itself.
|
http://home.arcor.de/hirnstrom/bewerbung
|
 |
prashanthNair
Greenhorn
Joined: May 13, 2004
Posts: 18
|
|
|
The montoring program will run in a while loop and will check the status every 60 secs
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
|
"prasanthNair", There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear JavaRanch Sheriff
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: problem with Runtime.exec()
|
|
|