Apache Status Open Slot With No Current Process

As promised in our earlier tutorials of Apache Series, Today we are here with another article on the Apache HTTP web server which can make a System Administrators life much easier to handle a load of Apache web server using mod_status module.

Apache Status Open Slot With No Current Process 2017

What is mod_status?

mod_status is an Apache module that helps to monitor web server load and current httpd connections with an HTML interface that can be accessed via a web browser.

Since I see an open slot with no current process associated with some pages, would that mean there is misconfiguration in Apache and do you have an hint to check a possible parameter to avoid that? If you need more infos, like configurations, I can provide. In apache server-status page,referring to the 'Acc' column, which is the 'Number of accesses this connection / this child / this slot'. For example 18/256/356, I will expect that all values are equal. I need an explanation of what is meant by child and slot connection with examples. I have a CentOS 5.5 Final with Apache 2.2.3. I was checking about possible misconfigurations or similar so I settled the server-status which reports to me this result just opening only the page of.

Apache’s mod_status shows a plain HTML page containing the information about current statistics of the webserver including.

  1. Total number of incoming requests
  2. Total number of bytes and counts server
  3. The CPU usage of Webserver
  4. Server Load
  5. Server Uptime
  6. Total Traffic
  7. Total number of idle workers
  8. PIDs with the respective clients and many more.

The default Apache Project enabled their server statistics page to the general public. To have a demo of the busy web site’s status page, visit.

Testing Environment

We have used the following Testing Environment for this article to explore more about mod_status with some practical examples and screen-shots.

  1. Operating System – CentOS 6.9
  2. Application – Apache Web Server
  3. IP Address – 5.175.142.66
  4. DocumentRoot – /var/www/html
  5. Apache Configuration file – /etc/httpd/conf/httpd.conf (for Red Hat)
  6. Default HTTP Port – 80 TCP
  7. Test Configuration Settings – httpd -t

The prerequisites for this tutorial are that you should already aware of how to install and configure a Basic Apache Server. If you don’t know how to setup Apache, read the following article that might help you in setting up your own Apache Web Server.

How to Enable mod_status in Apache

The default Apache installation comes with mod_status enabled. If not, make sure to enable it in the Apache configuration file.

Search for the word “mod_status” or keep scrolling down until you find a line containing.

If you see a ‘#‘ character at the beginning of “LoadModule”, that means mod_status is disabled. Remove the ‘#‘ to enable mod_status.

Apache status open slot with no current process 2017

Configure mod_status

Now again search for the word “Location” or scroll down until you find a section for mod_status which should look like following.

In the above section, uncomment the lines for Location directive, SetHandler, and the directory restrictions according to your needs. For example, I am keeping it simple with the Order Allow, deny and it’s allowed for all.

Note: The above configuration is the default configuration for the default Apache web site (single website). If you’ve created one or more Apache Virtual Hosts, the above configuration will won’t work.

So, basically, you need to define the same configuration for each virtual host for any domains you’ve configured in Apache. For example, the virtual host configuration for mod_status will look like this.

Enable ExtendedStatus

The “ExtendedStatus” settings add more information to the statistics page like CPU usage, request per second, total traffic, etc. To enable it, edit the same httpd.conf file and search for the word “Extended” and Uncomment the line and set the status “On” for ExtendedStatus directive.

Apache Status Open Slot With No Current Process Machine

Restart Apache

Now make sure that you’ve correctly enabled and configured Apache server status page. You can also check for the errors in the httpd.conf configuration using the following command.

Once, you get syntax is OK, you can able to restart the httpd service.

Access mod_status Page

The Apache status page will be accessible via your domain name with “/server-status” at the following URL’s.

You will see something similar to the following page with ExtendedStatus enabled.

In the above snapshot, you can see that an HTML interface, which shows all information about server uptime, process Id with its respective client, the page they are trying to access.

It also shows the meaning and usage of all the abbreviations used to display the status which helps us to understand the situation better.

You can also refresh the page every time seconds (say 5 seconds) to see the updated statistics. To set the automated refresh, please add “?refresh=N” at the end of the URL. Where N can be replaced with the number of seconds which you want your page to get refreshed.

Apache mod_status Refresh

Command-line Status Page View

You can also view the Apache status page from the command-line interface using the special command-line browsers called links or lynx. You can install them using the default package manager utility called yum as shown below.

Once, you’ve installed the, you can get the same statistics on your terminal by using the following command.

Sample Output

Conclusion

Apache’s mod_status module is a very handy monitoring tool for monitoring the performance of a web server’s activity and can able to highlight problems itself. For more information read the status page that can help you to become a more successful web server administrator.

That’s all for mod_status for now, we’ll come up with some more tricks and tips on Apache in future tutorials. Till then stay Geeky and tuned to Tecmint.com and don’t forget to add your valuable comments.

Apache is a world’s most popular, cross platform HTTP web server that is commonly used in Linux and Unix platforms to deploy and run web applications or websites. Importantly, it’s easy to install and has a simple configuration as well.

Apache status open slot with no current process time

Read Also: How to Hide Apache Version Number and Other Sensitive Info

In this article, we will show how to check Apache web server uptime on a Linux system using different methods/commands explained below.

1. Systemctl Utility

Systemctl is a utility for controlling the systemd system and service manager; it is used it to start, restart, stop services and beyond. The systemctl status sub-command, as the name states is used to view the status of a service, you can use it for the above purpose like so:

2. Apachectl Utilities

Apachectl is a control interface for Apache HTTP server. This method requires the mod_status (which displays info about the server is performing including its uptime) module installed and enabled (which is the default setting).

On Debian/Ubuntu

The server-status component is enabled by default using the file /etc/apache2/mods-enabled/status.conf.

Apache Mod_Status Configuration

On RHEL/CentOS

To enable server-status component, create a file below.

and add the following configuration.

Save the file and close it. Then restart the web server.

If you are primarily using a terminal, then you also need a command line web browser such as lynx or links.

Then run the command below to check the Apache service uptime:

Alternatively, use the URL below to view the Apache web server status information from a graphical web browser:

3. ps Utility

ps is a utility which shows information concerning a selection of the active processes running on a Linux system, you can use it with grep command to check Apache service uptime as follows.

Here, the flag:

  • -e – enables selection of every processes on the system.
  • -o – is used to specify output (comm – command, etime – process execution time and user – process owner).

The sample output below shows that apache2 service has been running for 4 hours, 10 minutes and 28 seconds (only consider the one started by root).

Check Apache Uptime

Lastly, check out more useful Apache web server guides:

In this article, we showed you three different ways to check Apache/HTTPD service uptime on a Linux system. If you have any questions or thoughts to share, do that via the comment section below.

Comments are closed.