Closed danielhoherd closed 3 years ago
Looking at the ping man page - this is associated with SIGQUIT: https://linux.die.net/man/8/ping
When the specified number of packets have been sent (and received) or if the program is terminated with a SIGINT, a brief summary is displayed. Shorter current statistics can be obtained without termination of process with signal SIGQUIT.
In a Linux bash terminal - this is done by doing Ctrl + 4
or if you want to see this on all ping sessions: killall -QUIT ping
Basic fping with many hosts reports the status of those hosts. What should it show? The stats (-s) from fping takes quite a bit of space, is this what is expected or something else?
Actually ctrl-4 is exactly what I wanted. Thanks!
It's probably worth pointing out that in ping
, ctrl-4 exits, but ctrl-t continues.
Looking again today, the experience I am having is that when I press ctrl-4 fping
just quits and core dumps: ^\Quit (core dumped)
. Seems like ctrl-t (show stats and continue operating) would still be useful.
Edit: looking a bit more, I am seeing differences between homebrew bash and ubuntu linux bash, mainly that ctrl-4
and ctrl-T
are functioning differently in fping
and ping
. stty -a
shows that macOS has status = ^T;
but I don't see anything like that in linux, or anything listed for ^T
or ^4
, so it seems like that's not a complete view of control sequences.
Some commands, including
ping
, implement handling of SIGINFO as a way to trigger an informational message about the command without interrupting it. I would love to seefping
handle this.Ping example:
I think it would make sense for SIGINFO to trigger the same info as the final output summary.