![]() |
|
|
|
|
|||||||
| 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 |
| How to check if DHCP is running on HP-UX box? | nuGuy | HP-UX | 2 | 04-12-2008 09:47 AM |
| Check backup file size on backup tape | ayhanne | UNIX for Dummies Questions & Answers | 0 | 10-25-2007 08:41 AM |
| Check the backup dates on Tape | masquerer | AIX | 0 | 07-05-2007 06:28 AM |
| How to check the size of the backup from the tape? | sharif | UNIX for Advanced & Expert Users | 0 | 06-04-2007 08:06 AM |
| check that script is not running twice | Link_02 | Shell Programming and Scripting | 2 | 02-20-2002 04:17 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
pmon and tnslsnr - how to check when they are back running after a backup
Hi Guys,
problem statement - I wish to come up with a script which sends an email as soon as tnslsnr and pmon process are back online after a backup is complete. Detailed description - We have a few Solaris servers. A daily backup is taken on all of them. Before a backup is taken, pmon process and tnslsnr are taken down (achieved via a script ). This is done at a fixed time everyday. Depending on how much time it takes, the pmon and the tnslsnr stay down. Now, I wish to create a script which sends an email telling that the pmon and tnslsnr are back running after the backup. PS : I can write a script which runs periodically (lets say every 20 minutes) using the ps -ef and checks for the process with something like this : #!/bin/ksh pid="" pid=ps -ef | grep <user> | grep -v grep | 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 But I wish to achieve this without running the script periodically. I was hoping to maybe capture an event somehow/somewhere, as soon as pmon and tnslsnr are back running and use it to write my script. Is there a file/log that captures when all the processes are down or running? and If yes, is there a way to use that info in generateing a script for my problem above ? any help or insight into my querry is much appreciated !!! |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You can watch the oracle logs but that's much the same procedure as doing you current polling of the process table.
I'd think tying something into the script that starts the listener after the backup would be simpler. Just have it call your email script once it's done with the backup? |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|