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
BF_TAR(1)																 BF_TAR(1)

NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see EXAMPLES below). OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log files. The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files. EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble. EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar. o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz. o bf_tar `pwd`/mydirectory > outfile.tar Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path. NOTES
This script is meant for use with Berkeley DB based bogofilter versions. This script requires a SUSv2 compliant pax utility. This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so that /usr/xpg4/bin/sh can be used. 07/23/2007 BF_TAR(1)