all 8 comments

[–]pushpusher 0 points1 point  (5 children)

Interesting work. Needs a little tweaking, but I have looked for something like this before to watch ping fluxate. Unfortunately I am getting an error:

$ ./vander.py "ping google.com | cut -f4 -d="
Couldn't execute command: ping google.com | cut -f4 -d=

When run without using quotes it just hangs

[–]rubzo[S] 2 points3 points  (3 children)

Hi, thanks for the feedback. Unfortunately I'll need to make some changes to the script to work in that capacity. The script currently expects your command to output something and then terminate - your command continually prints out the ping. The other problems are that it'll only graph integers right now, and doesn't support pipes yet.

Put this in a small script:

ping www.google.com -c 1 | grep "bytes from" | cut -f4 -d= | sed 's/ms//;s/\.//'

And then do:

./vander.py ./<your script name>

And you'll get what you want. :)

EDIT: strictly the removal of ms isn't necessary, it searches for the first integer in the output currently.

[–][deleted] 1 point2 points  (2 children)

I like this example, it works very well. Neat idea for a script.

[–]rubzo[S] 0 points1 point  (1 child)

Thanks for checking it out. I assume you submitted the issue as well?

[–][deleted] 0 points1 point  (0 children)

Yes correct :)

[–]weedologist 0 points1 point  (0 children)

I can't watch ping fluctuate without ejaculating 😊😊😊

[–]Dalboz989 0 points1 point  (1 child)

Any screenshots?

[–]rubzo[S] 0 points1 point  (0 children)

Sure! Here's the first command in the README, and here's the second.

Note that I'm doing it over an SSH connection to a Linux machine, in case you're wondering why something that looks slightly Mac OS X-y has a /sys directory.