-
Notifications
You must be signed in to change notification settings - Fork 37
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
Comments
Vladimir Oltean <[email protected]> writes:
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?
Hi. I'm not totally sure what you're trying to do, so can't comment on
whether it is a bug or not. You want a histogram of ping round-trip
timings, and you want it to update as you get more data. Is that ALL you
want, or you want other stuff overlaid on top of this histogram?
|
Yes, this is all I'm trying to achieve. |
Vladimir Oltean <[email protected]> writes:
Yes, this is all I'm trying to achieve.
I see. You were doing something more complex than what you needed. An
updating histogram:
ping -A -D 8.8.8.8 | gawk '$4=="from" && $8~/time=/ && $9=="ms" {gsub(/[\[#\]]/, "", $1); gsub("time=", "", $8); print $8; fflush()}' | feedgnuplot --stream --histogram 0 --binwidth 0.1
Admittedly, the interaction of histograms with other options isn't good,
and more error checking should be added. Currently there's no support of
an "xlen" option to make a moving-window type plot for histograms. The
invocation you gave should have given a useful error message or
something. It would be good to add, but it's not there no. If you send
me a patch, we can talk about it :)
|
Ok thanks for the answer. For the moment I may work around the issue by using an external program to generate the histograms. |
I made a few updates and this should now work with the sources in master. Look at the example in the manpage. |
Thanks for taking the time to implement this. |
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. |
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:
Am I misunderstanding the functionality? Is this a bug?
Thanks,
Vladimir
The text was updated successfully, but these errors were encountered: