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
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...