fping icon indicating copy to clipboard operation
fping copied to clipboard

Feature Request: Regularly Print Full Statistics Since Start

Open auerswal opened this issue 2 years ago • 4 comments

While I think that the current -Q, --squiet=SECS behavior is useful and should kept, I would like to have a variation of this theme, i.e., printing the full statistics that have accumulated so far instead of just those since the last report, optionally available, too.

Current -Q Output:

The current fping -Q1 output looks as follows:

$ fping -Q 1 -p 450 -c 6 127.0.0.1
[19:42:32]
127.0.0.1 : xmt/rcv/%loss = 3/3/0%, min/avg/max = 0.058/0.065/0.076
[19:42:33]
127.0.0.1 : xmt/rcv/%loss = 2/2/0%, min/avg/max = 0.058/0.058/0.059
127.0.0.1 : xmt/rcv/%loss = 6/6/0%, min/avg/max = 0.058/0.062/0.076

Suggested Optional -Q --a-new-option Output:

I would suggest to optionally have the following different output:

$ fping -Q 1 --a-new-option -p 450 -c 6 127.0.0.1
[19:43:59]
127.0.0.1 : xmt/rcv/%loss = 3/3/0%, min/avg/max = 0.059/0.067/0.076
[19:44:00]
127.0.0.1 : xmt/rcv/%loss = 5/5/0%, min/avg/max = 0.058/0.063/0.076
127.0.0.1 : xmt/rcv/%loss = 6/6/0%, min/avg/max = 0.058/0.062/0.076

If used together with the -o, --outage option, this would regularly show the accumulated outage times of hosts during, e.g., network changes.

I have created a proof-of-concept implementation that introduces the new option -F, --full to provide this feature. Adding -F to a command line with -Q does not regularly print interval statistics, but instead regularly prints full statistics (since the start of fping). I'll add a pull request for this proof-of-concept implementation in a moment and add it in a new comment to this issue.

I am open to using different option names, of course.

What do you think?

Best regards, Erik

auerswal avatar Jan 31 '22 18:01 auerswal

Ah, I see that the pull request #244 has been automatically linked to this issue. :-)

auerswal avatar Jan 31 '22 19:01 auerswal

I have closed pull request #244 since there has not been any feedback so far. Perhaps you would like to close the issue as won't fix?

auerswal avatar Jun 08 '23 13:06 auerswal

I like the idea and I would still like the feature to be integrated. I will provide more timely feedback if you re-open or recreate a pull request.

Instead of adding another option, what do you think about extending the syntax of the --squiet option? It could be: --squiet=60,cumulative, for example.

schweikert avatar Apr 20 '24 06:04 schweikert

Extending --squiet to accept an optional keyword to specify the mode seems like a good method to avoid using another short option. I'll look into this.

auerswal avatar Apr 21 '24 12:04 auerswal