SlideShare a Scribd company logo
Linux Monitoring
Mark Veltzer
mark@veltzer.net
Monitoring: definition
● Monitoring: The act of observing an application to find
out what it is doing.
● Monitoring can be used for debugging (e.g. it should
not be doing that!)
● Monitoring can be used for performance enhancing an
application (e.g. this part is taking to long, lets optimize
it)
● Monitoring can be used for understanding what an
application does (e.g. I didn't know it opened that file!)
Monitoring in Linux
● Linux has hundreds of tools for monitoring and has
enough facilities to enable you to easily build your own.
● Tools range from GUI tools (much like Windows task
manager) which are OK for beginners, to console GUI
tools which are more sophisticated, to much more
sophisticated command line tools that put to shame
anything you find in windows, to make it on your own
scripts that take data from /proc and other sources.
GUI monitoring tools
● gnome-system-monitor (gnome), ksysguard
(KDE), xfce-task-manager (xfce) and probably
more.
● The one for your desktop is probably already
installed. If not, you may install any of those
using your package manager.
● These can be located in your “start” menu or
could be launched from the command line with
the names above.
gnome-system-monitor
ksysguard
xfce-taskmanager
krunner
The GUI tools
● In all of these you can configure which columns to see for
each task (many columns are available).
● In some of these you can install “plug-ins” that show other
views (like disk usage on each disk in ksysguard).
● In most of these you can kill processes or the like.
● In a lot of the cases you already have a key binding to launch
these when you are logged in to the relevant desktop. For
instance, ksysguard can be launched from the KDE desktop
using CTRL+ESC.
● You can also create your own key bindings to launch these.
Console GUI monitoring tools
● GUI console are applications that have a GUI but
run inside the console.
● This means that you can use them over a terminal
when connecting to a remote machine.
● This makes them favorite amongst system
administrators and programmers since you can
monitor the production environment and your own
environment using the same tool chest.
top(1)
● Top is the most well known monitoring application
for Unix and Linux.
● It is also the one whose hidden features are the
most unknown.
● By default, top shows you the applications
consuming the most CPU at any given point in
time.
● But it can be used for other measurements as
well...
top
Top (features)
● k,r: kill or re-nice processes.
● d,s: set update interval.
● n,#: set number of tasks displayed.
● 1,I: control multi-cpu view mode.
● f,F: select fields to be shown and field to sort by.
● H: show info by threads (very useful for debugging
multi-threaded programs)
● ?: show you many more options
Using the monitoring tools
effectively
● Give your threads/processes names so that
you can understand what you are seeing (see
prctl(2) with PR_SET_NAME).
● Most tools support showing data for just one
thread/process/process group. Use that. e.g.
ps -p
● Use tools like watch(1) or write your own
scripts to automate the tools.

More Related Content

PDF
Linux System Monitoring basic commands
PPT
Linux monitoring and Troubleshooting for DBA's
PPTX
Process management in linux
PDF
Linux : Booting and runlevels
PPTX
A brief history of system calls
PPTX
Linux Run Level
PDF
Process management
PPTX
Linux process management
Linux System Monitoring basic commands
Linux monitoring and Troubleshooting for DBA's
Process management in linux
Linux : Booting and runlevels
A brief history of system calls
Linux Run Level
Process management
Linux process management

What's hot (20)

PDF
Linux: Hardware Settings
DOCX
Tier 2 net app baseline design standard revised nov 2011
PPTX
Linux Process & CF scheduling
DOCX
Perf stat windows
PDF
Module 13 - Troubleshooting
PDF
Processes in unix
PPT
Process and Threads in Linux - PPT
PPT
Bootloader and MMU (english)
PPT
101 1.3 runlevels , shutdown, and reboot
PDF
OS scheduling and The anatomy of a context switch
PPTX
Refining Linux
PPT
101 3.5 create, monitor and kill processes
PPTX
Linux startup
PDF
Linux Performance Profiling and Monitoring
PDF
Making Linux do Hard Real-time
PDF
PPTX
Lecture 5 process concept
PPTX
Os presentation process
PDF
Measuring directly from cpu hardware performance counters
Linux: Hardware Settings
Tier 2 net app baseline design standard revised nov 2011
Linux Process & CF scheduling
Perf stat windows
Module 13 - Troubleshooting
Processes in unix
Process and Threads in Linux - PPT
Bootloader and MMU (english)
101 1.3 runlevels , shutdown, and reboot
OS scheduling and The anatomy of a context switch
Refining Linux
101 3.5 create, monitor and kill processes
Linux startup
Linux Performance Profiling and Monitoring
Making Linux do Hard Real-time
Lecture 5 process concept
Os presentation process
Measuring directly from cpu hardware performance counters
Ad

Viewers also liked (11)

PPTX
Instalasi Ubuntu 16.04 (Xenial Xerus)
PPTX
PPSX
Install ubuntu
PPTX
Build Your NGO: Monitoring & Evaluation
PPTX
Ciekawostki o serii Diablo
PPT
Linux Troubleshooting
PDF
Advanced troubleshooting linux performance
PDF
How to Install Ubuntu as Dual
PPT
Project Monitoring & Evaluation
PPTX
Centralized vs. Onsite Monitoring
PPTX
Hemodynamic monitoring ppt
Instalasi Ubuntu 16.04 (Xenial Xerus)
Install ubuntu
Build Your NGO: Monitoring & Evaluation
Ciekawostki o serii Diablo
Linux Troubleshooting
Advanced troubleshooting linux performance
How to Install Ubuntu as Dual
Project Monitoring & Evaluation
Centralized vs. Onsite Monitoring
Hemodynamic monitoring ppt
Ad

Similar to Linux monitoring (20)

PDF
Opensource Software usability
PDF
Leveraging Android's Linux Heritage at AnDevCon IV
PPTX
system software and application software
ODP
Operativesystems
PPTX
Linux 开源操作系统发展新趋势
PPT
digital data processing types of OS utility.ppt
PDF
Linux Server Deep Dives (DrupalCon Amsterdam)
PDF
Leveraging Android's Linux Heritage at AnDevCon3
PDF
OSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
PPTX
What is software?
ODP
Introduction to Shell script
PDF
Hacking the Linux Kernel - An Introduction
PPTX
Computer software and operating system.pptx
PPTX
Software
PDF
What is version control software and why do you need it?
PDF
Chap2-Computer Software.pdf
PDF
Activity 5
PPTX
Full stack development
Opensource Software usability
Leveraging Android's Linux Heritage at AnDevCon IV
system software and application software
Operativesystems
Linux 开源操作系统发展新趋势
digital data processing types of OS utility.ppt
Linux Server Deep Dives (DrupalCon Amsterdam)
Leveraging Android's Linux Heritage at AnDevCon3
OSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
What is software?
Introduction to Shell script
Hacking the Linux Kernel - An Introduction
Computer software and operating system.pptx
Software
What is version control software and why do you need it?
Chap2-Computer Software.pdf
Activity 5
Full stack development

More from Mark Veltzer (12)

ODP
ODP
Gcc opt
ODP
Linux io
ODP
Linux logging
ODP
Linux multiplexing
ODP
Linux tmpfs
ODP
Multicore
ODP
Pthreads linux
ODP
Realtime
ODP
Streams
ODP
Volatile
ODP
Effective cplusplus
Gcc opt
Linux io
Linux logging
Linux multiplexing
Linux tmpfs
Multicore
Pthreads linux
Realtime
Streams
Volatile
Effective cplusplus

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Modernizing your data center with Dell and AMD
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
KodekX | Application Modernization Development
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
Spectral efficient network and resource selection model in 5G networks
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Modernizing your data center with Dell and AMD
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
KodekX | Application Modernization Development
Chapter 3 Spatial Domain Image Processing.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Linux monitoring

  • 2. Monitoring: definition ● Monitoring: The act of observing an application to find out what it is doing. ● Monitoring can be used for debugging (e.g. it should not be doing that!) ● Monitoring can be used for performance enhancing an application (e.g. this part is taking to long, lets optimize it) ● Monitoring can be used for understanding what an application does (e.g. I didn't know it opened that file!)
  • 3. Monitoring in Linux ● Linux has hundreds of tools for monitoring and has enough facilities to enable you to easily build your own. ● Tools range from GUI tools (much like Windows task manager) which are OK for beginners, to console GUI tools which are more sophisticated, to much more sophisticated command line tools that put to shame anything you find in windows, to make it on your own scripts that take data from /proc and other sources.
  • 4. GUI monitoring tools ● gnome-system-monitor (gnome), ksysguard (KDE), xfce-task-manager (xfce) and probably more. ● The one for your desktop is probably already installed. If not, you may install any of those using your package manager. ● These can be located in your “start” menu or could be launched from the command line with the names above.
  • 9. The GUI tools ● In all of these you can configure which columns to see for each task (many columns are available). ● In some of these you can install “plug-ins” that show other views (like disk usage on each disk in ksysguard). ● In most of these you can kill processes or the like. ● In a lot of the cases you already have a key binding to launch these when you are logged in to the relevant desktop. For instance, ksysguard can be launched from the KDE desktop using CTRL+ESC. ● You can also create your own key bindings to launch these.
  • 10. Console GUI monitoring tools ● GUI console are applications that have a GUI but run inside the console. ● This means that you can use them over a terminal when connecting to a remote machine. ● This makes them favorite amongst system administrators and programmers since you can monitor the production environment and your own environment using the same tool chest.
  • 11. top(1) ● Top is the most well known monitoring application for Unix and Linux. ● It is also the one whose hidden features are the most unknown. ● By default, top shows you the applications consuming the most CPU at any given point in time. ● But it can be used for other measurements as well...
  • 12. top
  • 13. Top (features) ● k,r: kill or re-nice processes. ● d,s: set update interval. ● n,#: set number of tasks displayed. ● 1,I: control multi-cpu view mode. ● f,F: select fields to be shown and field to sort by. ● H: show info by threads (very useful for debugging multi-threaded programs) ● ?: show you many more options
  • 14. Using the monitoring tools effectively ● Give your threads/processes names so that you can understand what you are seeing (see prctl(2) with PR_SET_NAME). ● Most tools support showing data for just one thread/process/process group. Use that. e.g. ps -p ● Use tools like watch(1) or write your own scripts to automate the tools.