I have a script that runs continuously and will deliver a file to multiple servers via scp. On occasions one of the scp's will hang and as a result not complete in sending the remaining files and not loop around again.
If I run the scp commands with a & they'll complete, but I want to make sure the sends have finished before looping again.
My question is how do I monitor the 6 PID's and kill any that have run for more than 2 minutes?
I was going to capture the PID into an array and then use that some how.
Just can't work out the best way.
Any ideas?
They'll be some Christmas cheers for the winner
Not really after Xmas cheers (not in the mood and will never be ) but here's an idea on how you might monitor and kill any that timed out
Just put 'mysleep 120 &' before scp'ing, proceed with care, not tested
Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go?
Thank you
Richard (4 Replies)
Is it possible to monitor processes whether they are waiting or active? Basically I would like to know since which TIME the process has been running and the state.
:confused: (3 Replies)
Hey,
I am doing a high availability project. I need coding(socket programming using C) to monitor processes that are running in different nodes with in a network cluster.At last if u could give me a program in C to monitor the process(whether it is running or failed),it would be very... (2 Replies)
I have to monitor several processes in my application .
i get the listing of these processes using the command ps -ax
i want to write a shell script that will monitor the processes and if a
process goes missing then it will send an email to my gmail account.
I want to run this... (6 Replies)
hi all,
i want to monitor mysql processes/threads/queries with respect to cpu usage.how can i do it?
show processlist is of no use as no information abt cpu usage is given.
plz help (7 Replies)
Hi can anybody help me regarding this..
i want know the output of ps -ef with explanation.
how can we know the running processess.
this is the output of ps -elf
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
19 T root 0 0 0 0 SY ... (1 Reply)