apache_sitedown
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| apache_sitedown [2015/04/24 07:22] – created luke7858 | apache_sitedown [2024/05/23 07:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | Note: I have written a python script to check a system and report back on any potential Out-Of-Memory issues: | ||
| + | <sxh bash> | ||
| + | curl -s https:// | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | == Step 1 == | ||
| + | did apache hit max clients? | ||
| + | CentOS/RHL | ||
| + | <sxh bash> | ||
| + | grep -i maxc / | ||
| + | </ | ||
| + | Ubuntu/ | ||
| + | <sxh bash> | ||
| + | grep -i maxc / | ||
| + | </ | ||
| + | Note: Could use error.log rather than error_log | ||
| + | == Step 2 == | ||
| + | Did the server run out of memory and kill processes that killed a vital service? | ||
| + | CentOS/RHL | ||
| + | <sxh bash> | ||
| + | egrep -i ' | ||
| + | </ | ||
| + | Ubuntu/ | ||
| + | <sxh bash> | ||
| + | egrep -i ' | ||
| + | </ | ||
| + | \\ | ||
| + | Summarise date and times the server ran out of memory (CentOS/ | ||
| + | <sxh bash> | ||
| + | zgrep -i ' | ||
| + | </ | ||
| + | <sxh bash> | ||
| + | zgrep -i ' | ||
| + | </ | ||
| + | Example output: | ||
| + | <sxh bash> | ||
| + | 2 Apr 25 (driveclient) | ||
| + | 1 Apr 27 (driveclient) | ||
| + | 2 Apr 29 (driveclient) | ||
| + | 1 May 12 (driveclient) | ||
| + | 1 May 2 (driveclient) | ||
| + | 1 May 22 (driveclient) | ||
| + | 1 May 5 (driveclient) | ||
| + | 1 May 9 (driveclient) | ||
| + | </ | ||
| + | \\ | ||
| + | Debian/ | ||
| + | <sxh bash> | ||
| + | zgrep -i ' | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | ==Step 3 == | ||
| + | Check to see if the website received traffic during the period of 'down time' | ||
| Investigating a 'site down' issue. | Investigating a 'site down' issue. | ||
| + | Best command to see check all log is: | ||
| + | |||
| + | <sxh bash> | ||
| + | cat / | ||
| + | </ | ||
| + | |||
| + | <sxh bash> | ||
| + | cat / | ||
| + | </ | ||
| + | |||
| + | Checking old log files (compresses) \\ | ||
| + | <sxh bash> | ||
| + | zcat / | ||
| + | </ | ||
| + | \\ | ||
| <sxh bash> | <sxh bash> | ||
| grep 24/ | grep 24/ | ||
| </ | </ | ||
| + | |||
| This will grep for: | This will grep for: | ||
| date 24/ | date 24/ | ||
| Line 12: | Line 83: | ||
| IPaddress x.x.x.x Time 24/ | IPaddress x.x.x.x Time 24/ | ||
| IPaddress x.x.x.x Time 24/ | IPaddress x.x.x.x Time 24/ | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | The following can summaries all of the IP addresses hitting the access logs during a certain date/time | ||
| + | <sxh bash> | ||
| + | grep " | ||
| + | </ | ||
| + | E.g: | ||
| + | <sxh bash> | ||
| + | 492 x.x.x.1 | ||
| + | 497 x.x.x.15 | ||
| + | 501 x.x.x.158 | ||
| + | 504 x.x.x.19 | ||
| + | 517 x.x.x.201 | ||
| + | 518 x.x.x.122 | ||
| + | </ | ||
| + | \\ | ||
| + | \\ | ||
| + | See what a specific IP address is doing (access logs) during a specific date/time | ||
| + | <sxh bash> | ||
| + | grep " | ||
| + | </ | ||
| + | \\ | ||
| + | <sxh bash> | ||
| + | x.x.x.11 - - [12/ | ||
| + | x.x.x.11 - - [12/ | ||
| + | x.x.x.11 - - [12/ | ||
| + | x.x.x.11 - - [12/ | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | Following shows what IPs connected to the server during a time period, this can be used to see if the server was down at the time listed. | ||
| + | <sxh bash> | ||
| + | grep " | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | The following command shows all IP addresses accessing all domains on the server for a specific date/time: | ||
| + | <sxh bash> | ||
| + | cat / | ||
| </ | </ | ||
apache_sitedown.1429860124.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
