my dog learned polymorphism
The moose likes Linux / UNIX and the fly likes Watch dog process in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "Watch dog process in linux" Watch "Watch dog process in linux" New topic
Author

Watch dog process in linux

Masthansha miajan
Greenhorn

Joined: Jun 13, 2008
Posts: 1
Hi,

I am calling shell script, using process builder in java. if any error triggered in script i am catching error line in a log file.

my script is doing 1) creating xml files .
2) gzip the file
3)export the created file from source to destination server.
4)After processing successful the file will be removed from source.
5) clean the process id

i am getting in log file like..
"line 449: 18520 Killed ( sleep $timeout; echo "${mainpid} TERMINATED"; kill -9 ${mainpid} >/dev/null 2>&1 )"

in shell script::
i am doing like this
local mainpid=$1
local timeout=$2
(sleep $timeout;echo "${mainpid} TERMINATED";kill -9 ${mainpid} >/dev/null 2>&1) &
TIMEOUTPID=$!

every thing processed successfully ,but i don't want to print message in the log file like above.
Please give me any advise.

Thanks in Advance..
Masthansha...


 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Watch dog process in linux
 
Similar Threads
Executing shell script
Search on a string
Running JBoss-5.1.0.GA as a service on Red Hat?
error starting up 2nd instance of tomcat
Tomcat fails to restart with "Address already in use" exception