The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
WiKID Strong Authentication System 3.0.0 (J2ME Wilreless Cell Phone Token branch) iBot Software Releases - RSS News 0 05-28-2008 06:40 PM
mail, aliases, pager itik AIX 2 01-30-2008 08:57 PM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-18-2001
Registered User
 

Join Date: Oct 2001
Posts: 5
Question process pager - by cell phone or just e-mail notify

hi all..

i need any help. i want to create in my crontab a simple script for verify any process and notify for the status in my e-mail or cell phone.

anybody help me?
Forum Sponsor
  #2  
Old 10-19-2001
guest100's Avatar
Banned
 

Join Date: Oct 2001
Location: London, UK
Posts: 146
what do you mean when you say 'verify any proccess'??

I suppose in your script you need to include the following commands:
<pre>

ps -ef |grep whatever
grep whatever
mail or any other mailer // for notify youe email.

</pre>
  #3  
Old 10-19-2001
Registered User
 

Join Date: Oct 2001
Posts: 5
Process Pager on Cell Phone or E-Mail Notify

tks Guest100...

when i say "verify process" i talk about verify what process is running, example, i need my server send a notify when the process is down.

understand?
  #4  
Old 10-19-2001
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
Code:
WATCH=`ps -ef|grep whatever|wc -l`

if [[ $WATCH -ne 0 ]]; then
exit 0
else
echo "Process is not running"|mailx -s"SUBJECT HERE" user@blah.com
  #5  
Old 10-19-2001
Registered User
 

Join Date: Oct 2001
Posts: 5
process pager - notify bye-mail or cell phone

ok. thanks Optimus_P.

But now, i want my script check the internet conection.
What's the sintax for the correct WATCH with "ping any.address.com"?

If anybody want's help-me, i wait for contact.
  #6  
Old 10-19-2001
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,479
Quote:

ps -ef | grep 'a process' | grep -v grep
Remember! When you ps -ef and pipe to grep, you must filter out the grep with the -v flag.
  #7  
Old 10-19-2001
Registered User
 

Join Date: Oct 2001
Posts: 5
Neo

Ok, Tks Neo, but i want execute a "ping any.address.com"..
If ping not response, i'll notify by e-mail. If the ping response, nothing e-mail is sent.

Can you help-me?
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 01:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0