Created
December 5, 2011 14:06
-
-
Save jaymzcd/1433676 to your computer and use it in GitHub Desktop.
log uptime via bash, plot results via pylab
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Bash command in a loop: | |
| while true; do uptime >> /tmp/uptime.log; sleep 5; done | |
| # Use awk to strip it out and grab 1min figure | |
| awk -F\ '{print $9}' la.txt | tr "," " " > uptime_1min.csv | |
| # In pylab (via:) run: | |
| ipython --pyab | |
| d = numpy.genfromtext('uptime_1min.csv') | |
| plot(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment