![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Searching and extracting text from output | sjday | Shell Programming and Scripting | 3 | 12-07-2007 01:12 AM |
| Extracting fields from an output 8-) | csaha | Shell Programming and Scripting | 6 | 01-20-2006 05:37 AM |
| ICMP Echo-Request | ilmora | UNIX for Advanced & Expert Users | 5 | 10-27-2005 07:09 AM |
| Linux and ICMP timestamp requests. | gerwhelan | Linux | 2 | 10-06-2003 04:44 AM |
| icmp | seccom | IP Networking | 1 | 08-01-2001 10:58 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Extracting ICMP Output for Plotting
Dear,
I want to perform a plotting using xgraph, and the plotting data (ping.txt) is as below. For the graph I just want to plot the time for x-axis (line count) and the RTT for y-axis (time in ms). Below are script i write for that purpose but it seen did not work. Any guide for me because i think the script is wrong. The example of plot is about like this: ping.txt ------------------------------------------------------------- 64 bytes from 192.168.1.100: icmp_seq=0 ttl=255 time=0.712 ms 64 bytes from 192.168.1.100: icmp_seq=1 ttl=255 time=0.620 ms 64 bytes from 192.168.1.100: icmp_seq=2 ttl=255 time=0.698 ms 64 bytes from 192.168.1.100: icmp_seq=3 ttl=255 time=0.662 ms 64 bytes from 192.168.1.100: icmp_seq=4 ttl=255 time=0.649 ms ------------------------------------------------------------- Quote:
----------------- 1 0.712 2 0.620 3 0.698 4 0.662 5 0.649 ----------------- |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
I have a feeling that this is not all you need - but anyway:
Code:
$ cat ping.txt
64 bytes from 192.168.1.100: icmp_seq=0 ttl=255 time=0.712 ms
64 bytes from 192.168.1.100: icmp_seq=1 ttl=255 time=0.620 ms
64 bytes from 192.168.1.100: icmp_seq=2 ttl=255 time=0.698 ms
64 bytes from 192.168.1.100: icmp_seq=3 ttl=255 time=0.662 ms
64 bytes from 192.168.1.100: icmp_seq=4 ttl=255 time=0.649 ms
$
$ awk '{split($7,a,"="); print NR, a[2];}' ping.txt
1 0.712
2 0.620
3 0.698
4 0.662
5 0.649
|
||||
| Google The UNIX and Linux Forums |