watch dog process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting watch dog process
# 1  
Old 08-17-2009
watch dog process

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...
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Old DOS dog, can I learn new trix?

Hey, y'all ... Happily sort of between gigs ... And, owing to some thoughts about reviving a pile of hardware (a Dell lap top and a clone PC, bla, blah, etc.) ... thought I would embark on reviving / catching up on the UX side of things. I haven't done command line OS stuff for many years,... (3 Replies)
Discussion started by: BagEnd
3 Replies

2. UNIX for Dummies Questions & Answers

watch dog problem

please help in some times "watch dog reinit memory", and system hang SCO UNIX version 3.2.5.0 Compac Proliant ML 370 pentium 3 750 512 MB memory 9g and 18g scsi u/f/w Disc 65 user running informix Thanx (1 Reply)
Discussion started by: RoMaGo
1 Replies
Login or Register to Ask a Question
uudemon(4)						     Kernel Interfaces Manual							uudemon(4)

NAME
uudemon.admin, uudemon.cleanu, uudemon.hour, uudemon.poll - Administrative shell scripts for polling remote systems, cleaning up spool directories, reporting status to the system administrator, and routine invocations of the uuxqt and uusched daemons SYNOPSIS
These shell scripts reside in the following directory: /usr/lib/uucp DESCRIPTION
All the scripts can be run from the command line or can be run automatically by the cron daemon. To automatically run the scripts, remove the comment character (#) from the beginning of the relevant line in the /var/spool/cron/crontabs/uucp file. This script reports status to the system administrator. It issues the uustat command to find out the status of uucp jobs. It mails the results to the uucp login ID. The script may be modified to send mail to any login ID such as the uucp administrative login ID (uucpa) or root. This script cleans up the /var/spool/uucp and /var/spool/uucppublic directories by running the uucleanup command. The uucleanup com- mand is run with the following parameters: -C7, -D7, X2, -o2, -W1. This script runs the uusched and uuxqt daemons in the background. This script polls the systems listed in the /usr/lib/uucp/Poll file. The uudemon.poll script should be scheduled before the uudemon.hour script. This allows uudemon.poll to create any command files before cron runs the uudemon.hour script. FILES
Contains the uudemon.admin, uudemon.cleanu, uudemon.hour and uudemon.poll files. Contains the uucp file. RELATED INFORMATION
Commands: cron(8), uucleanup(8), uusched(8), uuxqt(1) Files: /usr/lib/uucp delim off uudemon(4)