-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Please add a (n)oping option to ping all IP addresses (i.e. both, IPv4 and IPv6) for given hostnames #52
Comments
Actually, in hexadecimal, |
Since this is something I wanted as well, I have a patch for this :-) - octo seems to be quite busy so it did not get review yet. I'll do a repo-clone-and-pullreq, so you can have a look and test... |
Rebased to master, polished, split functionality into "multiping" and "canonify output hostnames" - we're using this internally since half a year, so it's generally working (on FreeBSD). It would be cool if people could test this - then I'll do a PR so we can get this merged, hopefully :-) https://github.com/cron2/liboping/ has the change, in the "multiping" branch. |
Sounds like a great feature! Could you create a PR, @cron2? That would make it easier to test and review. Personally I would find Best regards, |
I'll rework what I have a bit and open a PR later today. What I have now modifies the behaviour of ping_host_add() but neglects to update the manpage... I think I will add a ping_host_add_multiple() which takes a "max_hosts" argument - controlled by "-a" - and "ping_host_add()" will then become a wrapper for "ping_host_add_multiple( ... , 1)" with the existing calling convention. And, man page :-) |
Hi, yay on progress here! :-)
Thanks to @cron2 for providing an implementation.
Fine for me. :-)
Why would this be needed? Will the default be changed? |
Since this still didn't make it into liboping proper and hence won't be part of the upcoming Debian 11 Bullseye Stable release, I wrote my own wrapper around |
Sorry about that! Would have been happy to cherry-pick that into the library if someone had poked me.
|
Nah, don't worry. I actually would like to see this in liboping proper, not just cherry-picked in Debian. (I actually also have to use other Linux distributions...) |
A very common noping use case for me is to check when a server comes up after reboot. For that I want to check both, IPv4 and IPv6 addresses of the same host, i.e. for the same hostname.
Currently I do this like this:
noping $(host someserver.example.org | sed -e 's/^.* address //')
It would be nice if noping would have an option to ping all IP addresses a hostname resolves, too, especially A and AAAA records. I suggest to use
-5
as it is between-4
and-6
, but-a
or-A
would be fine as well. Would then look like this:noping -5 someserver.example.org
I guess oping itself (which I nearly never use) should get the same option, too.
The text was updated successfully, but these errors were encountered: