1. Home
  2. Linux
  3. General
  4. How To Quickly Monitor Multiple Hosts In Linux

How To Quickly Monitor Multiple Hosts In Linux

How To Quickly Monitor Multiple Hosts In Linux
How To Quickly Monitor Multiple Hosts In Linux

Introduction

There are many monitoring tools out there which can help you monitor local and remote Linux systems. One good example is Cockpit. These tools, however, can a little complicated to install and use, at least for the newbie admins.
The newbie admin will need to spend a little time to figure out how to configure these tools to monitor the systems. If you want a fast way to monitor several hosts at a time in your local area network, you will need to use the ‘rwho’ tool. This will instantly  monitor the local and remote systems as soon as you install the ‘rwho’ utility. You do not need to configure anything, all you need to do is to install the ‘rwho’ tool on the systems that you would like to monitor.
We do not recommend thinking that ‘rwho’ is a feature-rich and complete monitoring tool. It’s just a simple tool which will help you monitor the uptime, the load, and the number of logged in users of a remote system.
Using the ‘rwho’ utility, you will be able to find out who is logged in on which computer, a list of monitored computers with uptime (time since last reboot), how many users are logged in, and the load averages for the past 1, 5, and 15 minutes. Not more, not less and also, it should only monitor the systems that are in the same subnet, hence why it’s ideal for a small or home office network.
Monitor Multiple Hosts In LinuxHere, we will help you to understand how ‘rwho’ works.
Every system which uses ‘rwho’ on the network will broadcast information about itself. The other computers will be able to access this information using ‘rwhod-daemon’. This means that every computer on the network will need to have ‘rwho’ installed. Also, the ‘rwhod-port’ (e.g Port 513/UDP) needs to be allowed through your firewall/router in order to distribute or access the information of other hosts.
Now you can install it.
You’ve now experimented on a Ubuntu 16.04 LTS server. ‘Rwho’ should be available in the default repositories, so you will be able to install it using the APT package manager as shown below.

Ubuntu rwho Installation

sudo apt-get install rwho

On RPM based systems like CentOS, Fedora, RHEL, use the following command to install it.

CentOS rwho installation

sudo yum install rwho

Ensure that you have allowed the ‘rwhod-port 513’ if you are behind a firewall/router. Also, be sure to confirm if the ‘rwhod-daemon’ is running or not by using the following command.

Check service status

sudo systemctl status rwhod

If it hasn’t started already, execute the command below to enable and initiate the ‘rwhod’ service.

Enable & start the service

sudo systemctl enable rwhod
sudo systemctl start rwhod

Now, it is time to monitor the systems. Execute the command below to see who is logged in on which computer.

rwho
dreamvp dreamvps:pts/5 Mar 12 17:41
root server:pts/0 Mar 12 17:42

As you can see, there are currently two systems on the local area network. The local system user is ‘dreamvps’ (Ubuntu 16.04 LTS) and remote system’s user is ‘root’ (CENTOS 7). As you might have guessed already, ‘rwho’ is similar to the ‘who’ command, however it will monitor the remote systems as well.
You can find the uptime of all running systems on the network by using the command below.

Check Uptime

rwho
dreamvp dreamvps:pts/5 Mar 12 17:41
root server:pts/0 Mar 12 17:42

You can find the information about all of other machines in the local area network in the following location.

ls /var/spool/rwho/
whod.dreamvps whod.server

This is a small, yet very useful tool to find out who is logged in on which computer and the uptime along with system load details.

Updated on January 9, 2019

Was this article helpful?

Related Articles

Leave a Comment

[apsl-login-lite login_text='Please login with a social account']