I am looking for system monitoring tools which are GUI and CLI or web-based which include basic functions such as:
- CPU Usage
- Ram Usage
- Swap Usage
- Disk Usage ( Space / I/O )
- Heat Monitoring
I know there are many tools I can use, but I am looking for a single tool that has these basic functions.
Glances - An eye on your system
Glances is a free software (licensed under LGPL) to monitor your GNU/Linux or BSD operating system from a text interface. Glances uses the library libstatgrab to retrieve information from your system and it is developed in Python.
Installation
Open a terminal (Ctrl+Alt+T) and run following commands:
From Ubuntu 16.04 and above you can just type
sudo apt install glances
, but version 2.3 have this bug. Else:Easy Script Installation Glances
OR
Manual Installation
Basic usage
To start
glances
simply typeglances
in terminal.In glances you’ll see a lot of information about the resources of your system: CPU, Load, Memory, Swap Network, Disk I/O and Processes all in one page, by default the color code means:
When Glances is running, you can press some special keys to give commands to it:
Cpu , Ram , Swap Monitoring
Disk Monitoring
System Heat Monitoring
If you type
glances --help
you will find (-e
Enable the sensors module (Linux-only) )Configuration file
You can set your thresholds in Glances configuration file, on GNU/Linux, the default configuration file is located in
/etc/glances/glances.conf
.Client/server mode
Another interesting feature of this monitoring tool is that you can start it in server mode just typing
glances -s
, this will give an output like Glances server is running on 0.0.0.0:61209 and now you can connect to it from another computer using glances -c @server where @server is the IP address or hostname of the server.Glances uses a XML/RPC server and can be used by another client software. In server mode, you can set the bind address (-B ADDRESS) and listening TCP port (-p PORT), the default binding address is 0.0.0.0 (Glances will listen on all the networks interfaces) and TCP port is 61209. In client mode, you can set the TCP port of the server (-p port). In client/server mode, limits are set by the server side. The version 1.6 introduces a optional password to access to the server (-P password) that if set on the server must be used also on the client.
Additional Sources: PyPI, Github, Linuxaria
Update
Monitoring juju container just for example how things look like Large Image
In terminal no 1 Glances is running in server mode, In terminal no 2 juju container is running
apt-get update
& In terminal 3glances -c 192.168.1.103
Glances is connected to container ipGlances CPU Usage
Glances itself seems to require period spikes of cpu usage while being active, as evidenced by the built in system monitor usage graph. If the graph is accurate - then by using glances one gives up about 1/4 of a CPU on a system. This my have en effect for those who are monitoring CPU loads on servers.
indicator-SysMonitor
Indicator-SysMonitor does a little, but does it well. Once installed and run, it displays CPU and RAM usage on your top panel. Simple.
Download from here
Conky
One of my personal favourites
Screenlet you’ll find a bunch of differently styled CPU and RAM monitors included in the screenlets-all package available in the Ubuntu Software Center.
Glances
To install:
VMSTAT
Displays information about CPU, memory, processes, etc.
IOSTAT
This command line tool will display statistics about your CPU, I/O information for your hard disk partitions, Network File System (NFS), etc. To install iostat, run this command:
To start the report, run this command:
To check only CPU statistics, use this command:
For more parameters, use this command:
MPSTAT
The mpstat command line utility will display average CPU usage per processor. To run it, use simply this command:
For CPU usage per processor, use this command:
Saidar
Saidar also allows to monitor system device activities via the command line.
You can install is with this command:
To start monitoring, run this command:
Stats will be refreshed every second.
GKrellM
GKrellM is a customizable widget with various themes that displays on your desktop system device information (CPU, temperature, memory, network, etc.).
To install GKrellM, run this command:
Monitorix
Monitorix is another application with a web-based user interface for monitoring system devices.
Install it with these commands:
Start Monitorix via this URL:
Following are the tools for monitoring a linux system
top
,free -m
,vmstat
,iostat
,iotop
,sar
,netstat
etc. Nothing comes near these linux utility when you are debugging a problem. These command give you a clear picture that is going inside your serverFor the last few years I have used:
System Load Indicator
available from Software Centre
top
top is monitoring Software, listing all the processes with CPU/RAM usage, Overall CPU/RAM usage and more Also it's mostly installed by default
htop
htop is like an extended version of top. It has all the features from above, but you can see child processes and customize the display of everything. It also has colors.
iotop
iotop is specifically for Monitoring Hard rive I/O It lists all processes and shows their Hard drive usage for read and write.
You might want to try sysmon. Although not as fancy as Glances, it is very straightforward and easy to use.
If you want to get dirty and do a little scripting in python, here are some basics of system monitoring with Python to get you started.
You'll need an external module called
psutil
to monitor most things. It's easiest to use an external module installer instead of building from source.Note: These examples are written in Python 2.7
Now that we have the modules installed, we can start coding.
First, create a file called
usage.py
.Start by importing
psutil
Then, create a function to monitor the percentage your CPU cores are running at.
Let's break that down a bit, shall we?
The first line,
cpu_num = psutil.cpu_percent(interval=1, percpu=True)
, finds the percentage that the cores in your CPU are running at and assigns it to a list calledcpu_perc
.This loop right here
is a for loop that prints out the current percentage of each of your CPU cores.
Let's add the RAM usage.
Create a function called
ram_perc
.psutil.virtual_memory
gives a data set containing different facts about the RAM in your computer.Next, you can add some facts about your network.
Since
psutil.net_io_counters()
only gives us information about packets sent and received in bytes, some converting was necessary.To get some information about swap space, add this function.
This one is pretty straightforward.
Temperature is kind of hard to do, so you may need to do some research of your own to figure out what will work with your hardware. You will have to display the contents of a certain file.
Disk usage is a lot easier than temperature. All you need to do is to pass the disk you want to monitor (i.e:
/
) through a certain function.The original output of
psutil.disk_usage
is this,but you can also just receive
total
,used
,free
, orpercent
.The completed program: (the aforementioned functions were combined)
The line
temp = open("/sys/class/thermal/thermal_zone0/temp").read().strip().lstrip('temperature :').rstrip(' C')
might not work with your hardware configuration.Run this program from the command line. Pass the disks you want to monitor as arguments from the command line.
Hope this helps! Comment if you have any questions.
https://github.com/calthecoder/sysmon-1.0.1
Package systat has a tool called
sar
that does all you want. It can also gather historical data so you can see what happened some time ago.SeaLion can be handy tool as it has built-in commands to monitor your server performance as well as you can add your own custom commands, scirpts and log output. It's very easy to setup and find out what went wrong at specific time.
I was stunned to see when there is no simple,ellegant as well advance GUI System monitor like Windows TaskManager. KSysGaurd in KDE is great but requires plugins to install new functionality without it, is similar to gnome-system-monitor. KSysGaurd has advance options but not very simple. Personally, I didn't like either the KSysGaurd and Gnome-system-monitor.
I went and tried created a simple elegant GUI like Windows Task Manager. Check out my approach for the same: https://github.com/KrispyCamel4u/SysMonTask
Some highlights are:
Update: Now I have added the user Processes in version 1.1.0
I have filtered out the background Processes(with some exception) and shown only user-specific Processes (user parent and child process like in windows) which makes it easy to spot processes that you are interested in instead of finding out from the pool of all process that gnome-system-monitor shows.
Also, it includes the aggregates(on the column header) of all the processes.
There are only a few processes that are kinds of background but still appear: The exceptions :(
Suggestions are most welcomed in improving.
Thanks
The
free
command is the most simple and easy to use command to check memory usage on linux/ubuntu.To check memory usage is to read the
/proc/meminfo
file.The
vmstat
command with thes
option.The
top
command is generally used to check memory and cpu usage per process.The htop command also shows memory usage along with various other details.
To find out hardware information about the installed RAM.