How to monitor activity on your Linux server

How to monitor activity on your Linux server

Linux systems provide a number of commands that make it easy to report on system activity. In this post, we’re going to look at several commands that are especially helpful.

The watch command

The watch command is one that makes it easy to repeatedly examine a variety of data on your system — user activities, running processes, logins, memory usage, etc. All the command really does is run the command that you specify repeatedly, each time overwriting the previously displayed output, but this lends itself to a very convenient way of monitoring what’s happening on your system.

To start with a very basic and not particularly useful command, you could run watch -n 5 date and see a display with the current date and time that updates every 5 seconds. As you likely have guessed, the -n 5 option specifies the number of seconds to wait between each run of the command. The default is 2 seconds. The command will run and update a display like this until you stop it with a ^c.

To read this article in full, please click here

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(https://safevoip.co.uk/wp-content/uploads/2017/04/slider.jpg);background-size: initial;background-position: top center;background-attachment: initial;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 650px;}