Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print cumulative stats with -Q SECS,cumulative #315

Merged
merged 1 commit into from
May 8, 2024

Conversation

auerswal
Copy link
Collaborator

With -Q SECS, fping emits information for the just finished interval. This is good for long-running fping processes where one would like to get an update on recent results, ignoring missing responses from older intervals. This seems appropriate for use with other software like netdata or smokeping.

But for short(er)-running fping processes, e.g., during a change window, it may be more interesting to get a status update since the beginning of the change window, i.e., the start of fping. Adding a comma followed by the keyword "cumulative" to -Q SECS (i.e., -Q SECS,cumulative) changes the interim reports to output the current per system overall statistics, unless -N is used, too.

The new syntax is documented in fping.pod and added to fping -h output.

Four tests are added:

  1. Characters after SECS are ignored as before.
  2. Unknown keywords are ignored as before.
  3. Adding ",cumulative" changes -Q output.
  4. Adding ",cumulative" also affects the additional -o output.

This addresses issue #243.

With -Q SECS, fping emits information for the just finished
interval.  This is good for long-running fping processes where
one would like to get an update on recent results, ignoring
missing responses from older intervals.  This seems appropriate
for use with other software like netdata or smokeping.

But for short(er)-running fping processes, e.g., during a change
window, it may be more interesting to get a status update since
the beginning of the change window, i.e., the start of fping.
Adding a comma followed by the keyword "cumulative" to -Q SECS
(i.e., -Q SECS,cumulative) changes the interim reports to output
the current per system overall statistics, unless -N is used, too.

The new syntax is documented in fping.pod and added to fping -h
output.

Four tests are added:

  1. Characters after SECS are ignored as before.
  2. Unknown keywords are ignored as before.
  2. Adding ",cumulative" changes -Q output.
  3. Adding ",cumulative" also affects the additional -o output.

This addresses issue schweikert#243.
@coveralls
Copy link

Coverage Status

coverage: 84.886% (+0.1%) from 84.768%
when pulling 62e60b5 on auerswal:cumulative_stats
into 0d08321 on schweikert:develop.

@schweikert schweikert merged commit 90ad83f into schweikert:develop May 8, 2024
9 checks passed
@auerswal
Copy link
Collaborator Author

auerswal commented May 9, 2024

Thanks!

@auerswal auerswal deleted the cumulative_stats branch May 9, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants