Networking Forums

Networking Forums > Computer Networking > Linux Networking > Ping Server Script

Reply
Thread Tools Display Modes

Ping Server Script

 
 
Somedude
Guest
Posts: n/a

 
      02-23-2005, 04:26 PM
Hello,

I'm trying to write a cron job which

1. Pings a certain address at a specified interval (note..cron)
2. If response is recieved, all good.
3. If response is not recieved, emails me.

Does anyone know how to do this or can reccomend me in a direction? I'd
like to write it myself or learn "how" somewhere rather than just buy
something.

Thanks for any / all help!


 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      02-23-2005, 04:31 PM
On Wed, 23 Feb 2005 12:26:33 -0500, Somedude wrote:
> Hello,
>
> I'm trying to write a cron job which
>
> 1. Pings a certain address at a specified interval (note..cron)


ping -c 1 -w 3 "certain address" > /dev/null 2>&1


> 2. If response is recieved, all good.


if statement to test value of $?

> 3. If response is not recieved, emails me.


man mail or man mailx

>
> Does anyone know how to do this


Yes

> or can reccomend me in a direction?


http://www.tldp.org/LDP/abs/html/index.html

 
Reply With Quote
 
Somedude
Guest
Posts: n/a

 
      02-24-2005, 12:05 AM

"Bit Twister" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Wed, 23 Feb 2005 12:26:33 -0500, Somedude wrote:
> > Hello,
> >
> > I'm trying to write a cron job which
> >
> > 1. Pings a certain address at a specified interval (note..cron)

>
> ping -c 1 -w 3 "certain address" > /dev/null 2>&1
>
>
> > 2. If response is recieved, all good.

>
> if statement to test value of $?
>
> > 3. If response is not recieved, emails me.

>
> man mail or man mailx
>
> >
> > Does anyone know how to do this

>
> Yes
>
> > or can reccomend me in a direction?

>
> http://www.tldp.org/LDP/abs/html/index.html
>


Thank you very much Bit.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
server 2k gpo/script won't start on clients alex01 Windows Networking 0 03-22-2007 11:08 AM
Cannot ping server but server can ping workstations Jeff Windows Networking 3 07-06-2006 07:06 PM
premature end of script header on apache server zhe@foundrynet.com Linux Networking 2 01-05-2005 11:18 PM
xp client does not run login script on 2003 server Charles Windows Networking 5 06-18-2004 02:54 PM
Server Polling Script Andrew Bell Linux Networking 0 09-06-2003 05:01 PM



1 2 3 4 5 6 7 8 9 10 11