Last active
April 25, 2019 06:56
-
-
Save thecancerus/c4c10e966ac6bb04cc7191994e809bc1 to your computer and use it in GitHub Desktop.
monitor aux
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
#!/usr/bin/env bash | |
# Back up Script to Daily Full Backups | |
# Source: | |
# Author: Amit | |
DAY=$(date +"%Y%m%d-%H%M") | |
DAY2=$(date +"%Y%m%d") | |
DAY3=$(date +"%Y%m") | |
mkdir -p /var/log/psx/$DAY3/$DAY2 | |
ps aux > /var/log/psx/$DAY3/$DAY2/top$DAY.txt | |
pstree > /var/log/psx/$DAY3/$DAY2/tree$DAY.txt | |
free -mh > /var/log/psx/$DAY3/$DAY2/free$DAY.txt | |
#mysql -e 'show processlist\G' > /var/log/psx/sql$DAY.txt | |
top -b -n 1 > /var/log/psx/$DAY3/$DAY2/toporg$DAY.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment