HELP: check if website is on, if not email


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting HELP: check if website is on, if not email
# 8  
Old 09-01-2008
Try this one:

if ! ping -c 1 yourhost | grep 'bytes from' > /dev/null
then
echo mail command here...
fi


--
Fabio Berbert de Paula
Viva o Linux - A maior comunidade de usuários Linux do Brasil!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check email successful sent and receive

We have a unix/linux server , that send mass email from it , the emails will pass the smtp gateway , email server and sent to the client , but sometimes the client do not receive the mail , we do not know the reason and when it will happen . We would like to have a script that check when the... (2 Replies)
Discussion started by: ust4
2 Replies

2. Shell Programming and Scripting

Check Date Format And Email Out

Hello All, I have a requirement where i need to get the EXTRACT_DATE from a file and check if the date is of valid format or not and then mail it if it is not valid. Appreciate if you can help me with this. I did the following so far. awk '{for(i=1;i++<=NF;)if($i~/^EXTRACT_DATE/) print $i}'... (11 Replies)
Discussion started by: Ariean
11 Replies

3. Web Development

Request to check:PHP website design help

Hi I have a website name www.gentrepid.org I have all the setting scripts for this website in php now as a research part, I am new to this as I havent done that before. I have to make certain changes in the website Include some icons on the left like "Drugs" when user click on it... (0 Replies)
Discussion started by: manigrover
0 Replies

4. Infrastructure Monitoring

Nagios Check Website Command help

Hi all, me again.... I am trying to add a website to my nagios checking juggernaught I am using the script from nagios exchange site called check_website_response (google to find it i am not allowed to post links yet, sorry) It is in /usr/local/nagios/libexec with the rest of the default... (1 Reply)
Discussion started by: Yoshi17
1 Replies

5. Shell Programming and Scripting

Check email and download attachment

Hi, I had search the web for a script to download email, but failed to found one. I need a bash or perl script that will check for email originating from an address such as john@rambo.com and download the .zip attachment into a specified folder. Anyone could assist or give me some... (1 Reply)
Discussion started by: mynullvoid
1 Replies

6. Shell Programming and Scripting

Check and compare disk space and email it

I am very new to Linux and learning to script. This is for one of my servers at work that I have to keep track off as far as disk space and how it is used. I have tried to go line by line but little things keep chewing me up. I would appreciate any and all help or advice, and Mutt is installed on... (3 Replies)
Discussion started by: sgtjkj
3 Replies

7. Shell Programming and Scripting

Need to check POP3 email

Hey there! I have this problem: i'm in need to check the subject from e-mails from some generic account. This subjects are used as parameters for some program. The thing is, i can do the second, but not the first. I don't know how to handle POP3 accounts from shell. Is there an application that... (1 Reply)
Discussion started by: ghorkov
1 Replies

8. Shell Programming and Scripting

how to check body of the email

Dears, i have user called dellsh i hope to make this script when this user recieve email check the budy of the email about (StatusRequest) when i find this email contain this subject run crontab do this job (create file in my home directory called index) thanks for your attention (1 Reply)
Discussion started by: dellsh
1 Replies

9. Shell Programming and Scripting

How do I check using shell-script if a website is available / responding?

Hi, Could someone please help. How do I verify using a shell script whether a website URL is available? It's roughly the URL equivalent of ping <servername> or tnsping <Oracle database name>? I hope this is enough information - please let me know if it's not. Many thanks, Neil (3 Replies)
Discussion started by: Neil_mw
3 Replies
Login or Register to Ask a Question
TRACEROUTE6(8)						    BSD System Manager's Manual 					    TRACEROUTE6(8)

NAME
traceroute6 -- print the route IPv6 packets will take to a network node SYNOPSIS
traceroute6 [-dIlnNrvU] [-f firsthop] [-g gateway] [-m hoplimit] [-p port] [-q probes] [-s src] [-w waittime] target [datalen] DESCRIPTION
The traceroute6 utility uses the IPv6 protocol hop limit field to elicit an ICMPv6 TIME_EXCEEDED response from each gateway along the path to some host. The only mandatory parameter is the destination host name or IPv6 address. The default probe datagram carries 12 bytes of payload, in addi- tion to the IPv6 header. The size of the payload can be specified by giving a length (in bytes) after the destination host name. Other options are: -d Debug mode. -f firsthop Specify how many hops to skip in trace. -g gateway Specify intermediate gateway (traceroute6 uses routing header). -I Use ICMP6 ECHO instead of UDP datagrams. -l Print both host hostnames and numeric addresses. Normally traceroute6 prints only hostnames if -n is not specified, and only numeric addresses if -n is specified. -m hoplimit Specify maximum hoplimit, up to 255. The default is 30 hops. -n Do not resolve numeric address to hostname. -N Use a packet with no upper layer header for the probes, instead of UDP datagrams. -p port Set UDP port number to port. -q probes Set the number of probe per hop count to probes. -r Bypass the normal routing tables and send directly to a host on an attached network. If the host is not on a directly-connected net- work, an error is returned. This option corresponds to the SO_DONTROUTE socket option; it can be used to ping a local host through an interface that has no route through it (e.g., after the interface was dropped by a routing daemon). -s src Src specifies the source IPv6 address to be used. -U Use UDP datagrams for the probes. This is the default. -v Be verbose. -w waittime Specify the delay time between probes. This program prints the route to the given destination and the round-trip time to each gateway, in the same manner as traceroute. Here is a list of possible annotations after the round-trip time for each gateway: !N Destination Unreachable - No Route to Host. !P Destination Unreachable - Administratively Prohibited. !S Destination Unreachable - Not a Neighbour. !A Destination Unreachable - Address Unreachable. ! This is printed if the hop limit is <= 1 on a port unreachable message. This means that the packet got to the destination, but that the reply had a hop limit that was just large enough to allow it to get back to the source of the traceroute6. This was more interesting in the IPv4 case, where some IP stack bugs could be identified by this behaviour. RETURN VALUES
The traceroute6 utility will exit with 0 on success, and non-zero on errors. SEE ALSO
ping(8), ping6(8), traceroute(8) HISTORY
The traceroute6 utility first appeared in WIDE hydrangea IPv6 protocol stack kit. BSD
May 17, 1998 BSD