Sponsored Content
Full Discussion: Ping response
Operating Systems AIX Ping response Post 302462419 by shockneck on Thursday 14th of October 2010 07:26:27 AM
Old 10-14-2010
Quote:
Originally Posted by vjm
[...]ping time=0.120ms

how we can achive this in aix. i need this for a latency check.[...]
You can combine ping with tcpdump which returns fine timestamps. Example:
Code:
(0)aserver:/home/root 6# tcpdump -i en0 ip proto \\icmp and host 192.168.100.>
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type 1, capture size 96 bytes
13:02:52.362347 IP aserver > remotebox: icmp 64: echo request seq 229
13:02:52.362575 IP remotebox > aserver: icmp 64: echo reply seq 229
13:02:53.362751 IP aserver > remotebox: icmp 64: echo request seq 230
13:02:53.362981 IP remotebox > aserver: icmp 64: echo reply seq 230
13:02:54.363136 IP aserver > remotebox: icmp 64: echo request seq 231
13:02:54.363449 IP remotebox > aserver: icmp 64: echo reply seq 231
13:02:55.364265 IP aserver > remotebox: icmp 64: echo request seq 232
13:02:55.364501 IP remotebox > aserver: icmp 64: echo reply seq 232

45 packets received by filter
0 packets dropped by kernel
(0)aserver:/home/root 7#

Use the two timestamps of the packets that share same sequence number to calculate round trip time. A granularity of six digits behind the full second should be good enough (as long as you do not work with HPC stock trading apps Smilie )
This User Gave Thanks to shockneck For This Post:
 

8 More Discussions You Might Find Interesting

1. SCO

Slow cd response

Hi All We have one SCO Server here and it never gives us any trouble. Until Now!! Well its not earth shattering but we have one user who is complaining of a very slow response time when changing to his Home Directory. Other users who have similar profiles are OK. I have su'd to this user and I can... (0 Replies)
Discussion started by: JohnOB
0 Replies

2. Shell Programming and Scripting

testing ping response

Hi! I'm trying to create a script for seeing if a host is alive, and depending on the ammount of packet loss, send an mail+sms to warn if the host seems to be dead. The script i'm trying to use is: pinger () { ping_stat=`ping -c 4 host.name | grep loss | awk '{print $7}'` echo "Packet... (18 Replies)
Discussion started by: noratx
18 Replies

3. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

Hi, I develop simple animation ping script on Solaris Platform. It is like Cisco ping. Examples and source code are below. bash-3.00$ gokcell 152.155.180.8 30 Sending 30 Ping Packets to 152.155.180.8 !!!!!!!!!!!!!.!!!!!!!!!!!!!!!. % 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies

4. UNIX for Dummies Questions & Answers

Ping + timestamp + selected response

Hello All, i would like to start ping command and the result should contain also Timestate. this i'm able to do with following command : ping HOSTNAME | perl -nle 'print scalar(localtime), " ", $_' or ping HOSTNAME | awk '/time\=(+\.{2}) ms /^+ bytes from / { "date" | getline pong;... (1 Reply)
Discussion started by: ob3l1x
1 Replies

5. Shell Programming and Scripting

How to get reason for ping failure using perls Net::Ping->new("icmp");?

Hi I am using perl to ping a list of nodes - with script below : $p = Net::Ping->new("icmp"); if ($p->ping($host,1)){ print "$host is alive.\n"; } else { print "$host is unreacheable.\n"; } $p->close();... (4 Replies)
Discussion started by: tavanagh
4 Replies

6. Shell Programming and Scripting

Ping Response from the host name

Hi All, I have the requirement where am pinging the server and matching the IP address with the existing IP address. Below code is returning me the IP address and my requirement is i have to see that also whether it is pinging or not PING useipapd01 (172.22.32.87) 56(84) bytes of data. 64... (1 Reply)
Discussion started by: sharsour
1 Replies

7. Red Hat

Response Times

Hello all. Let me qualify my question by saying that I am struggling with how to ask the question I am semi green but have no issue reading up if pointed in the right direction. Please be gentle! A RHEL server 6.2. Hosts a statistical application that has some web apps and batch programming... (0 Replies)
Discussion started by: rsheikh01
0 Replies

8. Programming

Ping test sends mail when ping fails

help with bash script! im am working on this script to make sure my server will stay online, so i made this script.. HOSTS="192.168.138.155" COUNT=4 pingtest(){ for myhost in "$@" do ping -c "$COUNT" "$myhost" &&return 1 done return 0 } if pingtest $HOSTS #100% failed... (4 Replies)
Discussion started by: mort3924
4 Replies
HTTPING(1)						      General Commands Manual							HTTPING(1)

NAME
httping - measure the lateceny and throughput of a webserver SYNOPSIS
httping [options] options: [-g url] [-h hostname] [-p portnumber] [-x proxyhost:port] [-c count] [-i interval] [-t timeout] [-s] [-G] [-b] [-L xferlimit] [-X] [-l] [-z] [-f] [-m] [-o rc,...] [-e string] [-I useragent string] [-R referer string] [-r] [-n warn,crit] [-N mode] [-q] [-V] DESCRIPTION
The program httping lets you measure the latency of a webserver. Since version 1.0.6 also the throughput can be measured. OPTIONS
-g url This selects the url to probe. E.g.: http://localhost/ -h hostname Instead of '-g' one can also set a hostname to probe with -h: -h localhost -p portnumber -p can be used together with -h. -p selects the portnumber to probe. -x proxyhost:port] Probe using a proxyserver. Note that you're also measuring the latency of the proxyserver! -c count How many probes to send before exiting. -i interval How many seconds to sleep between every probe sent. -t timeout How long to wait for answer from the other side. -S Split measured latency in time to connect and time to exchange a request with the HTTP server. -s When a successfull transaction was done, show the HTTP statuscode (200, 404, etc.). -G Do a GET request instead of a HEAD request: this means that also the complete page/file must be transferred. Note that in this case you're no longer measuring the latency! -b Use this switch together with '-G'. When this option is used, the transferspeed (in KB/s) is shown. -B Use this switch together with '-G'. Ask the HTTP server to compress the returned data: this will reduce the influence of the band- width of your connection while increasing the influence of the processorpower of the HTTP server. -L x Use this switch together with '-G'. Limit the amount of data transferred to 'x'. Note that this only affects the content of the page/file and not the headerdata. -X Use this switch together with '-G'. For each "ping" show the amount of data transferred (excluding the headers). -l Connect using SSL: for this to work you need to give a 'https'-url or a 443 portnumber. -z When connecting using SSL, display the fingerprint of the X509 certificate(s) of the peer. -a Audible ping -f Flood ping: do not sit idle between each ping but ping as fast as the computer and network allow you to. -m Show machine readable output (also check '-o' and '-e'). -o x,x,... This selects the HTTP status-codes which are regarded as an OK-state. -e str When the status-code differs from the ones selected with '-o', the given string is displayed. -I str UserAgent-string to send to the webserver (instead of 'HTTPing <version>'). -R str Referer-string to send to the webserver. -r Only resolve the hostname once: this takes the resolving out of the loop so that the latency of the DNS is not measured. Also use- full when you want to measure only 1 webserver while the DNS returns a different ip-address for each resolve ('roundrobin'). -n warn,crit Switches HTTPing to Nagios-plugin mode 1: return exitcode '1' when the average response time is bigger then 'warn', return exitcode '2' when the the average response time is bigger then 'crit'. In all other cases return exitcode '0'. -N x Switches HTTPing to Nagios-plugin mode 2: return 0 when everything is fine, 'x' when anything fails. E.g.: 1 => Nagios warning state, 2 => Nagios critical state. -q Be quiet, only return an exit-code. -A,U,P Activate the basic authentication, Username follow the -U, Password the -P. -V Show the version and exit. KEYS
Press <CTRL> + <c> to exit the program. It will display a summary of what was measured. EXAMPLES
httping -g http://localhost/ Ping the webserver on host 'localhost'. httping -h localhost -p 1000 Ping the webserver on host 'localhost' and portnumber 1000. httping -l -g https://localhost/ Ping the webserver on host 'localhost' using an SSL connection. httping -g http://localhost/ -A -U username -P password Ping the webserver on host 'localhost' using the Basic HTTP Authentication. BUGS
None. This program is totally bug-free. SEE ALSO
http://www.vanheusden.com/httping/ NOTES
This page describes httping as found in the httping-1.0.8 package; other versions may differ slightly. Please mail corrections and addi- tions to folkert@vanheusden.com. Report bugs in the program to folkert@vanheusden.com. Consider using PGP. My PGP key-id is: 0x1f28d8ae httping 2005-11 HTTPING(1)
All times are GMT -4. The time now is 10:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy