Skip to content

Instantly share code, notes, and snippets.

@guimello
Created February 3, 2011 13:57
Show Gist options
  • Save guimello/809493 to your computer and use it in GitHub Desktop.
Save guimello/809493 to your computer and use it in GitHub Desktop.
Log top processes into a csv file.
#!/bin/bash
top -n1b | awk '{print $1","$2","$3","$4","$5","$6","$7","$8","$9","$10","$11","$12","$13}' | tail -n +8 >> /var/log/processes_monitor.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment