Last active
April 20, 2017 15:55
-
-
Save phpdave/8ea588268f2b586c90fc4af9504f2f90 to your computer and use it in GitHub Desktop.
Revisions
-
phpdave revised this gist
Apr 20, 2017 . 1 changed file with 17 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,23 @@ echo Start $(date '+%Y %b %d %H:%M:%S') $HOSTNAME ps aux | awk '{print $3;}' | awk '{total += ($1) ;} END {print total " % of CPU Used by All Processes";}' ps aux | awk '{print $4;}' | awk '{total += ($1) ;} END {print total " % of Memory used by ALL Processes";}' ps aux | grep 'httpd' | awk '{print $3;}' | awk '{total += ($1) ;} END {print total " % of CPU Used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $4;}' | awk '{total += ($1) ;} END {print total " % of Memory used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{total += ($1) ;} END {print total " MB used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB used on average per Apache process";}' ps -C httpd --no-headers | wc -l | awk '{print $0 " apache processes ";}' echo '---CPU and IO Usage sar -P ALL 1 5 | grep average---' #sar 1 5 sar -P ALL 1 5 | grep 'Average' echo '---Memory Usage sar -r 1 5 | grep average---' sar -r 1 5 | grep -w 'Average\|kbmemfree' echo '---Swap Space Used---' sar -S 1 5 | grep -w 'Average\|kbswpused' echo '---Content Switches---' sar -w 1 5 echo '---Run Queue and Load Average---' sar -q 1 3 echo '---Network Stats---' sar -n ALL echo End $(date '+%Y %b %d %H:%M:%S') -
phpdave revised this gist
Apr 20, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ ps aux | awk '{print $3;}' | awk '{total += ($1) ;} END {print total " % of CPU Used by All Processes";}' ps aux | awk '{print $4;}' | awk '{total += ($1) ;} END {print total " % of Memory used by ALL Processes";}' ps aux | grep 'httpd' | awk '{print $3;}' | awk '{total += ($1) ;} END {print total " % of CPU Used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $4;}' | awk '{total += ($1) ;} END {print total " % of Memory used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{total += ($1) ;} END {print total " MB used by Apache Processes";}' -
phpdave revised this gist
Apr 20, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ ps aux | grep 'httpd' | awk '{print $3;}' | awk '{total += ($1) ;} END {print total " % of CPU Used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $4;}' | awk '{total += ($1) ;} END {print total " % of Memory used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{total += ($1) ;} END {print total " MB used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB used on average per Apache process";}' ps -C httpd --no-headers | wc -l | awk '{print $0 " apache processes ";}' -
phpdave revised this gist
Apr 20, 2017 . No changes.There are no files selected for viewing
-
phpdave created this gist
Apr 20, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{total += ($1) ;} END {print total " MB used by Apache Processes";}' ps aux | grep 'httpd' | awk '{print $6/1024;}' | awk '{avg += ($1 - avg) / NR;} END {print avg " MB used on average per Apache process";}' ps -C httpd --no-headers | wc -l | awk '{print $0 " apache processes ";}'