Skip to content

Cool usage examples

Andrew edited this page Mar 17, 2016 · 2 revisions

shell stdout plotting

If your program periodically prints values to stdout here is a bash one-liner to redirect it to live plot:

<program> | xargs -L1 sh -c 'wget -q -O /dev/null http://plotti.co/YOUR_HASH?d=$0'

memory usage shell script

#!/bin/bash
while true; do 
wget -O /dev/null -q http://plotti.co/YOUR_HASH?d=`free -m | xargs | awk '{ print $16 / $8 * 100 };'`\%mem
sleep 5
done

and of course view http://plotti.co/YOUR_HASH

Clone this wiki locally