Advertisement
metalx1000

Plotting data in the shell with ttyplot - Graphing

Nov 6th, 2022
1,628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.53 KB | None | 0 0
  1. #ping time plot
  2. ping filmsbykris.com | sed -u 's/^.*time=//g'|ttyplot -t "Pings" -u ms
  3. ping 8.8.8.8 | sed -u 's/^.*time=//g'|ttyplot -t "Pings" -u ms
  4. ping 192.168.1.1 | sed -u 's/^.*time=//g'|ttyplot -t "Pings" -u ms
  5. ping 192.168.1.1 | sed -u 's/^.*time=//g'|ttyplot -t "Pings" -u ms -s 5
  6.  
  7. #monitor free memory
  8. while [ 1 ];do free -h|grep "^Mem"|awk '{print $3}';sleep 1;done|ttyplot
  9.  
  10. #daily FPL power usage
  11. cat fpl_data_daily_2020.json|jq .|grep kwhUsed|awk '{print $2}'|tr -d ","| TERM=vt100 ttyplot -t "Power Usage 2020" -u kwh
  12.  
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement