Results 1 to 8 of 8
Hi,
Does anyone know how to keep linux from printing "ICMP Host Unreachable from x.x.x.x for ICMP Echo ...." whenever I try to ping/fping a host that isn't reachable for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-15-2005 #1Just Joined!
- Join Date
- Oct 2005
- Location
- N.H., USA
- Posts
- 6
suppressing "ICMP Host Unreachable" messages when using ping/fping
Hi,
Does anyone know how to keep linux from printing "ICMP Host Unreachable from x.x.x.x for ICMP Echo ...." whenever I try to ping/fping a host that isn't reachable for some reason? I say "linux" because I don't think it's the actual ping or fping application that's printing the messages. If anyone knows for sure what component of the operating system is printing them (or if it really is the ping application), please tell me.
Note that my question is not "why are these messages printed" or "what do they mean". I just don't want to see them. They're a pain because they're printed to stderr and there's no convenient way to suppress them or redirect them (I don't want to have to redirect them each and every time, and in a script that writes to a file they end up popping up on the tty (unless I redirect them)... grrrr.)
Thank you!
- 01-05-2006 #2Just Joined!
- Join Date
- Oct 2005
- Location
- N.H., USA
- Posts
- 6
No takers? Wow, I'm surprised this hasn't bother anyone else just as much. Must be me.
- 08-02-2006 #3Just Joined!
- Join Date
- Aug 2006
- Posts
- 1
The "ICMP Host Unreachable from x.x.x.x for ICMP Echo ...." messages are error messages, so you could redirect stderr to /dev/null like this:
fping < pinghosts.txt 2>/dev/null
- 09-27-2007 #4Just Joined!
- Join Date
- Oct 2005
- Location
- N.H., USA
- Posts
- 6
Thanks for the reply. Yes, that's what I do when I really need to, but it's not all that convenient, especially for something that I use so frequently.
- 09-27-2007 #5
So create an alias.
Why do you want to suppress icmp host unreachable messages? I would think that'd be important info.
- 09-27-2007 #6
I'm sure the messages are generated by the application
and not the OS, so your ultimate strategy would be to get
the source code, modify it and compile your own custom
version.
- 06-08-2012 #7Just Joined!
- Join Date
- Oct 2005
- Location
- N.H., USA
- Posts
- 6
@rcgreen - what makes you sure of this?
- 06-08-2012 #8forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Guys, this thread is approaching 7 years old so I'm going to close it, but please feel free to start fresh threads if you are having any issues with Linux.
Thank you.oz



