Necessary commands (tips) to tune apache
To search in the current directory and all sub directories for a file named httpd.conf
find . -name “httpd.conf” -print
To find some string or text, type
find . -exec grep “MaxClients” ‘{}’ \; -print
This command will search in the current directory and all sub directories. All files that contain the string with the path.
If you want to just find each file then pass it on for processing use the -q grep option. This finds the first occurrance of the search string. It then signals success to find and find continues searching for more files.
find . -exec grep -q “www.athabasca” ‘{}’ \; -print
Send 1000 Request to apache using apache benchmark
ab -n 1000 -c 200 -k YOUR_URL
To view error log of httpd. type
grep -i maxclient /var/log/httpd/error_log*
To view Process status type and load average type top and uptime respectively.
To open a file and search something(Here Example is: MaxClients) from there type
vi +/MaxClients /etc/httpd/conf/httpd.conf
To view total memory used by httpd, type
ps -ylC httpd –sort:rss
Posted on July 25th, 2009 by Denie
Filed under: Apache, BASH, Linux, Tutorials




















































Leave a Reply