Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

11 Answers 11

up vote 63 down vote accepted

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:

Hit Ctrl+Alt+T to open terminal and run following commands:

sudo apt-get install python-pip build-essential python-dev
sudo pip install Glances
sudo pip install PySensors

To start glances simply type glances in terminal.

enter image description here

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:

GREEN : the statistic is “OK”
BLUE : the statistic is “CAREFUL” (to watch)
VIOLET : the statistic is “WARNING” (alert)
RED : the statistic is “CRITICAL” (critical)

When Glances is running, you can press some special keys to give commands to it:

c: Sort processes by CPU%  
m: Sort processes by MEM%  
p: Sort processes by name  
i: Sort processes by IO Rate  
d: Show/hide disk I/O stats  
f: Show/hide file system stats  
n: Show/hide network stats  
s: Show/hide sensors stats  
b: Bit/s or Byte/s for network IO  
w: Delete warning logs  
x: Delete warning and critical logs  
1: Global CPU or Per Core stats  
h: Show/hide this help message  
q: Quit (Esc and Ctrl-C also work)  
l: Show/hide log messages

Cpu , Ram , Swap Monitoring

enter image description here

Disk Monitoring

enter image description here

System Heat Monitoring

If you type glances --help you will find ( -e Enable the sensors module (Linux-only) )

glances -e

enter image description here

enter image description here

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 3 glances -c 192.168.1.103 Glances is connected to container ip

enter image description here

share|improve this answer
    
Wow! cool tool! ;'D –  B4NZ41 Jan 12 '14 at 15:42
    
:) , Yes it is @B4NZ41 –  Qasim Jan 12 '14 at 18:23
    
Is it worth installing python just to have better statistics, especially on tiny servers? (e.g. amazon micro istances with <750MB ram) –  Razor Feb 13 '14 at 8:13
    
@Razor Well i dont think so , its just for deskstop ( to monitor one pc ) –  Qasim Feb 13 '14 at 8:38
    
Awesome tool. There's a package in Debian 8.0 Jessie (and probably in Ubuntu already). –  Tom Dworzanski Jan 9 at 4:54

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.

share|improve this answer
    
where is heat monitoring ? and in your answer you have already included 3 utilities ... check the question **i am looking for a single tool that has some basic function ** –  Qasim May 10 '13 at 10:54
    
With the three tools I am just giving different options for the OP, but I am dissapointed to say that none of those have heat monitoring –  BeryJu May 10 '13 at 10:59
    
at least you have tried to answer the question ... thank you –  Qasim May 10 '13 at 11:23
    
google ( Saidar ubuntu ) –  Qasim May 10 '13 at 13:11
    
Thanks a lot Friend !! –  K.K Patel May 21 '13 at 7:51

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.

share|improve this answer
1  
thegeekstuff.com/2011/03/sar-examples –  Qasim May 10 '13 at 14:03

I recommend http://conky.sourceforge.net/

Very easy to configure and minimal usage of resources.

share|improve this answer
1  
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Warren Hill May 27 '13 at 12:50

Following are the tools for monitoring a linux system

  1. System commands like 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 server
  2. SeaLion: Agent executes all the commands mentioned in #1 (also user defined) and outputs of these commands can be accessed in a beautiful web interface. This tool comes handy when you are debugging across hundreds of servers as installation is clear simple. And its FREE
  3. Nagios: It is the mother of all monitoring/alerting tools. It is very much customization but very much difficult to setup for beginners. There are sets of tools called nagios plugins that covers pretty much all important Linux metrics
  4. Munin
  5. Server density: A cloudbased paid service that collects important Linux metrics and gives users ability to write own plugins.
  6. New Relic: Another well know hosted monitoring service.
  7. Zabbix
share|improve this answer

check the eginnovations Linux monitoring tool - http://www.eginnovations.com/web/linux-server-monitoring.htm

web-based, simple to install and even support Linux virtualization.

share|improve this answer

For the last few years I have used:

System Load Indicator

enter image description here

available from Software Centre

share|improve this answer
    
nice one : System Load Indicator –  Qasim Feb 22 '14 at 21:52

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.

enter image description here

Download from here

Conky

One of my personal favourites

enter image description here

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.

enter image description here

Glances

To install:

sudo apt-get install python-pip build-essential python-dev
sudo pip install Glances
sudo pip install PySensors

enter image description here

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:

sudo apt-get install sysstat

To start the report, run this command:

iostat

To check only CPU statistics, use this command:

iostat -c

For more parameters, use this command:

iostat --help

MPSTAT

The mpstat command line utility will display average CPU usage per processor. To run it, use simply this command:

mpstat

For CPU usage per processor, use this command:

mpstat -P ALL

Saidar

Saidar also allows to monitor system device activities via the command line.

enter image description here

You can install is with this command:

sudo apt-get install saidar

To start monitoring, run this command:

saidar -c -d 1

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.).

enter image description here

To install GKrellM, run this command:

sudo apt-get install gkrellm

Monitorix

Monitorix is another application with a web-based user interface for monitoring system devices.

enter image description here

Install it with these commands:

sudo add-apt-repository ppa:upubuntu-com/ppa
sudo apt-get update
sudo apt-get install monitorix

Start Monitorix via this URL:

http://localhost/monitorix/

 

share|improve this answer
    
Thanks that is a very good answer –  Qasim Mar 8 '14 at 11:17
1  
@Qasim Thanks friend. I'm glad for that –  Maythux Mar 10 '14 at 6:19

There is a built in tool called gnome-system-monitor. It can do all of what you mentioned, except the heat Monitoring.

I Just thought that I should mention this.

share|improve this answer

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.

2

share|improve this answer

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

sudo apt-get install pip
sudo pip install psutil

Now that we have the modules installed, we can start coding.

First, create a file called usage.py.

gedit ~/usage.py

Start by importing psutil

import psutil

Then, create a function to monitor the percentage your CPU cores are running at.

def cpu_perc(): 

    cpu_perc = psutil.cpu_percent(interval=1, percpu=True) 
    for i in range(len(cpu_perc)):
        print "CPU Core", str(i+1),":", str(cpu_perc[i]), "%"

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 called cpu_perc.

This loop right here

for i in range(len(cpu_num)):
    print "CPU Core", str(i+1),":", str(cpu_perc[i]), "%"

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.

def ram_perc():
    mem = psutil.virtual_memory()
    mem_perc = mem.percent
    print "RAM: ", mem_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.

def net():
    net = psutil.net_io_counters()
    mbytes_sent = float(net.bytes_sent) / 1048576
    mbytes_recv = float(net.bytes_recv) / 1048576
    print "MB sent: ", mbytes_sent
    print "MB received: ", mbytes_recv

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.

def swap_perc():
    swap = psutil.swap_memory()
    swap_perc = swap.percent

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.

def disks():
    if len(sys.argv) > 1:
        for disk in range(1, len(sys.argv)):
            tmp = psutil.disk_usage(sys.argv[disk])
            print sys.argv[disk], "\n"
            print "Megabytes total: ",
            print str(float(tmp.total) / 1048576)
            print "Megabytes used: ",
            print str(float(tmp.used) / 1048576)
            print "Megabytes free: ",
            print str(float(tmp.free) / 1048576)
            print "Percentage used: ",
            print tmp.percent, "\n"

The original output of psutil.disk_usage is this,

>>>psutil.disk_usage('/')
sdiskusage(total=21378641920, used=4809781248, free=15482871808, percent=22.5)

but you can also just receive total, used, free, or percent.

The completed program: (the aforementioned functions were combined)

import psutil, os, sys
mem_perc = 0 #init var
swap_perc = 0 #init var
mbytes_sent = 0 #init var
mbytes_recv = 0 #init var
cpu_perc = 0 #init var
swap = 0 #init var
mem = 0 #init var
net = 0 #init var



def disp(degree):
    global cpu_perc
    global swap
    global swap_perc
    global mem
    global mem_perc
    global net
    global mbytes_sent
    global mbytes_recv

    cpu_perc = psutil.cpu_percent(interval=1, percpu=True)
    swap = psutil.swap_memory()
    swap_perc = swap.percent
    mem = psutil.virtual_memory()
    mem_perc = mem.percent
    net = psutil.net_io_counters()
    mbytes_sent = float(net.bytes_sent) / 1048576
    mbytes_recv = float(net.bytes_recv) / 1048576

    os.system('clear') #clear the screen

    print "-"*30
    print "CPU"
    print "-"*30
    print "CPU Temperature: " , degree, "'C"
    for i in range(len(cpu_perc)):
        print "CPU Core", str(i+1),":", str(cpu_perc[i]), "%"

    print "-"*30
    print "MEMORY"
    print "-"*30
    print "RAM: ", mem_perc, "%"
    print "Swap: ", swap_perc, "%"
    print "-"*30
    print "NETWORK"
    print "-"*30
    print "MB sent: ", mbytes_sent
    print "MB received: ", mbytes_recv
    print "-"*30
    print "DISKS"
    print "-"*30

    if len(sys.argv) > 1:
        for disk in range(1, len(sys.argv)):
            tmp = psutil.disk_usage(sys.argv[disk])
            print sys.argv[disk], "\n"
            print "Megabytes total: ",
            print str(float(tmp.total) / 1048576)
            print "Megabytes used: ",
            print str(float(tmp.used) / 1048576)
            print "Megabytes free: ",
            print str(float(tmp.free) / 1048576)
            print "Percentage used: ",
            print tmp.percent, "\n"

def main():
    print("Press Ctrl+C to exit")
    while True:
        temp = open("/sys/class/thermal/thermal_zone0/temp").read().strip().lstrip('temperature :').rstrip(' C')
        temp = float(temp) / 1000
        disp(temp)

main()

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.

$ python usage.py /

Press Ctrl+C to exit

------------------------------
CPU
------------------------------
CPU Temperature:  39.0 'C
CPU Core 1 : 4.8 %
CPU Core 2 : 1.0 %
CPU Core 3 : 0.0 %
CPU Core 4 : 4.9 %
------------------------------
MEMORY
------------------------------
RAM:  33.6 %
Swap:  6.4 %
------------------------------
NETWORK
------------------------------
MB sent:  2.93382358551
MB received:  17.2131490707
------------------------------
DISKS
------------------------------
/ 

Megabytes total:  13952.484375
Megabytes used:  8542.6640625
Megabytes free:  4678.5703125
Percentage used:  61.2 

/media/calvin/Data 

Megabytes total:  326810.996094
Megabytes used:  57536.953125
Megabytes free:  269274.042969
Percentage used:  17.6 

Hope this helps! Comment if you have any questions.

https://github.com/calthecoder/sysmon-1.0.1

share|improve this answer
    
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Ron Jun 14 at 9:38
    
@Ron - Okay, I'll add an edit to my post and show the basic scripting parts of sysmon in a couple of days. Thanks for the advice! –  calthecoder Jun 15 at 21:01
    
Check out meta.askubuntu.com/questions/13900/…. What did you try, exactly? –  muru Jun 19 at 11:45
    
@muru - Nevermind, now it is working. Thanks for the link! –  calthecoder Jun 20 at 12:18
    
@muru - But, to answer your question, I started the code block with three backticks followed by the language I wanted the syntax to be highlighted in, and ended with three backticks. –  calthecoder Jun 20 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.