Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Script for pinging continuously Post 302979302 by itkamaraj on Friday 12th of August 2016 04:56:33 AM
Old 08-12-2016
In bash, we can do like this

Code:
for i in {1..3600}; do ping -c1 my_host_name >/dev/null 2>&1 && echo "$(date) : pass" >> output.txt || echo "$(date) : fail" >>output.txt; sleep 60; done


Last edited by itkamaraj; 08-26-2016 at 04:42 AM..
 

10 More Discussions You Might Find Interesting

1. AIX

pinging IP's in a file

Hey all. I have a long list of IP addresses I want to ping. The IP's are located in a flat file "ping_info.dat". I was wondering what the best way to go about this would be. Can someone help me out? (2 Replies)
Discussion started by: jalge2
2 Replies

2. Shell Programming and Scripting

pinging an ip

Hi, How to ping an ip from an unix machine. Can you please let me know the exact command. I used and i got the below error ping 171.18.17.2 bash: ping: command not found Thanks n regards Ammu (1 Reply)
Discussion started by: ammu
1 Replies

3. Shell Programming and Scripting

Shell Script to continuously scan a log file

Hello members, I have some doubts on how to write a script that can reports success / failure of a batch job ? 1. Run a batch job: 2. Wait and search for a particular string in the Log file: tail -f log01*.txt | egrep -v "^SUCCESSFUL" echo "continue with the other tasks" ... (1 Reply)
Discussion started by: novice82
1 Replies

4. Shell Programming and Scripting

Forking and Pinging

Keep in mind that I haven't done Perl scripting for a LONG time, so I'm quite rusty. This is what I would like to do: - using fork, create 3 or 4 processes to read 3 or 4 different text documents containing server names or IP addresses - in each of those processes, Perl will ping each of those... (7 Replies)
Discussion started by: kooshi
7 Replies

5. Shell Programming and Scripting

Pinging a domain

how can you ping a domain and store the ip? like given a url in a variable $url how can i ping it? also how can i find the local server's ip address on a cpanel server? (i have multiple servers and didnt want to hard code it in) (basically i want to check the domain accounts on the server,... (11 Replies)
Discussion started by: vanessafan99
11 Replies

6. Shell Programming and Scripting

Run a script continuously for 10 minutes

Hi all!! Im using ksh and my OS is Linux. I want to run a script for ten minutes, starting from my current system time. How to acheive this? Any help appreciated. Thanks in advance (5 Replies)
Discussion started by: Jayaraman
5 Replies

7. Shell Programming and Scripting

Need help in running a script continuously non stop

Hi, I am running a schedular script which will check for a specific time and do the job. I wanted to run this continuously. Meaning even after the if condition is true and it executes the job, it should start running again non stop. I am using below script #!/bin/sh start: while true do... (10 Replies)
Discussion started by: sandeepcm
10 Replies

8. Shell Programming and Scripting

Shell Script for continuously checking status of a another script running in background, and immedia

Hi, I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help.. i am using below command to run script nohup system_traps.sh & but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies

9. UNIX Desktop Questions & Answers

Pinging Host

I need to ping websites and I need to see which one has the highest delay. My problem is I need to extract the name Facebook and the time=74.0 ms using awk. I need help doing this please... PING facebook.com (173.252.90.36) 56(84) bytes of data. 64 bytes from... (5 Replies)
Discussion started by: 5sku5
5 Replies

10. UNIX for Beginners Questions & Answers

Shell script for continuously monitoring log file

Hi I have written below log monitoring script to egrep multiple words and redirect the output to a text file and its working fine but I want to add some more below given functionality to it, which is very advance and im not very good in it, so please help if you can :) I am egrepping all the... (1 Reply)
Discussion started by: scazed
1 Replies
IODINE-CLIENT-START(8)					  System Administration Utilities				    IODINE-CLIENT-START(8)

NAME
iodine-client-start - start an iodine IPv4-over-DNS tunnel SYNOPSIS
iodine-client-start [option] DESCRIPTION
'iodine-client-start' starts an iodine IP-over-DNS tunnel. -h, --help Print help and exit -v, --version Print version info and exit Invoking the program without options attempts to set up and configure an iodine IP-over-DNS tunnel using the configuration in the file /etc/default/iodine-client or by querying the user. It tries to figure out the right way to set things up by observing the network, and if all else fails by guessing. QUICK CONFIGURATION Put two lines in the file /etc/default/iodine-client subdomain=your.tunnel.sub.domain passwd=password_for_that_tunnel or invoke the script with those environment variables set: env subdomain=xxx passwd=xxx iodine-client-start If these are not set, the script will query the user for them. DETAILS The configuration file consists of lines which are either comments starting with '#', or settings of the form VAR="val". Valid VARs are: subdomain Sample value: your.tunnel.sub.domain (no default, must be set) passwd Sample value: password_for_that_tunnel (no default, must be set) testhost Hostname to ping when testing if network is working (default: slashdot.org) bounce_localnet Take the local network down and then up again before starting tunnel (default: false) test_ping_localnet Test if the local network is working by pinging the gateway (default: true) test_ping_tunnel Test if the iodine tunnel is working after it has been set up by pinging the host at the other end (default: true) test_ping_final Test if the tunnel is working after everything is ostensibly set up by trying to ping an external host (default: true) default_router IP address of router on the local network---should be found automatically, set this if that fails and the program guesses wrong. interface Interface to use (e.g., eth1, eth0, etc) for connection to DNS server used for the iodine tunnel---should be found automatically, set this if that fails and the program guesses wrong. mtu Set if tunnel MTU needs to be manually changed (lowered). Should not be necessary anymore, as recent versions of iodine negotiate an appropriate MTU during tunnel setup. But if that negotiation does not happen, or if you are using an older version of iodine, the default tunnel MTU is 1024, and if the local DNS server restricts to 512 byte packets you might need to use an MTU of 220. skip_raw_udp_mode Set "-r" option in iodine command line. With this option, iodine does not try to establish a direct UDP socket to the iodine server on port 53. (default: true). continue_on_error Set if the script should continue even if a command fails. Use to test script when running as non-root. Defaults to false if run- ning as root, true otherwise. iodine-client-start 1.0.4 June 2014 IODINE-CLIENT-START(8)
All times are GMT -4. The time now is 01:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy