Updating apache server live

Rated 3.92/5 based on 578 customer reviews

(If you are on an RHEL platform, this may also be located in your main configuration file, within the if you want to restart Apache gracefully (without interrupting connections).

Now Apache should start logging with our custom format, including the request latency (in microseconds) at the end of each line:11.123.456.789 - - [15/Feb/ -0500] "GET /images/HTTP/1.1" 404 511 " "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) Apple Web Kit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" 303 In the access log shown above, a request was made from a client with the IP address 11.123.456.789.

The open source community has developed several tools to help users monitor Apache’s performance metrics in a different format than the built-in status module.

Below, we will explore two options that enable you to analyze Apache status metrics and logs, right from the command line.

With access to additional details about each individual request, you can spot if a request for a specific resource was taking an extraordinarily long time, or if it was using more CPU compared to other requests around the same time.

To access the status page in a machine-readable format, visit Server Version: Apache/2.4.23 (Unix) Server MPM: prefork Server Built: Aug 8 2016 Current Time: Wednesday, 15-Feb-2017 EST Restart Time: Wednesday, 15-Feb-2017 EST Parent Server Config Generation: 1 Parent Server MPMGeneration: 0 Server Uptime Seconds: 1192 Server Uptime: 19 minutes 52 seconds Load1: 2.13 Load5: 1.87 Load15: 1.79 Total Accesses: 49 Total k Bytes: 41 CPUUser: 0 CPUSystem: .02 CPUChildren User: 0 CPUChildren System: 0 CPULoad: .00167785 Uptime: 1192 Req Per Sec: .0411074 Bytes Per Sec: 35.2215 Bytes Per Req: 856.816 Busy Workers: 1 Idle Workers: 1 Scoreboard: _W........................................................................................................................................................................................................................................................

The Extended Status directive is either located within the main configuration file’s Extended Status also displays additional information about each request, along with detailed information about recently processed requests (including the client, requested resource, and processing time).

Extended Status metrics can be useful for troubleshooting performance degradations and diagnosing issues.

The next two fields show us the client’s user agent (browser type) and the request processing time in microseconds.

Debian users can find the status module’s configuration file at This relies on Apache’s htpasswd functionality, which enables administrators to create users and groups, and set up a means of authenticating their access to specific resources on the web server (such as your server-status page).

Consult the Apache documentation for more details on how to set up authentication and authorization in Apache. You can check your configuration file for errors with the following command: twice for each request in order to log timing information.

Some tools, including collect D and Datadog, can automatically parse the machine-readable status page and enable you to visualize those metrics in graphs.

A future release of Apache will also output status metrics as JSON, as shown here.

Leave a Reply