Sponsored Content
Full Discussion: Network Monitoring
Top Forums Shell Programming and Scripting Network Monitoring Post 302917068 by kannansoft1985 on Saturday 13th of September 2014 10:52:12 PM
Old 09-13-2014
First of all thanks to rudic for putting great effort to develop a script,
I think you are a genious


But I want to ping ip continuously from 10.00 A.M to 5.00 P.M, ( time specifications is important or else shell script continuously checking ip address to get a automatic triggering mail when network connection is lost)

When I am executing a shell script , I want to ping IP address morning 10.00 A.M to 5.00 P.M continuously,I want to get a mail once when the network connection is lost( for 16 IP address).( checking process continuously)

when I am executing a shell script ,I don't want to get the output from a terminal.But I just want to get a mail once when network connection is lost.This checking process is between 10 A.M to 5.00 P.M (continuous process)
Code:
sample example code for One IP Address :
 
if    ping $ip > /dev/null 

 then

echo " " > /dev/null

else 

  echo " $branchcode-$branchname-$ip is down " >> mailcontent
 
 mail -s " IPs down " upload.XXX@example.com < mailcontent

fi


Last edited by kannansoft1985; 09-14-2014 at 12:12 AM..
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Network monitoring

Is there any way to check up the TCP/Ip port connectivity( healthiness ) without using ping or icmp calls ? (2 Replies)
Discussion started by: vikasdeshmukh
2 Replies

2. UNIX for Dummies Questions & Answers

monitoring network traffic

there are commands to monitor the memory, paging, io... how about network traffic. i mean commands to see whether the network traffic (LAN) is congested? the closest i got is netstat thanks (6 Replies)
Discussion started by: yls177
6 Replies

3. UNIX for Dummies Questions & Answers

network monitoring software

hi can i know if there is any GUI interface software to help in monitoring the network of the servers i have? something like a web pages or a stock pages when a processes is down, a red colour is flashes. best if it is free ;) (1 Reply)
Discussion started by: legato
1 Replies

4. UNIX for Advanced & Expert Users

Monitoring network traffic using snoop

I want to monitor network traffic. For this purpose i use snoop command. But snoop command only show those packets which are broadcasted or those packets which recieved by host. But I want to examine whole network traffic. Please tell me how to use snoop for monitoring whole network traffic or if... (3 Replies)
Discussion started by: mansoorulhaq
3 Replies

5. Infrastructure Monitoring

Network monitoring tool for Solaris 10

Hi All, I was wondering if there is any Network Monitoring Tool for Solaris 10 to monitor a network having hybrid operating systems. I just googled it without success. Hope, experts will guide me to get it. Thanks, Deepak (7 Replies)
Discussion started by: naw_deepak
7 Replies

6. HP-UX

Monitoring traffic in the network

I Colleagues, Somebody can say me how to monitoring traffic in the network. also I am interested in monitoring memory. if somebody to know a guide with command advanced in unix welcome for me. Thank you for adcanced. (0 Replies)
Discussion started by: systemoper
0 Replies

7. UNIX for Dummies Questions & Answers

Network monitoring at boot level.

Whenever i start my server it takes app 2 minutes to get into network (After starting the network service on boot). I inquire the network guys for possible causes but they say it will need both side monitoring . One is switch side and the second is server side. I m not sure how do i check... (6 Replies)
Discussion started by: pinga123
6 Replies

8. BSD

PF OpenBSD Network Monitoring

Hi, Though I have some Linux background I'm new to BSD. Currently I'm administering an OpenBSD 5.3 firewall which based on PF. I want to view my LAN's top talkers to the internet. If it is a graphical method that's better but I like to know whether it is possible through a command like pfctl.... (3 Replies)
Discussion started by: amithad
3 Replies
escape(1)							Mail Avenger 0.8.3							 escape(1)

NAME
escape - escape shell special characters in a string SYNOPSIS
escape string DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result. EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string: $ var='; echo gotcha!' $ eval echo hi $var hi gotcha! $ Using escape, one can avoid executing the contents of $var: $ eval echo hi `escape "$var"` hi ; echo gotcha! $ A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient: #!/bin/sh formail -x to -x cc -x resent-to -x resent-cc | fgrep "$1" > /dev/null && exit 0 echo "<$1>.. address does not accept blind carbon copies" exit 100 To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt script: bodytest reject_bcc `escape "$RECIPIENT"` SEE ALSO
avenger(1), The Mail Avenger home page: <http://www.mailavenger.org/>. BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells. AUTHOR
David Mazieres Mail Avenger 0.8.3 2012-04-05 escape(1)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy