Monitor System Resources With “Resources”

Today is one of those days when I’d like to introduce you to new software as we learn to monitor system resources with “Resources”. That may not make much sense, but it will! The Resources application is a great option if you want a great way to monitor system resources.

I may do a few articles about monitoring system resources. That’ll be fun.

It’s probably important to mention that many of you will not have this in your default repositories. For those who do, it won’t be in the typical repositories but will exist because your distro ships with Flatpaks enabled.

That’s right. To use this article, you should read a previous article:

Installing Flatpaks In Linux

Once you get Flatpak installed and the FlatHub repository added, you can use a great application known as Resources.

Of course, your desktop distro shipped with a GUI resource monitor and it’s usually fit for purpose. However, this Resources application has a bunch of great features and it is easy to live with. 

Another great thing is that this shouldn’t be a very long article…

Monitor System Resources:

Once Flatpak is installed, you might want to keep your terminal open. Yes, Flatpaks are large – but they have great features, including running in isolation and shipping with all their dependencies.

Most of you can open a terminal by pressing CTRL + ALT + T. If that doesn’t work for you, you’ll have a terminal option in your application menu. It might be under the Administration sub-section.

With your terminal open, you can install Resources quite easily:

That should add Resources to your application menu. It will fall under the Administration sub-section. I’ve seen some distros not show newly added Flatpaks in the menu until after a reboot. If that’s the case, you can manually run Resources with this command:

Once you open the application, all will be revealed. Here’s an image:

Resources default screen.
This should be self-explanatory if you’ve monitored resources before.

One of the great things is that you can monitor applications that might have multiple processes – such as Google Chrome. You can also monitor processes individually, including closing those applications and processes.

Additionally, you can monitor CPU use, memory use, GPU use, and your various storage devices – including optical media. If you want to know read and write speeds on the fly, that information is available in an easily understood graphical tool.

That’s right… I’m covering a graphical tool today! Let it be said that a GUI is sometimes a good tool for the job and that the Resources application is one of those tools.

If you click on the hamburger menu near the top, you can also adjust your preferences. You can choose to display more information than the default and adjust how you’d like to read things like temperature values. It’s a pretty handy application.

Yes, you already have a GUI tool to monitor system resources but you can opt to use this one instead. It’s a pretty large file (or multiple files) but that’s to be expected with Flatpaks. So, get a coffee going while you wait for the application to install.

Closure:

So, there’s a GUI tool you can use to monitor system resources. It’s worth investigating. Some of you may like it well enough to switch to it entirely. Others may find they reach for it when they need more information than they usually have available on one screen. Either way, it’s a handy application and one worth knowing about.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Monitor Network Usage On A Per-Application Basis

Today’s article is going to tell you how to use Nethogs to monitor network usage on a per-application basis. It’s actually easier than one might think and we’ll even show you how to install Nethogs on a variety of distros.

Why would you want to monitor this? Well, you may want to know which applications are eating up most of your bandwidth. Not everyone has unlimited bandwidth after all. You might also be looking for rogue applications/malware that’s using up some of your bandwidth. There are all sorts of reasons to monitor your network usage at this level. Feel free to leave a comment telling us how you intend to use Nethogs.

As stated, we’ll be using Nethogs. The man page describes it as:

nethogs – Net top tool grouping bandwidth per process

I suppose that’s mostly useful to those who know what ‘top‘ is. (There’s a future article about top and htop, when I get to it.) But, Nethogs is like a system monitor, except it’s a network monitor with some visual similarity with top. (Yes, that’s an ugly, ugly sentence.)

We’ll be using ‘sudo’ for all of these commands. It’s possible to use Nethogs without sudo, but we won’t be covering that here. If that’s something you’re interested in doing, a search engine will help you get there.

Monitor Network Usage:

Nethogs is a terminal-based application. As such, you’ll need an open terminal. Just press CTRL + ALT + T and your default terminal emulator should open right up.

Once your terminal is open, you can go ahead and install Nethogs. Pick the command that works with your system’s package manager.

Debian/Ubuntu:

RHEL/CentOS (will need to enable EPEL):

Fedora:

Arch/Derivatives: 

Once you have Nethogs installed, you can check the help files. In this case, the help files are better than the man files (I think) so just enter the following into your terminal:

Now, to run Nethogs, we’ll use sudo and just run it in the terminal. Believe it or not, this mode is generally just fine for anything you’re going to do.

That’ll open Nethogs and start monitoring your network usage on a per-application basis. It looks something like this:

Nethogs running in the terminal.
As you can see, bandwidth monitoring on a per-application basis. Tada!

Now, if you’re going to leave it open, you can change the refresh rate. That’s done with the -d <seconds> flag. If you want it to refresh every 15 seconds, your command would look like this:

By the way, if you want to exit Nethogs, you just press Q and it closes – like top and htop do.

If you want, you can specify the network interface you want to use. It doesn’t require any flags, just the network interface name. (Read Also: how to change your network interface name.) An example of that command would be:

While the application is running, you can do some sorting/display changes with the M, R, and S keys. But it’s usually not all that complicated and sorting isn’t needed. If you’re dealing with hundreds of collections, then you may want to start sorting. Really, that’s about all you’ll ever need.

Closure:

And there you have it! You have another article to read. This one is about monitoring your network usage on a per-application basis, a pretty handy skill/tool to have. It’s pretty easy and the output is clear enough for all but the newest Linux users. If you find the tool useful, or already use the tool, please feel free to comment.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

‘vnStat’ A Tool For Monitoring Your Bandwidth Usage

‘vnStat’ is a wonderful tool for monitoring your bandwidth usage. This article will show you how to use vnStat effectively. For bonus points, we’ll also look at ‘vnstati’ so you can make pretty graphs to visualize your bandwidth usage. This article shouldn’t take too long!

vnStat‘ stands for ‘view network statistics’ and has been around for like 18 years at the time of this writing. It’s so common that it has its own Wikipedia page. Of course you know that already, you can see the handy link I already provided!

Anyhow, ‘vnStat’ is a tool that runs in the terminal, a console tool as it helpfully describes itself:

vnstat – a console-based network traffic monitor

It’s a pretty great tool that generates some neat information and displays it in the terminal. It looks a little something like this:

vnStat in action!
See? I’ve stopped taking screenshots with a semi-transparent terminal! I’m pretty much a pro!

That image should save me a whole bunch of time! I trust that my readers are smart enough to figure out the gist of it with just a handy screenshot. For those not fluent in the ways of vnStat, ‘rx’ means received and ‘tx’ means sent. The rest should be pretty easy to figure out.

Install vnStat:

In order to get vnStat, you have to actually have to install it. It’s available in the default repositories in the popular distros (and even the BSD family). If it isn’t, you can always build it from source. But, you can probably install it much like you’d install anything else. For example, in a distro that uses apt you’d install it with:

(We might just as well install vnstati at the same time. Also, adjust that command for your own package management system.)

You can next go ahead and enable the service and start it next. That will be:

Once it is installed, you should set up database(s) for vnStat. This is done with:

Where you have “<device_name>” you replace it with the name of your internet adapter. For example, lots of Ethernet adapters are ‘eth0’. You can find the name of your adapter(s) by using either ‘ifconfig -a’ or ‘ip addr’. You can repeat this with all the names of the internet adapters you use, if you do in fact use more than one.

Then you can verify your vnStat installation with:

Assuming that spits out a version number you should be good to go.

Using vnStat (& vnstati):

So, by now you should have vnStat installed, and its sister app vnstati should also be installed. Let’s examine how you use them.

First, you can just call the application in the terminal. There’s nothing complicated about it and it may be your choice if you have more than one network interface. To do so, it’s just:

You can also be more specific, getting the data for just a single device:

Where ‘eth0’ is, change it to the name of your device. So, for a wireless device, it may look something like:

There are a ton of other options, so be sure to check the man page. Those are the options that I use most often, so those are the only ones we’ll be concentrating on.

Now, you can also use vnstati to make a nifty graphic that will show you your bandwidth usage. It looks a little something like this:

vnstati in action
That’s the graphical outcome I prefer.

That’s the output of this command:

As you can guess, you can change the output path to anything you want (and have permissions for). I prefer that particular graphic, but there are a ton of options and you can gather all sorts of information. For example, there’s also this to show the hourly rate from the past 24 hours:

vnstati in action
This is an hourly output, which may be of value if you have limited bandwidth.

That is the output from this command:

And, again, you can modify the outputted .png to place it where you want. There are a whole lot more options and this article isn’t going to cover them all. That’s not the kind of article I write. There are tons more options in the man page, if you want to explore them.

Find what works for you and run with it. You should be able to find a format you like that has the information you’re looking for. I’m just introducing you, you decide how you use it.

Closure:

And there’s another article in the books! This one explains vnStat and vnstati. Both are pretty great tools that go well together, and they help you monitor your bandwidth usage. If you have any questions or comments, feel free to scroll down and leave a message.

Thanks for reading! If you want to contribute, you can donate, you can write an article, you can register to help, you can buy inexpensive hosting, you can rate the articles, you can scroll down to sign up for the newsletter, or you can share this site on social media. If you can think of anything else to help, jump right in and start doing it!

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.