<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1642713012720816&amp;ev=PageView&amp;noscript=1">

Latest New from 100TB

Get it from the source

Using rtop For Remote Server Monitoring

Published Jul 10, 2017 by Hayden Smith
 
There are a great many tools available to use for monitoring your server’s system resources. There’s no definitive “better than the rest” option, and different tools bring different features to the table that make them worthy of consideration. To this table, we bring rtop.

Not sure whether your business would suit cloud or bare metal servers?


What is rtop?

rtop is a tool for providing an overview of the system resources on a remote server at the Linux command line. It refreshes every few seconds to keep information up to date. The real advantage of rtop is that once installed on the local side it only requires SSH server running on the remote system to connect and do its thing. There’s no requirement to install some form of daemon on the remote systems.

Installing rtop

To get started with rtop and get it installed, you’ll need Google’s Go programming language installed on your system. We will also need the Git software version control system. This is easily achieved  as most distributions provide packages for versions of Go that are suitable for running rtop.

To find the answers to all of your Linux questions, make sure that you visit this page. Your command line life will get easier, we promise.


To install on a Debian or Ubuntu system:

    sudo apt-get update
    sudo apt-get install golang-go


For CentOS and Red Hat systems:

    sudo yum install golang

 

Installing Go

You’ll need to set a path for Go to store its working code files before we can proceed. The simplest way of doing so is by providing a path by adding a file to the /etc/profile.d directory:

    sudo nano /etc/profile.d/golang.sh

In this file you can paste the following line:

    export GOPATH=$HOME/gofiles
    export PATH=$PATH:$GOPATH/bin


Save and exit this file to make sure that your Go path will be set each time you log in. This is used to tell Go where to download and install its files, as well as to let the system know where to look for the applications that Go creates. With this setting it will save the files to a directory called “gofiles” in the user’s home. You can amend this to direct files to wherever you wish them to go.

With Go installed, we can look at getting the rtop files from Github. Fortunately, Go provides an easy process for using Git to do this:

    go get github.com/rapidloop/rtop

This will download the source code for rtop, and then compile and install it into the gofiles/bin directory in the user’s home directory. If you’ve used a different GOPATH then this will need to be changed.

Launching rtop

Once installed you can launch rtop by typing: 

    rtop username@serverip:port

Note: you’ll need to change username for your username on the remote server, serverip for the IP address of the server (alternately you can use the it’s domain name) and the “:port” part is optional and used if you have SSH listening on a non-standard port. You’ll be prompted for your password to log in, and once done rtop will show you the details of the remote server, refreshing the display every five seconds.

The top line shows the server’s details and its up time. This is followed by the load averages of the server. The next section shows how many processes are active and running in total. A nice clear breakdown of memory usage is next. Then you get a breakdown of usage of the various mounted filesystems on the server. Finally, you will see the network information showing each interface, its IP addresses and bandwidth usage.

Therefore, this uncluttered interface makes it really simple to get an at-a-glance overview of how the server is performing. If you want more detail you’ll still have to log into the server itself and use other tools. Exiting rtop is as easy as hitting “Ctrl-C “to close the application. 

Another downside to rtop is that with the default installation location, rtop is only available for the current user of the system. So if you want rtop available for other users you will need to set a link to the rtop executable:

    sudo ln ~/gofiles/bin/rtop /usr/local/bin/rtop

You will find rtop to be invaluable in monitoring your server system’s resources. If you are not yet utilizing its capabilities you now have the information to make the necessary changes. Let us know how you get on and if it throws up any challenges that we can help resolve. Do let us know.

100TB clients know their expert tech support team is available 24/7 for Linux  questions. Does your web host offer the same? If not, it may be time to  consider just how much time, effort and money a great tech support team can  save your business.

 

To keep up with Hayden’s How To wizardry, make sure you sign up for our weekly newsletter in the form below.

 

Installing Googler, The Command Line Google Search

Previous Article

How Gaming Became Monetized

Next Article