Apache is the most popular and widely used web server in the world, so it is important to monitor and debug the performance. Mod_status is an Apache module that is used to monitor Apache web server load and current connections via a web based interface. Mod_status allows a system administrator to monitor performance of Apache server. Mod_status is the most useful and easiest module to confgure with Apache.
The Mod_status module shows the following information:
Server load and uptime.
CPU usage and total traffic of Web Server.
Total number of incoming connections.
Total number of bytes and counts server.
Total number of idle and busy workers.
In this tutorial, we will learn how to install and use Mod_status on the Apache web server running on Ubuntu-14.04.
A server running Ubuntu-14.04 with Apache installed.
A non-root user with sudo privileges setup on your server.
Enable mod_status in Apache
By default Apache comes with mode_status enabled. You can check the contents of apache's enabled modules directory by running the following command:
You should see the mod_status module in the following output:
In the above image, you can see that html interface shows you all the information about server load, uptime and process id. You can also refresh the page every 10 seconds by adding ?refresh=10 at the end of the URL.
If you want to view the status of Apache using command line browser called lynx.
You can install it by running the following command:
sudo apt-get install lynx
Once installation is complete, you can get the Apache status using the following command:
You should see the following output:
Apache Server Status for 192.168.43.206 (via 192.168.43.206)
Server Version: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.19 OpenSSL/1.0.2h mod_wsgi/3.4 Python/2.7.6
Server MPM: prefork
Server Built: Jul 15 2016 15:34:04
Current Time: Monday, 03-Oct-2016 23:36:16 IST
Restart Time: Monday, 03-Oct-2016 23:23:16 IST
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 12 minutes 59 seconds
Server load: 0.00 0.02 0.05
Total accesses: 7 - Total Traffic: 14 kB
CPU Usage: u.04 s.05 cu0 cs0 - .0116% CPU load
.00899 requests/sec - 18 B/second - 2048 B/request
1 requests currently being processed, 5 idle workers
Srv Child Server number - generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
CPU CPU usage, number of seconds
SS Seconds since beginning of most recent request
Req Milliseconds required to process most recent request
Conn Kilobytes transferred this connection
Child Megabytes transferred this child
Slot Total megabytes transferred this slot
SSL/TLS Session Cache Status:
cache type: SHMCB, shared memory: 512000 bytes, current entries: 0
subcaches: 32, indexes per subcache: 88
index usage: 0%, cache usage: 0%
total entries stored since starting: 0
total entries replaced since starting: 0
total entries expired since starting: 0
total (pre-expiry) entries scrolled out of the cache: 0
total retrieves since starting: 0 hit, 0 miss
total removes since starting: 0 hit, 0 miss
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...