Skip to content

Instantly share code, notes, and snippets.

@rpfilomeno
Created February 27, 2015 13:45
Show Gist options
  • Save rpfilomeno/d3210ac2d0682a5ac345 to your computer and use it in GitHub Desktop.
Save rpfilomeno/d3210ac2d0682a5ac345 to your computer and use it in GitHub Desktop.
Server Monitoring
#watch -n 10 'asterisk -rx "sip show channels" | tail -n 1'
# netstat -pln | grep rtpp
# watch -n 2 'netstat | grep https | wc -l'
#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
#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
# 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