Created
May 20, 2018 10:44
-
-
Save arax/8d256a0773100d7e0572f237b5e77144 to your computer and use it in GitHub Desktop.
Script gathering various internal data for system diagnostics and performance tuning
This file contains 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
#!/bin/bash | |
{ top -n 5 -b > /tmp/top.out; vmstat 1 50 > /tmp/vm.out; iostat -tkx -p ALL 1 10 > /tmp/io.out; mpstat -A 1 10 > /tmp/mp.out; ps auwwx > /tmp/ps1.out; ps axHo %cpu,stat,pid,tid,pgid,ppid,comm,wchan > /tmp/ps2.out; sar -A 1 50 > /tmp/sar.out; free > /tmp/free.out; } | |
tar -cjvf outputs_$(hostname)_$(date +"%d-%b-%Y_%H%M").tar.bz2 /tmp/*.out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment