Enviar búsqueda
Cargar
serverstats
•
Descargar como DOCX, PDF
•
0 recomendaciones
•
246 vistas
B
Ben De Koster
Seguir
Denunciar
Compartir
Denunciar
Compartir
1 de 4
Descargar ahora
Recomendados
KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
KubeAcademy
Shell Script to Extract IP Address, MAC Address Information
Shell Script to Extract IP Address, MAC Address Information
VCP Muthukrishna
File Space Usage Information and EMail Report - Shell Script
File Space Usage Information and EMail Report - Shell Script
VCP Muthukrishna
Bash Script Disk Space Utilization Report and EMail
Bash Script Disk Space Utilization Report and EMail
VCP Muthukrishna
Unix 5 en
Unix 5 en
Simonas Kareiva
Docker tips & tricks
Docker tips & tricks
Dharmit Shah
clonehd01
clonehd01
Luiz Francisco Bozo
App-o-Lockalypse now!
App-o-Lockalypse now!
Oddvar Moe
Recomendados
KubeCon EU 2016: Custom Volume Plugins
KubeCon EU 2016: Custom Volume Plugins
KubeAcademy
Shell Script to Extract IP Address, MAC Address Information
Shell Script to Extract IP Address, MAC Address Information
VCP Muthukrishna
File Space Usage Information and EMail Report - Shell Script
File Space Usage Information and EMail Report - Shell Script
VCP Muthukrishna
Bash Script Disk Space Utilization Report and EMail
Bash Script Disk Space Utilization Report and EMail
VCP Muthukrishna
Unix 5 en
Unix 5 en
Simonas Kareiva
Docker tips & tricks
Docker tips & tricks
Dharmit Shah
clonehd01
clonehd01
Luiz Francisco Bozo
App-o-Lockalypse now!
App-o-Lockalypse now!
Oddvar Moe
Basicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt application
Dinesh Manajipet
Ruby 1.9
Ruby 1.9
guestaef7ea
Bash Scripting Workshop
Bash Scripting Workshop
Ahmed Magdy Ezzeldin, MSc.
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
Yaroslav Tkachenko
2015 555 kharchenko_ppt
2015 555 kharchenko_ppt
Maxym Kharchenko
我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具
dennis zhuang
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Yasuhiro Asaka
Commit2015 kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko
Crack.ba
Crack.ba
Yance Iyai
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
Dominic Cleal
EC2
EC2
Igor Kapkov
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
dcubeio
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみた
Takeshi Arabiki
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Maarten Mulders
Redis as a message queue
Redis as a message queue
Brandon Lamb
GoLang & GoatCore
GoLang & GoatCore
Sebastian Pożoga
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Rick Copeland
Cis 216 – shell scripting
Cis 216 – shell scripting
Dan Morrill
Using the Command Line with Magento
Using the Command Line with Magento
Matthew Haworth
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
rjsmelo
Shell Script Disk Usage Report and E-Mail Current Threshold Status
Shell Script Disk Usage Report and E-Mail Current Threshold Status
VCP Muthukrishna
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
guoqing75
Más contenido relacionado
La actualidad más candente
Basicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt application
Dinesh Manajipet
Ruby 1.9
Ruby 1.9
guestaef7ea
Bash Scripting Workshop
Bash Scripting Workshop
Ahmed Magdy Ezzeldin, MSc.
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
Yaroslav Tkachenko
2015 555 kharchenko_ppt
2015 555 kharchenko_ppt
Maxym Kharchenko
我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具
dennis zhuang
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Yasuhiro Asaka
Commit2015 kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
Maxym Kharchenko
Crack.ba
Crack.ba
Yance Iyai
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
Dominic Cleal
EC2
EC2
Igor Kapkov
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
dcubeio
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみた
Takeshi Arabiki
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Maarten Mulders
Redis as a message queue
Redis as a message queue
Brandon Lamb
GoLang & GoatCore
GoLang & GoatCore
Sebastian Pożoga
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Rick Copeland
Cis 216 – shell scripting
Cis 216 – shell scripting
Dan Morrill
Using the Command Line with Magento
Using the Command Line with Magento
Matthew Haworth
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
rjsmelo
La actualidad más candente
(20)
Basicsof c make and git for a hello qt application
Basicsof c make and git for a hello qt application
Ruby 1.9
Ruby 1.9
Bash Scripting Workshop
Bash Scripting Workshop
10 tips for making Bash a sane programming language
10 tips for making Bash a sane programming language
2015 555 kharchenko_ppt
2015 555 kharchenko_ppt
我在 Mac 上的常用开发工具
我在 Mac 上的常用开发工具
Gitosis on Mac OS X Server
Gitosis on Mac OS X Server
Commit2015 kharchenko - python generators - ext
Commit2015 kharchenko - python generators - ext
Crack.ba
Crack.ba
Configuration surgery with Augeas (OggCamp 12)
Configuration surgery with Augeas (OggCamp 12)
EC2
EC2
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみた
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Building a DSL with GraalVM (VoxxedDays Luxembourg)
Redis as a message queue
Redis as a message queue
GoLang & GoatCore
GoLang & GoatCore
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Cis 216 – shell scripting
Cis 216 – shell scripting
Using the Command Line with Magento
Using the Command Line with Magento
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
Similar a serverstats
Shell Script Disk Usage Report and E-Mail Current Threshold Status
Shell Script Disk Usage Report and E-Mail Current Threshold Status
VCP Muthukrishna
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
guoqing75
Facebook的缓存系统
Facebook的缓存系统
yiditushe
httpd — Apache Web Server
httpd — Apache Web Server
webhostingguy
Pop3ck sh
Pop3ck sh
Ben Pope
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7
Masahiro Nagano
Capital onehadoopclass
Capital onehadoopclass
Doug Chang
Command
Command
gajshield
Interface de Voz con Rails
Interface de Voz con Rails
Svet Ivantchev
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
ZendCon
Does your configuration code smell?
Does your configuration code smell?
Tushar Sharma
Артем Маркушев - JavaScript
Артем Маркушев - JavaScript
DataArt
Workshop on command line tools - day 2
Workshop on command line tools - day 2
Leandro Lima
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Masahiro Nagano
PHP PPT FILE
PHP PPT FILE
AbhishekSharma2958
Puppet Camp 2012
Puppet Camp 2012
Server Density
Deploying Plone and Volto, the Hard Way
Deploying Plone and Volto, the Hard Way
Asko Soukka
Really useful linux commands
Really useful linux commands
Michael J Geiser
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
Shinya Ohyanagi
Vagrant file samples for various Hadoop distributions
Vagrant file samples for various Hadoop distributions
Akshay Gore
Similar a serverstats
(20)
Shell Script Disk Usage Report and E-Mail Current Threshold Status
Shell Script Disk Usage Report and E-Mail Current Threshold Status
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
Facebook的缓存系统
Facebook的缓存系统
httpd — Apache Web Server
httpd — Apache Web Server
Pop3ck sh
Pop3ck sh
Operation Oriented Web Applications / Yokohama pm7
Operation Oriented Web Applications / Yokohama pm7
Capital onehadoopclass
Capital onehadoopclass
Command
Command
Interface de Voz con Rails
Interface de Voz con Rails
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
Does your configuration code smell?
Does your configuration code smell?
Артем Маркушев - JavaScript
Артем Маркушев - JavaScript
Workshop on command line tools - day 2
Workshop on command line tools - day 2
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
Introduction to CloudForecast / YAPC::Asia 2010 Tokyo
PHP PPT FILE
PHP PPT FILE
Puppet Camp 2012
Puppet Camp 2012
Deploying Plone and Volto, the Hard Way
Deploying Plone and Volto, the Hard Way
Really useful linux commands
Really useful linux commands
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
Vagrant file samples for various Hadoop distributions
Vagrant file samples for various Hadoop distributions
serverstats
1.
#!/bin/bash # serverstats.sh Written
by Ben De Koster # Last modified on 09/05/13 ##Variables HTTPD='/usr/local/apache/conf/httpd.conf' PHP=`php -i | grep php.ini | grep "Configuration" | cut -d ">" -f2 | cut -c 2- | tail -n 1`; PHPVER=`php -i | grep "PHP Version" | awk '{print $4}' | head -n 1`; MYSQL='/etc/my.cnf' IOSTAT=( $(iostat 1 2 | grep iowait -A1 | awk '{print $4}' | grep -v system) ) #Colors Red='e[0;31m' Green='e[0;32m' Blue='e[0;34m' NoColor='e[0m' ##Meat of script #Basic server stats basic() { echo -e "$Greenn=== SERVER STATS ===$NoColorn" echo -e "Host: `hostname`" } #Disk Space disk() { echo -e "$Greenn=== Disk Space Usage ===$NoColorn" df -h } #Currently running mysql queries mysqlproc() { echo -e "$Greenn=== MySQL Database queries ===$NoColorn" mysqladmin proc stat } #Number of messages in the queue and currently running exim procs eximnoqueue() { echo -e "$Greenn=== Exim Stats ===$NoColorn" echo -e "Exim procs: `ps faux | grep exim -c`" } eximwqueue()
2.
{ echo -e "$Greenn===
Exim Stats ===$NoColorn" echo -e "Exim procs: `ps faux | grep exim -c`" echo "Emails in queue: `exim -bpc`" } #For checking for SYN floods. syn() { echo -e "$Greenn=== Number of SYN connections ===$NoColorn" netstat -nap | grep SYN | wc -l echo -e "$Greenn=== Top 10 SYN Flood Conections ===$NoColorn" netstat -tn 2>/dev/null | grep SYN | awk '{print $5}' | cut -f1 -d: | sort | uniq -c | sort -rn | head } #PHP ops php() { echo -e "$Greenn=== PHP Info ===$NoColorn" #echo "PHP version: `php -v | head -n 1 | awk '{print $2}'`" #echo "PHP version: `php -i | grep "PHP Version" | awk '{print $4}'`" echo "PHP version: $PHPVER" echo "PHP handler: `/usr/local/cpanel/bin/rebuild_phpconf --current | grep "PHP5 SAPI:" | awk '{print $3}'`" egrep 'max_execution_time|max_input_time|memory_limit' $PHP | awk '{print $1,$2,$3}' } #Apache statistics apacheproc() { echo -e "$Greenn=== Number of HTTPD Processes ===$NoColorn" ps faux | grep httpd -c | grep -v grep echo -e "$Greenn=== Top 10 connections to port 80 ===$NoColorn" netstat -tn 2>/dev/null | awk '{if ($4 ~ ":80") print $5}'| sed -e 's/::ffff://' | cut -d: - f1 | sort | uniq -c | sort -rn|head } #Current memory usage mem() { echo -e "$Greenn=== Current Memory Usage ===$NoColorn" free -m }
3.
#Apache ops apacheops() { echo -e
"$Greenn=== Apache Configuation ===$NoColorn" echo "Apache version: `httpd -v | grep "Server version" | awk '{print $3}'| cut -d '/' - f2`" echo "Server MPM: `httpd -V | grep MPM_DIR | cut -d '/' -f3 | cut -d '"' -f1`" egrep 'MaxClients|KeepAlive|MaxRequestsPerChild|Timeout|Servers|Threads|ServerLimit ' $HTTPD | egrep -v 'SSL|#' } #MySQL ops and highest historic number of connections since MySQL was last started mysqlops() { echo -e "$Greenn=== MySQL Configuration ===$NoColorn" echo "MySQL Version: `mysql -V | awk '{print $5}' | cut -d',' -f1`" mysqladmin extended-status | grep Max_used_connections | awk '{print $2,$4}' sed -n '/[mysqld]/,/[/p' $MYSQL|grep -v "["|grep "[a-zA-Z0-9]" } #Miscellaneous Stats misc() { echo -e "$Greenn=== Miscellaneous Stats ===$NoColorn" echo "I/O Wait: `echo ${IOSTAT[1]}`" echo "CPUs: `grep proc -c /proc/cpuinfo`" echo "Cpanel Extra CPUs: `grep extracpus /var/cpanel/cpanel.config | cut -d = -f2`" } #To specify what stats you want to run case "$1" in all) basic disk mysqlproc eximnoqueue syn php apacheproc mem apacheops mysqlops misc ;;
4.
apache) basic apacheproc apacheops ;; exim) basic eximwqueue ;; mysql) basic mysqlproc mysqlops ;; syn) basic syn ;; ops) php apacheops mysqlops ;; misc) basic disk mem misc ;; *) echo -e "$RednOops!
Looks like an invalid argument was used. Avaliable options are:" echo -e "$Greennall - display all stats" echo "apache - display apache stats and config" echo "mysql - display mysql stats and config" echo "exim - number of exim procs and messages in queue" echo "syn - number of SYN connections and top 10 IP's making the most SYN connections" echo "ops - display php, apache, and mysql ops" echo -e "misc - miscellaneious stats $NoColor" esac exit 0
Descargar ahora