How to hide "icmp_seq" from ping?

Issues related to configuring your network
Post Reply
Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

How to hide "icmp_seq" from ping?

Post by Kunwar » 2016/05/18 18:25:25

I am trying to setup my server to ping two computer with time stamp so I can check the ping stats later against any event... and since this ping request will be running for weeks I want to hide "icmp_seq" cuz it will grow to a very large number is few days. I tried searching the manual but found nothing helpful.... how will it be done?

so far I have been successful in catching the result of the ping though some bash scripting but I am not sure how to remove the particular part that I want to omit.

Code: Select all

ping localhost | while read row; do echo $row ;done
ping localhost | while read row; do { echo "${row%: *}" ;} done
Last edited by Kunwar on 2016/05/18 19:23:10, edited 2 times in total.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: How to hide "icmp_seq" from ping?

Post by gerald_clark » 2016/05/18 18:30:26

Just run "ping -c othersite >> mylogfile" every minute, or 10 seconds, or whatever is most useful.

Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Re: How to hide "icmp_seq" from ping?

Post by Kunwar » 2016/05/18 18:46:47

I cant do it this way cuz I want to keep it live as well but thanks for the suggestion.

User avatar
TrevorH
Forum Moderator
Posts: 28089
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: How to hide "icmp_seq" from ping?

Post by TrevorH » 2016/05/18 19:19:39

If you're looking for missing packets then the icmp_seq is sort of essential to see which ones were dropped.

Sounds more like you're trying to reinvent mtr
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Kunwar
Posts: 55
Joined: 2014/08/28 23:21:43

Re: How to hide "icmp_seq" from ping?

Post by Kunwar » 2016/05/18 19:24:03

You got a point... I think I shouldn't be doing it.

Post Reply

Return to “CentOS 7 - Networking Support”