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

Pruning old data with histograms #29

Closed
vladimiroltean opened this issue Feb 2, 2017 · 7 comments
Closed

Pruning old data with histograms #29

vladimiroltean opened this issue Feb 2, 2017 · 7 comments

Comments

@vladimiroltean
Copy link

Hi,
I'm plotting the ping rtt with a command similar to this:
sudo ping -A 172.15.0.3 -D | gawk '$4=="from" && $8~/time=/ && $9=="ms" {gsub(/[\[#\]]/, "", $1); gsub("time=", "", $8); print $1, $8; fflush()}' | feedgnuplot --domain --stream --lines --histogram 0 --binwidth 0.001 --histstyle freq--style 0 "linewidth 2"

This works as expected, but it clogs down at some point because it's keeping all old data.
If I add "--xlen 10", gnuplot complains:

gnuplot> plot '-' using (histbin($2)):(1.0) smooth freq notitle linewidth 2
^
line 30480: all points y value undefined!

Am I misunderstanding the functionality? Is this a bug?

Thanks,
Vladimir

@dkogan
Copy link
Owner

dkogan commented Feb 2, 2017 via email

@vladimiroltean
Copy link
Author

Yes, this is all I'm trying to achieve.

@dkogan
Copy link
Owner

dkogan commented Feb 3, 2017 via email

@vladimiroltean
Copy link
Author

Ok thanks for the answer. For the moment I may work around the issue by using an external program to generate the histograms.

@dkogan
Copy link
Owner

dkogan commented Feb 10, 2017

I made a few updates and this should now work with the sources in master. Look at the example in the manpage.

@dkogan dkogan closed this as completed Feb 10, 2017
@vladimiroltean
Copy link
Author

Thanks for taking the time to implement this.
If I had to nitpick, I'd say that for histograms, --xmin and --xmax have a usefulness of their own, so they shouldn't be mutually exclusive with --xlen. For example, I'd like to be able to trim the histogram to only show rtt times between 0-20ms, and group all the out-of-range values in the first/last bin.

@dkogan
Copy link
Owner

dkogan commented Feb 10, 2017

You're not nitpicking at all. Thanks for the comment; I've pushed a fix. This is a set of features that I haven't been using together so there's untested logic, and I'm glad people are pointing out the deficiencies.

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

No branches or pull requests

2 participants