SlideShare a Scribd company logo
Linux Monitoring and Troubleshooting
By
MySQL Consulting
Team
About MyDBOPS
• MySQL Consulting
• MySQL Support
• Remote DBA support.
• Expert MySQL solutions
• MariaDB, Percona, Galera, TokuDB are
supported too.
Agenda
• Introduction
• Linux Architecture
• Devices we monitor
• Important tools
• Examples
INTRODUCTION
 Unix-like computer operating system.
 The monitoring and maintenance of the system is the most important task.
 There are many commands line utilities created for this purpose.
CPU l
Network Bandwidth
Memory usage
Disk usage
Syslogs & A
Running processes
etc.
Linux Architecture
Devices we monitor
users
Important tools
netstat
free
Df
Du
ps
history
lsof
top
systat
Sar
iostat
vmstat
Pidstat
mpstat
ping
telnet
ifconfig
w & uptime
who
whoami
Top
 Small tool, pre-installed in many unix systems.
 Display all running and active real time process
in ordered list & updates it regularly.
 CPU usage, Memory usage, Swap Memory, Cache Size,
Buffer Size, Process PID, User, Commands and much
more
 shows high memory and cpu utilization of a running
processes.
sysstat
 powerful logging and monitoring tool for Linux/Unix systems.
 contains utilities to monitor system performance and usage activity.
 used to monitor system performance and troubleshoot problems.
 sysstat is a go-to for power users and can log and track pretty much everything going on
within
your Linux box.
To install :
• redhat based - yum install sysstat
• Debian based - apt-get install sysstat
sar
 Sar(System Activity Report) is part of the sysstat package.
 collects and displays ALL system activities statistics.
 can monitor performance of various Linux subsystems (CPU, Memory, I/O..) in real time.
 also collect all performance data on an on-going basis, store them, and do historical analysis to
identify bottlenecks.
 collected information can be used with ksar to plot graphs.
Sar examples
CPU Usage of ALL CPUs (sar -u)
 This gives the cumulative real-time CPU usage of all CPUs.
 sar -u 1 3 Displays real time CPU usage every 1 second
for 3 times.
 “-P ALL” indicates that it should displays statistics for ALL
the individual Cores.
%user - % of cpu utilz. that occurred while executing at user level
%nice – at user level with nice priority.
%system – at sytem level
%iowait - % of time that cpu were idle during which s/m had an
outstanding disk I/O request
%idle – idle & s/m did not have an oustanding disk i/o
%steal - % of time spent in involuntary wait by cpu/cpu’s
Sar examples
• Memory Free and Used (sar -r)
 This reports the memory statistics.
 “1 3 reports for every 1 seconds a total of 3 times.″
 focus on “kbmemfree” and “kbmemused” for free and used memory.
Sar examples
• Overall I/O Activities (sar -b)
 This reports I/O statistics.
 “1 3 reports for every 1 seconds a total of 3 times.″
 tps – Transactions per second (this includes both read and write)
 rtps – Read transactions per second
 wtps – Write transactions per second
 bread/s – Bytes read per second
 bwrtn/s – Bytes written per second
Sar examples
• Individual Block Device I/O Activities (sar -d)
 To identify the activities by the individual block devices
(i.e a specific mount point, or LUN, or partition)
 The device name (DEV column) can display the actual
device name, use “sar -d”
tps –no of transfer per second
rd_sec/s – no sector read from device
wr_sec/s – no of sectors write from
device
avgrq-sz – avg size in sectors of the
req that were issued to device.
avgqu-sz – avg queue length of
request
await – avg time for i/o req.
svctm – avg service time for i/o req
%util – % of cputime during which i/o
req where issued
Sar examples
• Reports run queue and load average (sar -q)
 This reports the run queue size and load average of last 1 minute, 5 minutes, and 15 minutes.
 “1 3 reports for every 1 seconds a total of 3 times.″
runq-sz – run queue length
(no of task wtng for run time)
plist-sz – no of tasks in the task list
Sar examples
• To view previous records(sar –f)
 To view old day records
 Followed by path of old files
 Maintains one month records
sar -f /var/log/sa/sa15
sar -f /var/log/sa/sa15 -q 1 3
LC_ALL=C sar -f /var/log/sa/sa14 -A
iostat
 simple tool that will collect and show system
input and output storage device statistics.
 often used to trace storage device performance
issues including devices, local disks, remote disks
such as NFS.
%user - % of cpu utilz. that occurred while executing at user level
%nice – at user level with nice priority.
%system – at sytem level
%iowait - % of time that cpu were idle during which s/m had an
outstanding disk I/O request
%idle – idle & s/m did not have an oustanding disk i/o
%steal - % of time spent in involuntary wait by cpu/cpu’s
blk_read/s – amt of data read from device
blk_wrtn/s – amt of data write to device
Blk_read - total no of block reads
Blk_wrtn - total no of block writes
vmstat
 Summary information of Memory, Processes, Paging etc.
 used to display statistics of virtual memory, kernerl threads, disks, system processes, I/O
blocks, interrupts, CPU activity and much more.
r: The no of processes waiting for run time. b - The no of processes in uninterruptable sle
bi: Blocks sent to a block device (blocks/s). bo-: Blocks received from a block device (blocks/s).
si – Amount of memory swapped in from disk (kB/s). so – Amount of memory swapped to disk (kB/s).
in: The no of interrupts/s including the clock. cs : The number of context switches per second.
us: user time sy: system time id: idle time
pidstat
 pidstat is a part of sysstat utility.
 To monitor an individual process which is managed by kernel and generate report.
 Can also be used for monitoring the child processes of selected tasks.
 reports various statistics including CPU used by a process, disk usage statistics of a process,
statistics for threads associated with selected tasks and child processes.
Display statistics for all running process - pidstat -p ALL
Display statistics for a particular process - pidstat -p pid (process id of application)
Display statistics based on process name - pidstat -C “mysql”
Display Statistics of Dependent Process in
Tree Format using –t - pidstat -t -C "mysql"
mpstat
 mpstat is a part of sysstat utility.
 To monitor CPU utilization in our system.
 Will be more useful if our system has multiple processor.
Print CPU utilization per processors - mpstat -P 0 , mpstat -P 1
Print all CPU Utilization - mpstat -P ALL
Print CPU utilization using intervals - mpstat 3 4
Print mpstat version - mpstat -V
netstat
 monitoring incoming and outgoing network packets statistics as well as interface statistics.
 very useful tool for every system administrator to monitor network performance and
troubleshoot network related problems..
free
 built-in command that displays the total amount of free and used physical memory on your
machine.
 also displays the buffers used by the kernel at that given moment.
df
 df is an abbreviation for disk free.
 pre-installed program in all unix systems used to display the amount of available disk space for
filesystem which the user have access to.
du
 Linux “du” (Disk Usage) is a standard Unix/Linux command.
 used to check the information of disk usage of files and
directories on a machine.
 has many parameter options that can be used to get the
results in many formats.
 also displays the files and directory sizes in a recursively
manner.
ps
 basic commands for viewing the processes running on the system
 It provides a snapshot of the current processes along with detailed information like user id, cpu
usage, memory usage, command name etc.
 It does not display data in real time like top or htop commands.
lsof
 lsof meaning 'List Open Files' is used to find out which files are open by which process.
 when a disk cannot be un-mounted as it says the files are being used.
lsof some examples
 List User Specific Opened Files
lsof -u mydbops
 Exclude User with ‘^’ Character
lsof -i -u^root
 Kill all Activity of Particular User
kill -9 `lsof -t -u mydbops`
 List all Network Connections
lsof -i
 Search by PID
lsof -p 1
ping
 used to find out whether the peer host/gateway is reachable.
 how much time it takes for that data to be exchanged.
 default ping waits for 1 second before sending the next packet. increase or decrease using
option -i.
ping 122.166.212.214
ping -i 5 122.166.212.214
ping -c 3 122.166.212.214
telnet
 used for interactive communication with another host using the TELNET protocol.
 command mode.
Syntax : telnet host port
w & uptime
 w - displays information about the users currently on the machine, and their processes
 uptime - Tell how long the system has been running.
who & whoami
 who - prints information about all users who are currently logged in.
 Displays the username, line, and time of all currently logged-in sessions.
 whoami - This command prints the username associated with the current effective user ID.
history
 The history command can be used to list Bash's log of the commands you have typed:
 The history command performs one of several operations related to recently-executed
commands recorded in a history.
Syntax: history
Eg: history | less
 Search the history using Control+R
How MyDBOPS Can Help You
• MySQL Consulting
• MySQL Support
• Remote DBA
• 24 * 7 Support
Contact : mysqlsupport@mydbops.com
Thank You

More Related Content

PDF
Linux Performance Profiling and Monitoring
PDF
Ceph and RocksDB
PPT
Using galera replication to create geo distributed clusters on the wan
PPT
NETWORK FILE SYSTEM
PDF
Module 13 - Troubleshooting
PPTX
Basic commands of linux
PPTX
Linux basic commands
PPTX
The TCP/IP Stack in the Linux Kernel
Linux Performance Profiling and Monitoring
Ceph and RocksDB
Using galera replication to create geo distributed clusters on the wan
NETWORK FILE SYSTEM
Module 13 - Troubleshooting
Basic commands of linux
Linux basic commands
The TCP/IP Stack in the Linux Kernel

What's hot (20)

PPTX
Redhat ha cluster with pacemaker
PPT
Linux Troubleshooting
PPT
Galera Cluster Best Practices for DBA's and DevOps Part 1
PPTX
MySQL8.0_performance_schema.pptx
PDF
Linux Systems Performance 2016
ODP
Sockets and Socket-Buffer
PPT
PDF
How to Manage Scale-Out Environments with MariaDB MaxScale
PPTX
Introduction to Linux
PDF
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
PDF
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
PDF
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
PPTX
SQL Server Clustering Part1
PPT
PDF
Linux System Monitoring basic commands
PDF
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
PDF
MySQL Performance Schema in Action
PDF
Ceph Object Storage Reference Architecture Performance and Sizing Guide
PDF
Process Address Space: The way to create virtual address (page table) of user...
PPTX
ProxySQL for MySQL
Redhat ha cluster with pacemaker
Linux Troubleshooting
Galera Cluster Best Practices for DBA's and DevOps Part 1
MySQL8.0_performance_schema.pptx
Linux Systems Performance 2016
Sockets and Socket-Buffer
How to Manage Scale-Out Environments with MariaDB MaxScale
Introduction to Linux
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Tanel Poder - Troubleshooting Complex Oracle Performance Issues - Part 2
Course 102: Lecture 20: Networking In Linux (Basic Concepts)
SQL Server Clustering Part1
Linux System Monitoring basic commands
What’s the Best PostgreSQL High Availability Framework? PAF vs. repmgr vs. Pa...
MySQL Performance Schema in Action
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Process Address Space: The way to create virtual address (page table) of user...
ProxySQL for MySQL
Ad

Similar to Linux monitoring and Troubleshooting for DBA's (20)

PDF
Essential Linux Commands for DBAs
PDF
OSDC 2015: Georg Schönberger | Linux Performance Profiling and Monitoring
PDF
Linux Performance Tools 2014
PDF
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
PDF
OSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
PPT
16aug06.ppt
PDF
Hotsos Advanced Linux Tools
PDF
LISA2019 Linux Systems Performance
PDF
PDF
How to Install Configure and Use sysstat utils on RHEL 7
PPTX
Learning Linux Series Administrator Commands.pptx
PDF
MeetBSD2014 Performance Analysis
PDF
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
PDF
YOW2020 Linux Systems Performance
PPTX
Broken Linux Performance Tools 2016
PDF
Inspection and maintenance tools (Linux / OpenStack)
PDF
Linux Performance Tools
PPT
Servers and Processes: Behavior and Analysis
PDF
#WeSpeakLinux Session
PDF
KCC_Final.pdf
Essential Linux Commands for DBAs
OSDC 2015: Georg Schönberger | Linux Performance Profiling and Monitoring
Linux Performance Tools 2014
OSMC 2015 | Linux Performance Profiling and Monitoring by Werner Fischer
OSMC 2015: Linux Performance Profiling and Monitoring by Werner Fischer
16aug06.ppt
Hotsos Advanced Linux Tools
LISA2019 Linux Systems Performance
How to Install Configure and Use sysstat utils on RHEL 7
Learning Linux Series Administrator Commands.pptx
MeetBSD2014 Performance Analysis
OSDC 2017 - Werner Fischer - Linux performance profiling and monitoring
YOW2020 Linux Systems Performance
Broken Linux Performance Tools 2016
Inspection and maintenance tools (Linux / OpenStack)
Linux Performance Tools
Servers and Processes: Behavior and Analysis
#WeSpeakLinux Session
KCC_Final.pdf
Ad

More from Mydbops (20)

PDF
Scaling TiDB for Large-Scale Application
PDF
AWS MySQL Showdown - RDS vs RDS Multi AZ vs Aurora vs Serverless - Mydbops...
PDF
Mastering Vector Search with MongoDB Atlas - Manosh Malai - Mydbops MyWebinar 39
PDF
Migration Journey To TiDB - Kabilesh PR - Mydbops MyWebinar 38
PDF
AWS Blue Green Deployment for Databases - Mydbops
PDF
What's New In MySQL 8.4 LTS Mydbops MyWebinar Edition 36
PDF
What's New in PostgreSQL 17? - Mydbops MyWebinar Edition 35
PDF
What's New in MongoDB 8.0 - Mydbops MyWebinar Edition 34
PDF
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
PDF
Read/Write Splitting using MySQL Router - Mydbops Meetup16
PDF
TiDB - From Data to Discovery: Exploring the Intersection of Distributed Dat...
PDF
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
PDF
Demystifying Real time Analytics with TiDB
PDF
Must Know Postgres Extension for DBA and Developer during Migration
PDF
Efficient MySQL Indexing and what's new in MySQL Explain
PDF
Scale your database traffic with Read & Write split using MySQL Router
PDF
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
PDF
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
PDF
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
PDF
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Scaling TiDB for Large-Scale Application
AWS MySQL Showdown - RDS vs RDS Multi AZ vs Aurora vs Serverless - Mydbops...
Mastering Vector Search with MongoDB Atlas - Manosh Malai - Mydbops MyWebinar 39
Migration Journey To TiDB - Kabilesh PR - Mydbops MyWebinar 38
AWS Blue Green Deployment for Databases - Mydbops
What's New In MySQL 8.4 LTS Mydbops MyWebinar Edition 36
What's New in PostgreSQL 17? - Mydbops MyWebinar Edition 35
What's New in MongoDB 8.0 - Mydbops MyWebinar Edition 34
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Read/Write Splitting using MySQL Router - Mydbops Meetup16
TiDB - From Data to Discovery: Exploring the Intersection of Distributed Dat...
MySQL InnoDB Storage Engine: Deep Dive - Mydbops
Demystifying Real time Analytics with TiDB
Must Know Postgres Extension for DBA and Developer during Migration
Efficient MySQL Indexing and what's new in MySQL Explain
Scale your database traffic with Read & Write split using MySQL Router
PostgreSQL Schema Changes with pg-osc - Mydbops @ PGConf India 2024
Choosing the Right Database: Exploring MySQL Alternatives for Modern Applicat...
Mastering Aurora PostgreSQL Clusters for Disaster Recovery
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...

Recently uploaded (20)

PDF
Transforming Manufacturing operations through Intelligent Integrations
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced IT Governance
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
Cloud computing and distributed systems.
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Transforming Manufacturing operations through Intelligent Integrations
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced IT Governance
The AUB Centre for AI in Media Proposal.docx
Advanced Soft Computing BINUS July 2025.pdf
Cloud computing and distributed systems.
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Linux monitoring and Troubleshooting for DBA's

  • 1. Linux Monitoring and Troubleshooting By MySQL Consulting Team
  • 2. About MyDBOPS • MySQL Consulting • MySQL Support • Remote DBA support. • Expert MySQL solutions • MariaDB, Percona, Galera, TokuDB are supported too.
  • 3. Agenda • Introduction • Linux Architecture • Devices we monitor • Important tools • Examples
  • 4. INTRODUCTION  Unix-like computer operating system.  The monitoring and maintenance of the system is the most important task.  There are many commands line utilities created for this purpose. CPU l Network Bandwidth Memory usage Disk usage Syslogs & A Running processes etc.
  • 8. Top  Small tool, pre-installed in many unix systems.  Display all running and active real time process in ordered list & updates it regularly.  CPU usage, Memory usage, Swap Memory, Cache Size, Buffer Size, Process PID, User, Commands and much more  shows high memory and cpu utilization of a running processes.
  • 9. sysstat  powerful logging and monitoring tool for Linux/Unix systems.  contains utilities to monitor system performance and usage activity.  used to monitor system performance and troubleshoot problems.  sysstat is a go-to for power users and can log and track pretty much everything going on within your Linux box. To install : • redhat based - yum install sysstat • Debian based - apt-get install sysstat
  • 10. sar  Sar(System Activity Report) is part of the sysstat package.  collects and displays ALL system activities statistics.  can monitor performance of various Linux subsystems (CPU, Memory, I/O..) in real time.  also collect all performance data on an on-going basis, store them, and do historical analysis to identify bottlenecks.  collected information can be used with ksar to plot graphs.
  • 11. Sar examples CPU Usage of ALL CPUs (sar -u)  This gives the cumulative real-time CPU usage of all CPUs.  sar -u 1 3 Displays real time CPU usage every 1 second for 3 times.  “-P ALL” indicates that it should displays statistics for ALL the individual Cores. %user - % of cpu utilz. that occurred while executing at user level %nice – at user level with nice priority. %system – at sytem level %iowait - % of time that cpu were idle during which s/m had an outstanding disk I/O request %idle – idle & s/m did not have an oustanding disk i/o %steal - % of time spent in involuntary wait by cpu/cpu’s
  • 12. Sar examples • Memory Free and Used (sar -r)  This reports the memory statistics.  “1 3 reports for every 1 seconds a total of 3 times.″  focus on “kbmemfree” and “kbmemused” for free and used memory.
  • 13. Sar examples • Overall I/O Activities (sar -b)  This reports I/O statistics.  “1 3 reports for every 1 seconds a total of 3 times.″  tps – Transactions per second (this includes both read and write)  rtps – Read transactions per second  wtps – Write transactions per second  bread/s – Bytes read per second  bwrtn/s – Bytes written per second
  • 14. Sar examples • Individual Block Device I/O Activities (sar -d)  To identify the activities by the individual block devices (i.e a specific mount point, or LUN, or partition)  The device name (DEV column) can display the actual device name, use “sar -d” tps –no of transfer per second rd_sec/s – no sector read from device wr_sec/s – no of sectors write from device avgrq-sz – avg size in sectors of the req that were issued to device. avgqu-sz – avg queue length of request await – avg time for i/o req. svctm – avg service time for i/o req %util – % of cputime during which i/o req where issued
  • 15. Sar examples • Reports run queue and load average (sar -q)  This reports the run queue size and load average of last 1 minute, 5 minutes, and 15 minutes.  “1 3 reports for every 1 seconds a total of 3 times.″ runq-sz – run queue length (no of task wtng for run time) plist-sz – no of tasks in the task list
  • 16. Sar examples • To view previous records(sar –f)  To view old day records  Followed by path of old files  Maintains one month records sar -f /var/log/sa/sa15 sar -f /var/log/sa/sa15 -q 1 3 LC_ALL=C sar -f /var/log/sa/sa14 -A
  • 17. iostat  simple tool that will collect and show system input and output storage device statistics.  often used to trace storage device performance issues including devices, local disks, remote disks such as NFS. %user - % of cpu utilz. that occurred while executing at user level %nice – at user level with nice priority. %system – at sytem level %iowait - % of time that cpu were idle during which s/m had an outstanding disk I/O request %idle – idle & s/m did not have an oustanding disk i/o %steal - % of time spent in involuntary wait by cpu/cpu’s blk_read/s – amt of data read from device blk_wrtn/s – amt of data write to device Blk_read - total no of block reads Blk_wrtn - total no of block writes
  • 18. vmstat  Summary information of Memory, Processes, Paging etc.  used to display statistics of virtual memory, kernerl threads, disks, system processes, I/O blocks, interrupts, CPU activity and much more. r: The no of processes waiting for run time. b - The no of processes in uninterruptable sle bi: Blocks sent to a block device (blocks/s). bo-: Blocks received from a block device (blocks/s). si – Amount of memory swapped in from disk (kB/s). so – Amount of memory swapped to disk (kB/s). in: The no of interrupts/s including the clock. cs : The number of context switches per second. us: user time sy: system time id: idle time
  • 19. pidstat  pidstat is a part of sysstat utility.  To monitor an individual process which is managed by kernel and generate report.  Can also be used for monitoring the child processes of selected tasks.  reports various statistics including CPU used by a process, disk usage statistics of a process, statistics for threads associated with selected tasks and child processes. Display statistics for all running process - pidstat -p ALL Display statistics for a particular process - pidstat -p pid (process id of application) Display statistics based on process name - pidstat -C “mysql” Display Statistics of Dependent Process in Tree Format using –t - pidstat -t -C "mysql"
  • 20. mpstat  mpstat is a part of sysstat utility.  To monitor CPU utilization in our system.  Will be more useful if our system has multiple processor. Print CPU utilization per processors - mpstat -P 0 , mpstat -P 1 Print all CPU Utilization - mpstat -P ALL Print CPU utilization using intervals - mpstat 3 4 Print mpstat version - mpstat -V
  • 21. netstat  monitoring incoming and outgoing network packets statistics as well as interface statistics.  very useful tool for every system administrator to monitor network performance and troubleshoot network related problems..
  • 22. free  built-in command that displays the total amount of free and used physical memory on your machine.  also displays the buffers used by the kernel at that given moment.
  • 23. df  df is an abbreviation for disk free.  pre-installed program in all unix systems used to display the amount of available disk space for filesystem which the user have access to.
  • 24. du  Linux “du” (Disk Usage) is a standard Unix/Linux command.  used to check the information of disk usage of files and directories on a machine.  has many parameter options that can be used to get the results in many formats.  also displays the files and directory sizes in a recursively manner.
  • 25. ps  basic commands for viewing the processes running on the system  It provides a snapshot of the current processes along with detailed information like user id, cpu usage, memory usage, command name etc.  It does not display data in real time like top or htop commands.
  • 26. lsof  lsof meaning 'List Open Files' is used to find out which files are open by which process.  when a disk cannot be un-mounted as it says the files are being used.
  • 27. lsof some examples  List User Specific Opened Files lsof -u mydbops  Exclude User with ‘^’ Character lsof -i -u^root  Kill all Activity of Particular User kill -9 `lsof -t -u mydbops`  List all Network Connections lsof -i  Search by PID lsof -p 1
  • 28. ping  used to find out whether the peer host/gateway is reachable.  how much time it takes for that data to be exchanged.  default ping waits for 1 second before sending the next packet. increase or decrease using option -i. ping 122.166.212.214 ping -i 5 122.166.212.214 ping -c 3 122.166.212.214
  • 29. telnet  used for interactive communication with another host using the TELNET protocol.  command mode. Syntax : telnet host port
  • 30. w & uptime  w - displays information about the users currently on the machine, and their processes  uptime - Tell how long the system has been running.
  • 31. who & whoami  who - prints information about all users who are currently logged in.  Displays the username, line, and time of all currently logged-in sessions.  whoami - This command prints the username associated with the current effective user ID.
  • 32. history  The history command can be used to list Bash's log of the commands you have typed:  The history command performs one of several operations related to recently-executed commands recorded in a history. Syntax: history Eg: history | less  Search the history using Control+R
  • 33. How MyDBOPS Can Help You • MySQL Consulting • MySQL Support • Remote DBA • 24 * 7 Support Contact : [email protected]