Created
February 27, 2015 13:45
-
-
Save rpfilomeno/d3210ac2d0682a5ac345 to your computer and use it in GitHub Desktop.
Server Monitoring
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
#watch -n 10 'asterisk -rx "sip show channels" | tail -n 1' | |
# netstat -pln | grep rtpp |
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
# watch -n 2 'netstat | grep https | wc -l' |
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
#netstat -ant | awk '{print $6}' | sort | uniq -c | sort -n | |
1 CLOSING | |
1 established | |
1 FIN_WAIT2 | |
1 Foreign | |
2 CLOSE_WAIT | |
6 FIN_WAIT1 | |
7 LAST_ACK | |
7 SYN_RECV | |
37 ESTABLISHED | |
44 LISTEN | |
297 TIME_WAIT |
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
#wget https://github.com/julmon/pg_activity/archive/master.zip | |
#yum install python-devel python | |
#python setup.py install | |
#sudo -u postgres pg_activity -U postgres | |
#wget https://github.com/zalando/pg_view/archive/master.zip | |
#vi ~/.bashrc | |
TERM=xterm-256color | |
#vi ~/.pgpass | |
localhost:5432:DBname:DBuser:DBpassword | |
#chmod 600 ~/.pgpass | |
#vi /etc/pg_view.conf | |
[DEFAULT] | |
port=5432 | |
[ccloud_db] | |
host=localhost | |
dbname=DBname | |
user=DBUser | |
#chmod +x /usr/local/sbin/pg_view | |
#pg_view -c /etc/pg_view.conf |
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
# yum install epel-release | |
# yum install collectl | |
# collectl -stcm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment