Skip to content

Instantly share code, notes, and snippets.

@sclarson
Created January 28, 2016 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sclarson/856a6cbde0b982fcd62c to your computer and use it in GitHub Desktop.
Save sclarson/856a6cbde0b982fcd62c to your computer and use it in GitHub Desktop.
Snapshot some information on a linux server to establish a baseline in a really basic way
#!/bin/bash
EXT=`date +%H%M%S`
DAY=`date +%d`
mkdir -p ~/psaux
DIR="~/psaux/$DAY"
mkdir -p $DIR
free -m > $DIR/free.$EXT
ps aux > $DIR/ps.$EXT
top -n 1 -b > $DIR/top.$EXT
iostat -xm -p sda 3 3 > $DIR/iostat.$EXT
vmstat 5 3 > $DIR/vmstat.$EXT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment