![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| 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 07: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 05:19 PM |
| How to create a dummy process of a process already running? | shambhu | UNIX for Advanced & Expert Users | 3 | 08-31-2007 11: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 04:58 PM |
| How to monitor if a process is running | Pedro Tavares | High Level Programming | 3 | 11-14-2001 03:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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. ![]() |
|
||||
|
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. |
|
||||
|
hi RTM,
Thanks for the update it works, one small help how can i liist all the parent process running on a unix machine, so that i can grep for only those. i have all unix machine ( HPUX, AIX, SUN and IRIX)can you help me on this. Thanks in advance. Regards, Pradeep Kulkarni. |
|
||||
|
hi,
i have a new problem, i had problem with time on my aix machine the date had changed to 2022 year, now i want to find all the files in the dir and sub dir that has the time stamp with year 2022, can any one help me on this. i tried with find command but could nott formate an expression. Kindly help me. Thanks in advance Pradeep Kulkarni. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|