12-05-2010
Hi.
I think that should be $i, not $1 in your ping command. But -t is used to set a ping timeout.
According to the man page on my system -R is used to record the route. You might also want to use -c?
This User Gave Thanks to Scott For This Post:
10 More Discussions You Might Find Interesting
1. IP Networking
i need to write a script that can loop through ej.192.162.0.0 to 192.162.0.256
find the ones that are connected and the ones not connected
write the name , ip address and connection status of each one in a file
to later use it in perl to create a web page with the information
thanks guys (1 Reply)
Discussion started by: djbilly
1 Replies
2. Shell Programming and Scripting
need to check on some hosts and send an email if there status changes
I wanna put together a script in bash that will allow me to check the up/down state of a single host via ping
i want it to run in a continuous loop so I can just fire the script and forget about it(dont want cron to drive... (2 Replies)
Discussion started by: zeekblack
2 Replies
3. Shell Programming and Scripting
Hi Gurus
I have a file called /tmp/CMDB which looks like this
serial: 0623AN1208
hostname: server1
model: x4100
assetID: 1234
I am writing a for loop that will go through this file line by line creating a variable of itself. Using the first iteration of the loop (i.e. the first line) as... (6 Replies)
Discussion started by: hcclnoodles
6 Replies
4. Shell Programming and Scripting
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Discussion started by: DeCoTwc
2 Replies
5. Shell Programming and Scripting
Hi,
I am using su within a for loop. As you might expect, it prompts for password during each loop execution. Here is my piece of code:
for i in $LIST
do
if
then
DATABASE=`echo $i | awk -F "|" '{ print $1 }'`
USER_ID=`echo $i | awk -F "|" '{ print $2 }'`
su - apstage -c... (1 Reply)
Discussion started by: sugan
1 Replies
6. Shell Programming and Scripting
Hi all
Sorry for the basic question, but i am writing a shell script to get around a slightly flaky binary that ships with one of our servers. This particular utility randomly generates the correct information and could work first time or may work on the 12th or 100th attempt etc !.... (4 Replies)
Discussion started by: rethink
4 Replies
7. Programming
Hi All
i have an issue with ping, we are using dhcp and so if the machine has been offline and i ping it, i get " ping: unknown host <hostname>
is there a way i can stick a loop somewhere so it would keep trying when it got the unknown host error and then when the machine came back online... (2 Replies)
Discussion started by: ab52
2 Replies
8. Shell Programming and Scripting
Hi All,
Below is the very simple code snippet but it si giving me syntax error
#!/bin/bash
#To ensure If JMS directory exists or not
ServerName=$(hostname)
#To ensure If JMS directory exists or not
echo $ServerName
if ;
then
echo "Inside First If"
if ;
then
echo 'JMS... (4 Replies)
Discussion started by: sharsour
4 Replies
9. UNIX for Dummies Questions & Answers
I'm taking a unix class and need to countdown to 0 from whatever number the user inputs. I know how to do this with a while or until loop but using the for loop is throwing me off....
I know I can use an if-then statement in my for loop but can I include a while loop in my for loop? (3 Replies)
Discussion started by: xxhieixx
3 Replies
10. IP Networking
Running 3650 switch. I have this odd issue where I cannot get 4 new Centos 7 boxes pinging out on public IPs (nor pinging in), only gateway .1 and first public IP .2
This is what I see, which doesn't look normal. How do I fix this?
The server itself is configured fine (Centos 7)
# cat... (0 Replies)
Discussion started by: Bashed
0 Replies
LEARN ABOUT DEBIAN
hobbitping
HOBBITPING(1) General Commands Manual HOBBITPING(1)
NAME
hobbitping - Xymon ping tool
SYNOPSIS
hobbitping [--retries=N] [--timeout=N] [IP-adresses]
DESCRIPTION
hobbitping(1) is used for ping testing of the hosts monitored by the xymon(7) monitoring system. It reads a list of IP adresses from stdin,
and performs a "ping" check to see if these hosts are alive. It is normally invoked by the bbtest-net(1) utility, which performs all of
the Xymon network tests.
Optionally, if a list of IP-adresses is passed as commandline arguments, it will ping those IP's instead of reading them from stdin.
hobbitping only handles IP-adresses, not hostnames.
hobbitping was inspired by the fping(1) tool, but has been written from scratch to implement a fast ping tester without much of the over-
head found in other such utilities. The output from hobbitping is similar to that of "fping -Ae".
hobbitping probes multiple systems in parallel, and the runtime is therefore mostly dependant on the timeout-setting and the number of
retries. With the default options, hobbitping takes approximately 18 seconds to ping all hosts (tested with an input set of 1500 IP
adresses).
SUID-ROOT INSTALLATION REQUIRED
hobbitping needs to be installed with suid-root privileges, since it requires a "raw socket" to send and receive ICMP Echo (ping) packets.
hobbitping is implemented such that it immediately drops the root privileges, and only regains them to perform two operations: Obtaining
the raw socket, and optionally binding it to a specific source address. These operations are performed as root, the rest of the time hob-
bitping runs with normal user privileges. Specifically, no user-supplied data or network data is used while running with root privileges.
Therefore it should be safe to provide hobbitping with the necessary suid-root privileges.
OPTIONS
--retries=N
Sets the number of retries for hosts that fail to respond to the initial ping, i.e. the number of ping probes sent in addition to
the initial probe. The default is --retries=2, to ping a host 3 times before concluding that it is not responding.
--timeout=N
Determines the timeout (in seconds) for ping probes. If a host does not respond within N seconds, it is regarded as unavailable,
unless it responds to one of the retries. The default is --timeout=5.
--responses=N
hobbitping normally stops pinging a host after receiving a single response, and uses that to determine the round-trip time. If the
first response takes longer to arrive - e.g. because of additional network overhead when first determining the route to the target
host - it may skew the round-trip-time reports. You can then use this option to require N responses, and hobbitping will calculate
the round-trip time as the average of all of responsetimes.
--max-pps=N
Maximum number of packets per second. This limits the number of ICMP packets hobbitping will send per second, by enforcing a brief
delay after each packet is sent. The default setting is to send a maximum of 50 packets per second. Note that increasing this may
cause flooding of the network, and since ICMP packets can be discarded by routers and other network equipment, this can cause
erratic behaviour with hosts recorded as not responding when they are in fact OK.
--source=ADDRESS
Use ADDRESS as the source IP address of the ping packets sent. On multi-homed systems, allows you to select the source IP of the
hosts going out, which might be necessary for ping to work.
--debug
Enable debug output. This prints out all packets sent and received.
SEE ALSO
xymon(7), bbtest-net(1), fping(1)
Xymon Version 4.2.3: 4 Feb 2009 HOBBITPING(1)