![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Killing of a process and send a mail if the process doesnot come up within 2 minutes | Prince89 | Shell Programming and Scripting | 1 | 02-15-2008 03:10 PM |
| how to check if a process is running in a server from shell script. | debu | UNIX for Advanced & Expert Users | 2 | 01-24-2008 01:19 PM |
| How to create a dummy process of a process already running? | shambhu | UNIX for Advanced & Expert Users | 3 | 08-31-2007 07:22 AM |
| how to get the list of process running in the server from the local machin n unix ? | guhas | Shell Programming and Scripting | 3 | 10-04-2005 12:58 PM |
| How to monitor if a process is running | Pedro Tavares | High Level Programming | 3 | 11-14-2001 11:34 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello all,
I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. |
| Forum Sponsor | ||
|
|
|
|||
|
Hello all,
can any body help me with a script that will check every day for process running on UNIX server and Post a mail if any of the process has aborted or stoped. It is really urgent and i 'm new to unix. Plz some one help me on this at the earliest. Thanks in advance, Regards, |
|
||||
|
First, read the rules - no double posting or bumping post to get an answer.
Next, these forums are meant to help those that help themselves. Meaning you start writing the script and when you get to a problem, post it and we assist in solving your problem. Just look at how you normally would solve this problem from the command line and put it into a file which you then set to executable. |
|
|||
|
hello,
i have posted the mail to make my problem clear. i know how to check it through command line using ps command. but i dont know how i get the status of the process and after that when i redirect the output to a file how do i filter it for the aborted/ stoped processes and send a mail. i have tried writing script but i did not work that why i have ask for help. thanks for you suggestion...i would be thankful if any onne could help me with this script the giving advices. regards, Pradeep Kulkarni. |
|
|||
|
server process monitoring via mail
hi guys,
i'm back with a small problem. i have now written a script that will grep for a process and will notify me if not running. [#!/bin/ksh pid="" pid='ps -ef | grep "<process string>" | awk ' {print $2}'' echo $pid if [ "$pid"="" ] then echo "process not running" rsh <mail server> mailx -s "<etc etc process not running>" <mail.id> else echo service is ok pid="" fi ] now i'm have a problem in the mailing section. can any one tell me how i can redirect the output to a file and send it via mail if the process i'm greping is not runnning. i tried the above syntax and failed. And one more help how can i find the parent process that aare running so that i can make a list of those important process. kindly some one look into this and reply at earliest. Regards, Pradeep Kulkarni |
|
||||
|
Instead of
rsh <mail server> mailx -s "<etc etc process not running>" <mail.id> try mailx -s "<etc etc process not running>" yourID@yourdomain.xxx < /dev/null Change yourID and yourdomain.xxx to your userid and domain name. |
||||
| Google The UNIX and Linux Forums |