SlideShare a Scribd company logo
1 of 14
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

What's hot

Linux: Hardware Settings
Linux: Hardware SettingsLinux: Hardware Settings
Linux: Hardware SettingsJohn Ombagi
 
Tier 2 net app baseline design standard revised nov 2011
Tier 2 net app baseline design standard   revised nov 2011Tier 2 net app baseline design standard   revised nov 2011
Tier 2 net app baseline design standard revised nov 2011Accenture
 
Linux Process & CF scheduling
Linux Process & CF schedulingLinux Process & CF scheduling
Linux Process & CF schedulingSangJung Woo
 
Perf stat windows
Perf stat windowsPerf stat windows
Perf stat windowsAccenture
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - TroubleshootingT. J. Saotome
 
Processes in unix
Processes in unixProcesses in unix
Processes in unixmiau_max
 
Process and Threads in Linux - PPT
Process and Threads in Linux - PPTProcess and Threads in Linux - PPT
Process and Threads in Linux - PPTQUONTRASOLUTIONS
 
Bootloader and MMU (english)
Bootloader and MMU (english)Bootloader and MMU (english)
Bootloader and MMU (english)Sneeker Yeh
 
101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and rebootAcácio Oliveira
 
OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchDaniel Ben-Zvi
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processesAcácio Oliveira
 
Linux Performance Profiling and Monitoring
Linux Performance Profiling and MonitoringLinux Performance Profiling and Monitoring
Linux Performance Profiling and MonitoringGeorg Schönberger
 
Os presentation process
Os presentation processOs presentation process
Os presentation processNaseer Ahmad
 
Measuring directly from cpu hardware performance counters
Measuring directly from cpu  hardware performance countersMeasuring directly from cpu  hardware performance counters
Measuring directly from cpu hardware performance countersJean-Philippe BEMPEL
 

What's hot (20)

Linux: Hardware Settings
Linux: Hardware SettingsLinux: Hardware Settings
Linux: Hardware Settings
 
Tier 2 net app baseline design standard revised nov 2011
Tier 2 net app baseline design standard   revised nov 2011Tier 2 net app baseline design standard   revised nov 2011
Tier 2 net app baseline design standard revised nov 2011
 
Linux Process & CF scheduling
Linux Process & CF schedulingLinux Process & CF scheduling
Linux Process & CF scheduling
 
Perf stat windows
Perf stat windowsPerf stat windows
Perf stat windows
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 
Processes in unix
Processes in unixProcesses in unix
Processes in unix
 
Process and Threads in Linux - PPT
Process and Threads in Linux - PPTProcess and Threads in Linux - PPT
Process and Threads in Linux - PPT
 
Linux
LinuxLinux
Linux
 
Bootloader and MMU (english)
Bootloader and MMU (english)Bootloader and MMU (english)
Bootloader and MMU (english)
 
101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot
 
OS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switchOS scheduling and The anatomy of a context switch
OS scheduling and The anatomy of a context switch
 
Refining Linux
Refining LinuxRefining Linux
Refining Linux
 
101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes101 3.5 create, monitor and kill processes
101 3.5 create, monitor and kill processes
 
Linux startup
Linux startupLinux startup
Linux startup
 
Linux Performance Profiling and Monitoring
Linux Performance Profiling and MonitoringLinux Performance Profiling and Monitoring
Linux Performance Profiling and Monitoring
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Tuned
TunedTuned
Tuned
 
Lecture 5 process concept
Lecture 5   process conceptLecture 5   process concept
Lecture 5 process concept
 
Os presentation process
Os presentation processOs presentation process
Os presentation process
 
Measuring directly from cpu hardware performance counters
Measuring directly from cpu  hardware performance countersMeasuring directly from cpu  hardware performance counters
Measuring directly from cpu hardware performance counters
 

Viewers also liked

Instalasi Ubuntu 16.04 (Xenial Xerus)
Instalasi Ubuntu 16.04 (Xenial Xerus)Instalasi Ubuntu 16.04 (Xenial Xerus)
Instalasi Ubuntu 16.04 (Xenial Xerus)anafatwa21
 
Install ubuntu
Install ubuntuInstall ubuntu
Install ubuntupramoddps
 
Build Your NGO: Monitoring & Evaluation
Build Your NGO: Monitoring & Evaluation Build Your NGO: Monitoring & Evaluation
Build Your NGO: Monitoring & Evaluation Allie Hoffman
 
Ciekawostki o serii Diablo
Ciekawostki o serii DiabloCiekawostki o serii Diablo
Ciekawostki o serii DiabloLukasz Michalik
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux TroubleshootingKeith Wright
 
Advanced troubleshooting linux performance
Advanced troubleshooting linux performanceAdvanced troubleshooting linux performance
Advanced troubleshooting linux performanceForthscale
 
How to Install Ubuntu as Dual
How to  Install Ubuntu as DualHow to  Install Ubuntu as Dual
How to Install Ubuntu as DualKanchilug
 
Centralized vs. Onsite Monitoring
Centralized vs. Onsite MonitoringCentralized vs. Onsite Monitoring
Centralized vs. Onsite MonitoringIMARC Research
 
Hemodynamic monitoring ppt
Hemodynamic monitoring pptHemodynamic monitoring ppt
Hemodynamic monitoring pptUma Binoy
 

Viewers also liked (11)

Instalasi Ubuntu 16.04 (Xenial Xerus)
Instalasi Ubuntu 16.04 (Xenial Xerus)Instalasi Ubuntu 16.04 (Xenial Xerus)
Instalasi Ubuntu 16.04 (Xenial Xerus)
 
Ubuntu 16.04
Ubuntu 16.04Ubuntu 16.04
Ubuntu 16.04
 
Install ubuntu
Install ubuntuInstall ubuntu
Install ubuntu
 
Build Your NGO: Monitoring & Evaluation
Build Your NGO: Monitoring & Evaluation Build Your NGO: Monitoring & Evaluation
Build Your NGO: Monitoring & Evaluation
 
Ciekawostki o serii Diablo
Ciekawostki o serii DiabloCiekawostki o serii Diablo
Ciekawostki o serii Diablo
 
Linux Troubleshooting
Linux TroubleshootingLinux Troubleshooting
Linux Troubleshooting
 
Advanced troubleshooting linux performance
Advanced troubleshooting linux performanceAdvanced troubleshooting linux performance
Advanced troubleshooting linux performance
 
How to Install Ubuntu as Dual
How to  Install Ubuntu as DualHow to  Install Ubuntu as Dual
How to Install Ubuntu as Dual
 
Project Monitoring & Evaluation
Project Monitoring & EvaluationProject Monitoring & Evaluation
Project Monitoring & Evaluation
 
Centralized vs. Onsite Monitoring
Centralized vs. Onsite MonitoringCentralized vs. Onsite Monitoring
Centralized vs. Onsite Monitoring
 
Hemodynamic monitoring ppt
Hemodynamic monitoring pptHemodynamic monitoring ppt
Hemodynamic monitoring ppt
 

Similar to Linux monitoring

Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVOpersys inc.
 
system software and application software
system software and application softwaresystem software and application software
system software and application softwareTallat Satti
 
Linux 开源操作系统发展新趋势
Linux 开源操作系统发展新趋势Linux 开源操作系统发展新趋势
Linux 开源操作系统发展新趋势Anthony Wong
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Amin Astaneh
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Opersys inc.
 
OSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
OSMC 2008 | Monitoring Tools Shootout by Tom De CoomanOSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
OSMC 2008 | Monitoring Tools Shootout by Tom De CoomanNETWAYS
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell scriptBhavesh Padharia
 
Hacking the Linux Kernel - An Introduction
Hacking the Linux Kernel - An IntroductionHacking the Linux Kernel - An Introduction
Hacking the Linux Kernel - An IntroductionLevente Kurusa
 
Computer software and operating system.pptx
Computer software and operating system.pptxComputer software and operating system.pptx
Computer software and operating system.pptxAayushAryal2
 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?Leonid Mamchenkov
 
Chap2-Computer Software.pdf
Chap2-Computer Software.pdfChap2-Computer Software.pdf
Chap2-Computer Software.pdfAFANJIPHILL
 
Full stack development
Full stack developmentFull stack development
Full stack developmentArnav Gupta
 

Similar to Linux monitoring (20)

Opensource Software usability
Opensource Software usabilityOpensource Software usability
Opensource Software usability
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IV
 
system software and application software
system software and application softwaresystem software and application software
system software and application software
 
Operativesystems
OperativesystemsOperativesystems
Operativesystems
 
Linux 开源操作系统发展新趋势
Linux 开源操作系统发展新趋势Linux 开源操作系统发展新趋势
Linux 开源操作系统发展新趋势
 
Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)Linux Server Deep Dives (DrupalCon Amsterdam)
Linux Server Deep Dives (DrupalCon Amsterdam)
 
Linux
LinuxLinux
Linux
 
Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3Leveraging Android's Linux Heritage at AnDevCon3
Leveraging Android's Linux Heritage at AnDevCon3
 
OSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
OSMC 2008 | Monitoring Tools Shootout by Tom De CoomanOSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
OSMC 2008 | Monitoring Tools Shootout by Tom De Cooman
 
What is software?
What is software?What is software?
What is software?
 
Introduction to Shell script
Introduction to Shell scriptIntroduction to Shell script
Introduction to Shell script
 
Hacking the Linux Kernel - An Introduction
Hacking the Linux Kernel - An IntroductionHacking the Linux Kernel - An Introduction
Hacking the Linux Kernel - An Introduction
 
Computer software and operating system.pptx
Computer software and operating system.pptxComputer software and operating system.pptx
Computer software and operating system.pptx
 
Software
SoftwareSoftware
Software
 
What is version control software and why do you need it?
What is version control software and why do you need it?What is version control software and why do you need it?
What is version control software and why do you need it?
 
Linux
LinuxLinux
Linux
 
Chap2-Computer Software.pdf
Chap2-Computer Software.pdfChap2-Computer Software.pdf
Chap2-Computer Software.pdf
 
Activity 5
Activity 5Activity 5
Activity 5
 
Full stack development
Full stack developmentFull stack development
Full stack development
 
Intro xp linux
Intro xp linuxIntro xp linux
Intro xp linux
 

More from Mark Veltzer (12)

Gcc
GccGcc
Gcc
 
Gcc opt
Gcc optGcc opt
Gcc opt
 
Linux io
Linux ioLinux io
Linux io
 
Linux logging
Linux loggingLinux logging
Linux logging
 
Linux multiplexing
Linux multiplexingLinux multiplexing
Linux multiplexing
 
Linux tmpfs
Linux tmpfsLinux tmpfs
Linux tmpfs
 
Multicore
MulticoreMulticore
Multicore
 
Pthreads linux
Pthreads linuxPthreads linux
Pthreads linux
 
Realtime
RealtimeRealtime
Realtime
 
Streams
StreamsStreams
Streams
 
Volatile
VolatileVolatile
Volatile
 
Effective cplusplus
Effective cplusplusEffective cplusplus
Effective cplusplus
 

Recently uploaded

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Recently uploaded (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

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.