Apache is a widely popular Web Server application software. It is preferred by all as it works on all operating systems like Windows and other UNIX based operating systems like Linux. Apache supports several features including virtual hosting, programming language, support, etc.

How to check Apache server status?

Apache is one of the world’s leading HTTP web servers that are used mainly in Linux and Unix systems. It is ideally used to run various websites and web applications. It is easy to install feature makes it one of the most recommended application software of all times. Different methods and commands can be used to check Apache server status in Linux. There are basically three ways to do this.

How to check Apache server status?

Systemctl Utility

As the name suggests, this particular subcommand is used to inspect the status of the given service. The systemctl utility is a command that controls the systemd systems and its service manager. Systemd is a group of system management daemons and libraries that act as a substitution of system V init daemon. This basic command permits you to start, stop, enable, disable, view and even restart the system services. Systemctl command is an important tool that manages the following:

  • Service management
  • Checks the status
  • Altering system states
  • Dealing with configuration files

Apachectl Utilities

Apachectl acts as a front-end control interface for an HTTP server. It is designed in a way that it can help the administrators in controlling the functions of Apache. In order for Apachectl to function effectively, it needs the presence of a module in the server, called the mod_status module. The mod_status module needs to be enabled and installed. The mod_status here displays all the information about the server including its performance and uptime. This Apache mod_status module will permit a server administrator to check the following:

  • Apache web server uptime
  • Simultaneous connections
  • Performance of the server

All these can be accessed through the web browser that works on an HTML interface. The Apache mod_status provides several details and data’s about the Apache Web server status that are very useful. Some of them include:

  • The built and the version details of Apache web server
  • The final restart and uptime information of the Web server
  • Displays complete number of incoming requests
  • Workers that remain idle
  • CPU usage of the web server and shows the server load
  • Shows the total bandwidth use or shows the total traffic
  • Shows the average number of the requests received per second
  • Shows the average number of bytes used per request
  • Total number of bytes used per second
  • Shows the number of requests that are being processed at the time of running.
  • Shows components and details about the running process

The installation of mod_status module is not a strenuous one as it is already enabled on Apache by default. The reports in it are also commented and the access to it is limited or denied. In this, an HTML page appears on the browser that usually shows the present server statistics in a very easy to read format. This feature is active on all servers through default. Alternatively, the server mod_status module needs to be enabled in the Apache configuration, if we need to view the server status details from a graphical browser.

Ps Utility

Ps Utility displays information regarding the choices of all the active processes that run on a Linux system. It can also be used with grep command in order to check the uptime of the Apache service. The ps command chooses all processes that have the same end-user ID (euid=EUID), as the current or present user by default. Also by default, it associates the same terminal as its invoker. Besides these, ps utility also displays the following:

  • The process ID (pid=PID)
  • Shows the name of the terminal that is linked to the process (tname=TTY)
  • Shows the cumulative CPU time in this particular format [DD-]hh:mm: ss (time=TIME)
  • Shows a name that can be executed (ucmd=CMD)

Apache server software claims to serve over 100 million websites due to its unique features. Hence, this free and open source server software is commonly used in Linux and other operating systems like Unix. The advantage of using Apache in Linux is that its features can be executed with different modules that are capable of extending the core functionality. If one finds out the solution to “how to check Apache server status in Linux” then operating this system would get uncomplicated.

(Visited 2,462 times, 1 visits today)