Apache/performance: Difference between revisions
correction |
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight" |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
To get statistics, you'll need to potentially modify your Apache configuration. For Ubuntu, it's as easy as <code>a2enmod status</code> (and reload the server with <code>service apache2 reload</code>) | To get statistics, you'll need to potentially modify your Apache configuration. For Ubuntu, it's as easy as <code>a2enmod status</code> (and reload the server with <code>service apache2 reload</code>) | ||
=== Cli === | === Cli === | ||
< | <syntaxhighlight lang='bash'> | ||
# Using wget isn't advised because you'll get html output. However, if you simply append the ?auto querystring, you'll get machine readable output. | # Using wget isn't advised because you'll get html output. However, if you simply append the ?auto querystring, you'll get machine readable output. | ||
wget http://localhost/server-status -O - | wget http://localhost/server-status -O - | ||
| Line 10: | Line 10: | ||
# Older/RedHat | # Older/RedHat | ||
apachectl fullstatus | apachectl fullstatus | ||
</ | </syntaxhighlight> | ||
Or you can edit <code>/mods.enabled/status</code> to get it from the browser. For a machine readable, condensed version, just append the '''auto''' querystring argument: | Or you can edit <code>/mods.enabled/status</code> to get it from the browser. For a machine readable, condensed version, just append the '''auto''' querystring argument: | ||
| Line 17: | Line 17: | ||
== Killing Stuck Processes == | == Killing Stuck Processes == | ||
[http://giantdorks.org/alain/script-to-individually-terminate-stuck-web-server-threads-without-restarting-apache/ This script from Alain Kelder] shows how you can identify and kill long-running processes without restarting Apache. I ran into this problem with a misbehaving Mantis plugin. | [http://giantdorks.org/alain/script-to-individually-terminate-stuck-web-server-threads-without-restarting-apache/ This script from Alain Kelder] shows how you can identify and kill long-running processes without restarting Apache. I ran into this problem with a misbehaving Mantis plugin. | ||
< | <syntaxhighlight lang="bash"> | ||
#/bin/bash | #/bin/bash | ||
| Line 55: | Line 55: | ||
Show >> /path/to/ksaw.log | Show >> /path/to/ksaw.log | ||
fi | fi | ||
</ | </syntaxhighlight> | ||
== Resources == | == Resources == | ||
| Line 65: | Line 65: | ||
[[Category:Bash]] | [[Category:Bash]] | ||
[[Category:System Administration]] | [[Category:System Administration]] | ||
[[Category:Performance]] | |||