SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
How to Install Configure and Use sysstat Utils
i | P a g e
Contents
Overview.......................................................................................................................................................1
SAR Package Installation...............................................................................................................................1
Verify Installed Status ...............................................................................................................................1
Install Package...........................................................................................................................................2
Enable Sysstat Service...............................................................................................................................2
Start Sysstat Service..................................................................................................................................3
Stop Sysstat Service ..................................................................................................................................3
Restart Sysstat Service..............................................................................................................................4
Check Sysstat Service Status.....................................................................................................................4
Sysstat – Default Configuration ....................................................................................................................5
Sysstat – Cron Job Configuration ..................................................................................................................5
Package Binaries and Purpose ......................................................................................................................6
SAR – Reports Generation ............................................................................................................................7
SAR Command – Syntax............................................................................................................................7
SAR Command – Examples .......................................................................................................................7
CPU Utilization Statistics...........................................................................................................................7
Memory Utilization Statistics....................................................................................................................8
Block Device Statistics...............................................................................................................................8
Hugepage Utilization Statistics .................................................................................................................9
Interrupt Statistics ....................................................................................................................................9
Network Statistics.....................................................................................................................................9
Network Statistics Options..................................................................................................................10
Kernel, INode and File Statistics..............................................................................................................10
Swap Space Utilization Statistics.............................................................................................................11
I/O Statistics............................................................................................................................................11
Paging Statistics ......................................................................................................................................12
Run Queue Length and Load Average Statistics .....................................................................................12
Swap Space Utilization Statistics.............................................................................................................13
SAR Report – Write Output File ..............................................................................................................13
SAR Report – Read Output File ...............................................................................................................13
SAR Report – Read Specific Day Report..................................................................................................14
How to Install Configure and Use sysstat Utils
ii | P a g e
SAR Report – Read Specific Day and Time Report..................................................................................14
How to Install Configure and Use sysstat Utils
1 | P a g e
Overview
The System Activity Report or SAR report; collects, reports and save(s) CPU, Memory & I/O usages at
regular intervals.
“sar” command supports generating different types of reports on fly and these reports can be exported
as well. In this guide we will explain sar command execution with various attributes.
SAR will collate and give information about below;
1. Block Device Statistics
2. Paging Statistics
3. Swap Statistics
4. CPU Utilization Statistics
5. Memory Utilization Statistics
6. Interrupt Statistics
7. Network Statistics
8. Power Management Statistics
9. Report I/O Statistics
10. Report Hugepages utilization statistics
SAR Package Installation
SAR package installation is simple and easy; to install the package follow the below steps.
Verify Installed Status
Before you install the package, check if the package is already installed, to know the package is already
installed, run the command;
yum list installed sysstat
How to Install Configure and Use sysstat Utils
2 | P a g e
Install Package
After checking the package installation and you found that the package is not installed, to install the
package run the command;
yum install sysstat -y -q && yum list installed sysstat -q
Enable Sysstat Service
After installation, ensure that the sysstat is enabled, so that it can startup automatically upon boot-up. To
enable the service run the command;
systemctl enable sysstat
How to Install Configure and Use sysstat Utils
3 | P a g e
Start Sysstat Service
Next, you need to start the sysstat service to generate the reports, to start the command;
systemctl start sysstat && systemctl status sysstat -l
Stop Sysstat Service
In case you would like to stop the service run the command;
systemctl stop sysstat && systemctl status sysstat -l
How to Install Configure and Use sysstat Utils
4 | P a g e
Restart Sysstat Service
In case you would like to restart the service run the command;
systemctl restart sysstat && systemctl status sysstat -l
Check Sysstat Service Status
To check the sysstat service status, run the command;
systemctl status sysstat -l
How to Install Configure and Use sysstat Utils
5 | P a g e
Sysstat – Default Configuration
Sysstat can be configured as per the business need and disk availability on the server, to view the current
configuration run the below command; Each attribute can be reconfigured as per the requirement of the
business.
egrep -v '^#|^$|^;' /etc/sysconfig/sysstat
Attribute Default Purpose
HISTORY 28 Configure statistics data to be retained for day(s)
COMPRESSAFTER 31 Compress statistics data after day(s)
SADC_OPTIONS "-S DISK" Configure system activity diagnostics collector option
ZIP "bzip2" Compression command for compressing
Sysstat – Cron Job Configuration
After configuring the sysstat, next we should configure cron job to collect periodical and store “SAR”
reports. To view current cron job, run the command below;
cat /etc/cron.d/sysstat
# Run system activity accounting tool every 10 minutes
*/10 * * * * root /usr/lib64/sa/sa1 1 1
# 0 * * * * root /usr/lib64/sa/sa1 600 6 &
# Generate a daily summary of process accounting at 23:53
53 23 * * * root /usr/lib64/sa/sa2 -A
Note: If the job is not configured, copy and paste the above snippet into new cron job.
How to Install Configure and Use sysstat Utils
6 | P a g e
Package Binaries and Purpose
Package / Binary Purpose / Usage
sysstat To define the maximum no. of days to save SAR reports
/usr/bin/sar Collect, report, or save system activity information
/usr/bin/iostat Report Central Processing Unit (CPU) statistics and input/output statistics
/usr/bin/mpstat Report processors related statistics
/usr/bin/sadf Display data collected by SAR in multiple formats
/usr/lib64/sa summarizes accounting information
/usr/lib64/sa/sa1 Collect and store binary data in the system activity daily data file
/usr/lib64/sa/sa2 Write a daily report in the “/var/log/sa” directory
/usr/lib64/sa/sadc System activity data collector
/usr/bin/cifsiostat Report CIFS statistics
/usr/bin/nfsiostat Report input/output statistics for network filesystems (NFS).
/usr/bin/pidstat Report statistics for Linux tasks.
/usr/lib/systemd/system/
sysstat.service
Sysstat Systemd Management control file
How to Install Configure and Use sysstat Utils
7 | P a g e
SAR – Reports Generation
One of the main purpose “SAR” package is to generate System activity reports on fly and export those
reports in different format.
SAR Command – Syntax
sar -[Options] [Interval] [Iteration Count]
sar -[Options] -s [hh:mm:ss] -e [hh:mm:ss] [Interval] [Iteration Count]
sar -o [output filename] [interval] [Iteration Count] >/dev/null 2>&1 &
SAR Command – Examples
SAR Command Purpose
sar -r 10 5 Memory utilization statistics every ten seconds
for 5 times.
sar -r -s 10:00:15 -e 10:15:00 Memory utilization statistics report between
specific timeframe.
sar -o /tmp/mem_stats -r -u 2 5 >/dev/null 2>&1 & Memory utilization statistics into output file.
CPU Utilization Statistics
To generate CPU Utilization statistics, run the command;
sar -u
sar -u [ALL] 2 2
Note: The above command will run 2 times for CPU utilization statistics every 2 seconds. “ALL” represents
all CPU related fields should be shown.
How to Install Configure and Use sysstat Utils
8 | P a g e
Memory Utilization Statistics
To generate CPU Utilization statistics, run the command;
sar -r
sar -r 2 2
Note: The above command will run 2 times for Memory utilization report every 2 seconds.
Block Device Statistics
To generate block devices statistics, run the command;
sar -d
sar -d 2 2
Note: The above command will run 2 times for each Block Device(s) report every 2 seconds.
How to Install Configure and Use sysstat Utils
9 | P a g e
Hugepage Utilization Statistics
To generate hugepage utilization statistics, run the command;
sar -H
sar -H 2 2
Note: The above command will run 2 times for huge pages info every 2 seconds.
Interrupt Statistics
To generate interrupt statistics, run the command;
sar -I 15 2 2
sar -I SUM 2 2
Note: The above command will run 2 times for all interrupts report every 2 seconds
Network Statistics
To generate network statistics, run the command;
sar -n [options] 2 2
sar -n DEV 2 2
How to Install Configure and Use sysstat Utils
10 | P a g e
Network Statistics Options
Option Purpose
DEV Network interfaces
EDEV Network interfaces (errors)
NFS NFS client
NFSD NFS server
SOCK Sockets (v4)
IP IP traffic (v4)
EIP IP traffic (v4) (errors)
ICMP ICMP traffic (v4)
EICMP ICMP traffic (v4) (errors)
TCP TCP traffic (v4)
ETCP TCP traffic (v4) (errors)
UDP UDP traffic (v4)
SOCK6 Sockets (v6)
IP6 IP traffic (v6)
EIP6 IP traffic (v6) (errors)
ICMP6 ICMP traffic (v6)
EICMP6 ICMP traffic (v6) (errors)
UDP6 UDP traffic (v6)
Kernel, INode and File Statistics
To generate INode, file and other kernel table statistics, run the command;
sar -v 2 5
How to Install Configure and Use sysstat Utils
11 | P a g e
Swap Space Utilization Statistics
To generate swap space utilization statistics, run the command;
sar -S
sar -S 2 2
Note: The above command will run 2 times for swap usage info report every 2 seconds.
I/O Statistics
To generate input/output (I/O) statistics, run the command;
sar -b
sar -b 2 2
Note: The above command will run 2 times for I/O transfer rates info every 2 seconds.
How to Install Configure and Use sysstat Utils
12 | P a g e
Paging Statistics
To generate paging statistics, run the command;
sar -B
sar -B 2 2
Note: The above command will run 2 times for paging usage info report every 2 seconds.
Run Queue Length and Load Average Statistics
To generate queue length and load averages statistics, run the command;
sar -q
sar -q 2 2
Note: The above command will run 2 times for load & queue usage info report every 2 seconds.
Field Purpose
runq-sz Run queue length (number of processes waiting for run time)
plist-sz Number of processes and threads in the process list
ldavg-1 System load average for the last minute
ldavg-5 System load average for the past 5 minutes
ldavg-15 System load average for the past 15 minutes
How to Install Configure and Use sysstat Utils
13 | P a g e
Swap Space Utilization Statistics
To generate swap space utilization statistics, run the command;
sar -S
sar -S 2 2
SAR Report – Write Output File
To store “sar” report to a data file, data file is stored in binary format and can be read by sar command,
to store the report/data into a file run the command;
sar -o /tmp/cpu_utilization_output_file -u 2 5 >/dev/null 2>&1 &
SAR Report – Read Output File
To read “sar” data file, run the command;
sar -f /tmp/cpu_utilization_output_file
How to Install Configure and Use sysstat Utils
14 | P a g e
SAR Report – Read Specific Day Report
All the data files are stored in the directory “/var/log/sa/” by default it’s configured for 28 days. In order
to read a specific day’s report, run the command;
sar -f /var/log/sa/saXX
sar -f /var/log/sa/sa10
Note: Day of the month is represented by saXX, where xx means day of month.
SAR Report – Read Specific Day and Time Report
All the data files are stored in the directory “/var/log/sa/” by default it’s configured for 28 days. In order
to read a specific day and time report, run the command;
sar -f /var/log/sa/saXX -e -s 21:00:00 -e 22:00:00
sar -f /var/log/sa/sa10 -e -s 21:00:00 -e 22:00:00
Note: Day of the month is represented by saXX, where XX means day of month.

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Comprehensive Terraform Training
Comprehensive Terraform TrainingComprehensive Terraform Training
Comprehensive Terraform Training
 
Senlin deep dive 2016
Senlin deep dive 2016Senlin deep dive 2016
Senlin deep dive 2016
 
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptxDevSecOps in the Cloud from the Lens of a  Well-Architected Framework.pptx
DevSecOps in the Cloud from the Lens of a Well-Architected Framework.pptx
 
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain. What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
What’s Mule 4.3? How Does Anytime RTF Help? Our insights explain.
 
Moving Applications into Azure Kubernetes
Moving Applications into Azure KubernetesMoving Applications into Azure Kubernetes
Moving Applications into Azure Kubernetes
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
 
[AWS & 베스핀글로벌, 바이오∙헬스케어∙제약사를 위한 세미나] AWS 클라우드 보안
[AWS & 베스핀글로벌, 바이오∙헬스케어∙제약사를 위한 세미나] AWS 클라우드 보안[AWS & 베스핀글로벌, 바이오∙헬스케어∙제약사를 위한 세미나] AWS 클라우드 보안
[AWS & 베스핀글로벌, 바이오∙헬스케어∙제약사를 위한 세미나] AWS 클라우드 보안
 
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
[OpenStack] 공개 소프트웨어 오픈스택 입문 & 파헤치기
 
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys MeetupsMuleSoft Runtime Fabric (RTF): Foundations  : MuleSoft Virtual Muleys Meetups
MuleSoft Runtime Fabric (RTF): Foundations : MuleSoft Virtual Muleys Meetups
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
 
Containers and Docker
Containers and DockerContainers and Docker
Containers and Docker
 
Resource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in MainframesResource Access Control Facility (RACF) in Mainframes
Resource Access Control Facility (RACF) in Mainframes
 
OpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platformOpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platform
 
Azure Container Apps
Azure Container AppsAzure Container Apps
Azure Container Apps
 
Awx
AwxAwx
Awx
 
Azure vm introduction
Azure  vm introductionAzure  vm introduction
Azure vm introduction
 
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
쿠알못이 Amazon EKS로 안정적인 서비스 운영하기 - 최용호(넥슨코리아) :: AWS Community Day 2020
 
Cloud Oracle
Cloud Oracle Cloud Oracle
Cloud Oracle
 
OpenShift Enterprise
OpenShift EnterpriseOpenShift Enterprise
OpenShift Enterprise
 

Destaque

Destaque (15)

How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7How To Protect SSH Access with Fail2Ban on RHEL 7
How To Protect SSH Access with Fail2Ban on RHEL 7
 
How To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShellHow To Check IE Enhanced Security Is Enabled Windows PowerShell
How To Check IE Enhanced Security Is Enabled Windows PowerShell
 
How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7How To Install and Configure Screen on CentOS 7
How To Install and Configure Screen on CentOS 7
 
How To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShellHow To Disable IE Enhanced Security Windows PowerShell
How To Disable IE Enhanced Security Windows PowerShell
 
How To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on UbuntuHow To Install and Configure Salt Master on Ubuntu
How To Install and Configure Salt Master on Ubuntu
 
Nginx bind() to 0.0.0.0:9080 failed
Nginx bind() to 0.0.0.0:9080 failedNginx bind() to 0.0.0.0:9080 failed
Nginx bind() to 0.0.0.0:9080 failed
 
How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7How To Configure Nginx Load Balancer on CentOS 7
How To Configure Nginx Load Balancer on CentOS 7
 
How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7How To Configure SNMP Logging on RHEL 7
How To Configure SNMP Logging on RHEL 7
 
How To View Current Execution Policy PowerShell
How To View Current Execution Policy PowerShellHow To View Current Execution Policy PowerShell
How To View Current Execution Policy PowerShell
 
How To Reset root Password on CentOS 7
How To Reset root Password on CentOS 7How To Reset root Password on CentOS 7
How To Reset root Password on CentOS 7
 
How to Upgrade Openfire on CentOS 7
How to Upgrade Openfire on CentOS 7How to Upgrade Openfire on CentOS 7
How to Upgrade Openfire on CentOS 7
 
How To Install and Use ABRT CLI on RHEL 7
How To Install and Use ABRT CLI on RHEL 7How To Install and Use ABRT CLI on RHEL 7
How To Install and Use ABRT CLI on RHEL 7
 
How To Find Package Installation Date on RHEL 7
How To Find Package Installation Date on RHEL 7How To Find Package Installation Date on RHEL 7
How To Find Package Installation Date on RHEL 7
 
How To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShellHow To Check file exists and Delete PowerShell
How To Check file exists and Delete PowerShell
 
How To Install and Configure SNMP on RHEL 7 or CentOS 7
How To Install and Configure SNMP on RHEL 7 or CentOS 7How To Install and Configure SNMP on RHEL 7 or CentOS 7
How To Install and Configure SNMP on RHEL 7 or CentOS 7
 

Semelhante a How to Install Configure and Use sysstat utils on RHEL 7

Honeywell igsmhs-install-guide
Honeywell igsmhs-install-guideHoneywell igsmhs-install-guide
Honeywell igsmhs-install-guide
Alarm Grid
 
Manual 770 extreme3
Manual 770 extreme3Manual 770 extreme3
Manual 770 extreme3
luisbes
 
Manual 770 extreme3
Manual 770 extreme3Manual 770 extreme3
Manual 770 extreme3
liourte
 

Semelhante a How to Install Configure and Use sysstat utils on RHEL 7 (20)

Linux Server Hardening - Steps by Steps
Linux Server Hardening - Steps by StepsLinux Server Hardening - Steps by Steps
Linux Server Hardening - Steps by Steps
 
How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7How To Install OpenFire in CentOS 7
How To Install OpenFire in CentOS 7
 
Install VMWare Tools CentOS 7
Install VMWare Tools CentOS 7Install VMWare Tools CentOS 7
Install VMWare Tools CentOS 7
 
Installation CentOS 6.3
Installation CentOS 6.3Installation CentOS 6.3
Installation CentOS 6.3
 
Hdf installing-hdf
Hdf installing-hdfHdf installing-hdf
Hdf installing-hdf
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7Install and Configure RSyslog – CentOS 7 / RHEL 7
Install and Configure RSyslog – CentOS 7 / RHEL 7
 
Honeywell igsmhs-install-guide
Honeywell igsmhs-install-guideHoneywell igsmhs-install-guide
Honeywell igsmhs-install-guide
 
Datastage
DatastageDatastage
Datastage
 
N68 c gs fx
N68 c gs fxN68 c gs fx
N68 c gs fx
 
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
How To Install and Generate Audit Reports in CentOS 7 or RHEL 7
 
Smart pos stepbystep-v2-0
Smart pos stepbystep-v2-0Smart pos stepbystep-v2-0
Smart pos stepbystep-v2-0
 
Manual 770 extreme3
Manual 770 extreme3Manual 770 extreme3
Manual 770 extreme3
 
Manual 770 extreme3
Manual 770 extreme3Manual 770 extreme3
Manual 770 extreme3
 
N68 c s ucc
N68 c s uccN68 c s ucc
N68 c s ucc
 
How To Install CentOS 7
How To Install CentOS 7How To Install CentOS 7
How To Install CentOS 7
 
Installing & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOSInstalling & Configuring IBM Domino 9 on CentOS
Installing & Configuring IBM Domino 9 on CentOS
 
Ch8 v70 os_en
Ch8 v70 os_enCh8 v70 os_en
Ch8 v70 os_en
 
Sap setup guide
Sap setup guideSap setup guide
Sap setup guide
 
FastFile.pdf
FastFile.pdfFastFile.pdf
FastFile.pdf
 

Mais de VCP Muthukrishna

Mais de VCP Muthukrishna (17)

How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7How to Fix Duplicate Packages in YUM on CentOS 7
How to Fix Duplicate Packages in YUM on CentOS 7
 
How To Install and Configure GNome on CentOS 7
How To Install and Configure GNome on CentOS 7How To Install and Configure GNome on CentOS 7
How To Install and Configure GNome on CentOS 7
 
How To Connect to Active Directory User Validation
How To Connect to Active Directory User ValidationHow To Connect to Active Directory User Validation
How To Connect to Active Directory User Validation
 
How To Connect To Active Directory PowerShell
How To Connect To Active Directory PowerShellHow To Connect To Active Directory PowerShell
How To Connect To Active Directory PowerShell
 
How To List Files on Remote Server - PowerShell
How To List Files on Remote Server - PowerShellHow To List Files on Remote Server - PowerShell
How To List Files on Remote Server - PowerShell
 
How To List Files and Display In HTML Format
How To List Files and Display In HTML FormatHow To List Files and Display In HTML Format
How To List Files and Display In HTML Format
 
How To Check and Delete a File via PowerShell
How To Check and Delete a File via PowerShellHow To Check and Delete a File via PowerShell
How To Check and Delete a File via PowerShell
 
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
Zimbra Troubleshooting - Mails not being Delivered or Deferred or Connection ...
 
How To Setup SSH Keys on CentOS 7
How To Setup SSH Keys on CentOS 7How To Setup SSH Keys on CentOS 7
How To Setup SSH Keys on CentOS 7
 
How To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on UbuntuHow To Install and Configure Open SSH Server on Ubuntu
How To Install and Configure Open SSH Server on Ubuntu
 
Windows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics - How To List PSDrive InfoWindows PowerShell Basics - How To List PSDrive Info
Windows PowerShell Basics - How To List PSDrive Info
 
How To List Nginx Modules Installed / Complied on CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7How To List Nginx Modules Installed / Complied on CentOS 7
How To List Nginx Modules Installed / Complied on CentOS 7
 
Windows PowerShell Basics – How To Create powershell for loop
Windows PowerShell Basics – How To Create powershell for loopWindows PowerShell Basics – How To Create powershell for loop
Windows PowerShell Basics – How To Create powershell for loop
 
How To Construct IF and Else Conditional Statements
How To Construct IF and Else Conditional StatementsHow To Construct IF and Else Conditional Statements
How To Construct IF and Else Conditional Statements
 
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create PowerShell Function Mandatory Parameter and Optional ParameterHow To Create PowerShell Function Mandatory Parameter and Optional Parameter
How To Create PowerShell Function Mandatory Parameter and Optional Parameter
 
How To Create Power Shell Function Mandatory Parameter Value
How To Create Power Shell Function Mandatory Parameter ValueHow To Create Power Shell Function Mandatory Parameter Value
How To Create Power Shell Function Mandatory Parameter Value
 
How To Create PowerShell Function
How To Create PowerShell FunctionHow To Create PowerShell Function
How To Create PowerShell Function
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

How to Install Configure and Use sysstat utils on RHEL 7

  • 1. How to Install Configure and Use sysstat Utils i | P a g e Contents Overview.......................................................................................................................................................1 SAR Package Installation...............................................................................................................................1 Verify Installed Status ...............................................................................................................................1 Install Package...........................................................................................................................................2 Enable Sysstat Service...............................................................................................................................2 Start Sysstat Service..................................................................................................................................3 Stop Sysstat Service ..................................................................................................................................3 Restart Sysstat Service..............................................................................................................................4 Check Sysstat Service Status.....................................................................................................................4 Sysstat – Default Configuration ....................................................................................................................5 Sysstat – Cron Job Configuration ..................................................................................................................5 Package Binaries and Purpose ......................................................................................................................6 SAR – Reports Generation ............................................................................................................................7 SAR Command – Syntax............................................................................................................................7 SAR Command – Examples .......................................................................................................................7 CPU Utilization Statistics...........................................................................................................................7 Memory Utilization Statistics....................................................................................................................8 Block Device Statistics...............................................................................................................................8 Hugepage Utilization Statistics .................................................................................................................9 Interrupt Statistics ....................................................................................................................................9 Network Statistics.....................................................................................................................................9 Network Statistics Options..................................................................................................................10 Kernel, INode and File Statistics..............................................................................................................10 Swap Space Utilization Statistics.............................................................................................................11 I/O Statistics............................................................................................................................................11 Paging Statistics ......................................................................................................................................12 Run Queue Length and Load Average Statistics .....................................................................................12 Swap Space Utilization Statistics.............................................................................................................13 SAR Report – Write Output File ..............................................................................................................13 SAR Report – Read Output File ...............................................................................................................13 SAR Report – Read Specific Day Report..................................................................................................14
  • 2. How to Install Configure and Use sysstat Utils ii | P a g e SAR Report – Read Specific Day and Time Report..................................................................................14
  • 3. How to Install Configure and Use sysstat Utils 1 | P a g e Overview The System Activity Report or SAR report; collects, reports and save(s) CPU, Memory & I/O usages at regular intervals. “sar” command supports generating different types of reports on fly and these reports can be exported as well. In this guide we will explain sar command execution with various attributes. SAR will collate and give information about below; 1. Block Device Statistics 2. Paging Statistics 3. Swap Statistics 4. CPU Utilization Statistics 5. Memory Utilization Statistics 6. Interrupt Statistics 7. Network Statistics 8. Power Management Statistics 9. Report I/O Statistics 10. Report Hugepages utilization statistics SAR Package Installation SAR package installation is simple and easy; to install the package follow the below steps. Verify Installed Status Before you install the package, check if the package is already installed, to know the package is already installed, run the command; yum list installed sysstat
  • 4. How to Install Configure and Use sysstat Utils 2 | P a g e Install Package After checking the package installation and you found that the package is not installed, to install the package run the command; yum install sysstat -y -q && yum list installed sysstat -q Enable Sysstat Service After installation, ensure that the sysstat is enabled, so that it can startup automatically upon boot-up. To enable the service run the command; systemctl enable sysstat
  • 5. How to Install Configure and Use sysstat Utils 3 | P a g e Start Sysstat Service Next, you need to start the sysstat service to generate the reports, to start the command; systemctl start sysstat && systemctl status sysstat -l Stop Sysstat Service In case you would like to stop the service run the command; systemctl stop sysstat && systemctl status sysstat -l
  • 6. How to Install Configure and Use sysstat Utils 4 | P a g e Restart Sysstat Service In case you would like to restart the service run the command; systemctl restart sysstat && systemctl status sysstat -l Check Sysstat Service Status To check the sysstat service status, run the command; systemctl status sysstat -l
  • 7. How to Install Configure and Use sysstat Utils 5 | P a g e Sysstat – Default Configuration Sysstat can be configured as per the business need and disk availability on the server, to view the current configuration run the below command; Each attribute can be reconfigured as per the requirement of the business. egrep -v '^#|^$|^;' /etc/sysconfig/sysstat Attribute Default Purpose HISTORY 28 Configure statistics data to be retained for day(s) COMPRESSAFTER 31 Compress statistics data after day(s) SADC_OPTIONS "-S DISK" Configure system activity diagnostics collector option ZIP "bzip2" Compression command for compressing Sysstat – Cron Job Configuration After configuring the sysstat, next we should configure cron job to collect periodical and store “SAR” reports. To view current cron job, run the command below; cat /etc/cron.d/sysstat # Run system activity accounting tool every 10 minutes */10 * * * * root /usr/lib64/sa/sa1 1 1 # 0 * * * * root /usr/lib64/sa/sa1 600 6 & # Generate a daily summary of process accounting at 23:53 53 23 * * * root /usr/lib64/sa/sa2 -A Note: If the job is not configured, copy and paste the above snippet into new cron job.
  • 8. How to Install Configure and Use sysstat Utils 6 | P a g e Package Binaries and Purpose Package / Binary Purpose / Usage sysstat To define the maximum no. of days to save SAR reports /usr/bin/sar Collect, report, or save system activity information /usr/bin/iostat Report Central Processing Unit (CPU) statistics and input/output statistics /usr/bin/mpstat Report processors related statistics /usr/bin/sadf Display data collected by SAR in multiple formats /usr/lib64/sa summarizes accounting information /usr/lib64/sa/sa1 Collect and store binary data in the system activity daily data file /usr/lib64/sa/sa2 Write a daily report in the “/var/log/sa” directory /usr/lib64/sa/sadc System activity data collector /usr/bin/cifsiostat Report CIFS statistics /usr/bin/nfsiostat Report input/output statistics for network filesystems (NFS). /usr/bin/pidstat Report statistics for Linux tasks. /usr/lib/systemd/system/ sysstat.service Sysstat Systemd Management control file
  • 9. How to Install Configure and Use sysstat Utils 7 | P a g e SAR – Reports Generation One of the main purpose “SAR” package is to generate System activity reports on fly and export those reports in different format. SAR Command – Syntax sar -[Options] [Interval] [Iteration Count] sar -[Options] -s [hh:mm:ss] -e [hh:mm:ss] [Interval] [Iteration Count] sar -o [output filename] [interval] [Iteration Count] >/dev/null 2>&1 & SAR Command – Examples SAR Command Purpose sar -r 10 5 Memory utilization statistics every ten seconds for 5 times. sar -r -s 10:00:15 -e 10:15:00 Memory utilization statistics report between specific timeframe. sar -o /tmp/mem_stats -r -u 2 5 >/dev/null 2>&1 & Memory utilization statistics into output file. CPU Utilization Statistics To generate CPU Utilization statistics, run the command; sar -u sar -u [ALL] 2 2 Note: The above command will run 2 times for CPU utilization statistics every 2 seconds. “ALL” represents all CPU related fields should be shown.
  • 10. How to Install Configure and Use sysstat Utils 8 | P a g e Memory Utilization Statistics To generate CPU Utilization statistics, run the command; sar -r sar -r 2 2 Note: The above command will run 2 times for Memory utilization report every 2 seconds. Block Device Statistics To generate block devices statistics, run the command; sar -d sar -d 2 2 Note: The above command will run 2 times for each Block Device(s) report every 2 seconds.
  • 11. How to Install Configure and Use sysstat Utils 9 | P a g e Hugepage Utilization Statistics To generate hugepage utilization statistics, run the command; sar -H sar -H 2 2 Note: The above command will run 2 times for huge pages info every 2 seconds. Interrupt Statistics To generate interrupt statistics, run the command; sar -I 15 2 2 sar -I SUM 2 2 Note: The above command will run 2 times for all interrupts report every 2 seconds Network Statistics To generate network statistics, run the command; sar -n [options] 2 2 sar -n DEV 2 2
  • 12. How to Install Configure and Use sysstat Utils 10 | P a g e Network Statistics Options Option Purpose DEV Network interfaces EDEV Network interfaces (errors) NFS NFS client NFSD NFS server SOCK Sockets (v4) IP IP traffic (v4) EIP IP traffic (v4) (errors) ICMP ICMP traffic (v4) EICMP ICMP traffic (v4) (errors) TCP TCP traffic (v4) ETCP TCP traffic (v4) (errors) UDP UDP traffic (v4) SOCK6 Sockets (v6) IP6 IP traffic (v6) EIP6 IP traffic (v6) (errors) ICMP6 ICMP traffic (v6) EICMP6 ICMP traffic (v6) (errors) UDP6 UDP traffic (v6) Kernel, INode and File Statistics To generate INode, file and other kernel table statistics, run the command; sar -v 2 5
  • 13. How to Install Configure and Use sysstat Utils 11 | P a g e Swap Space Utilization Statistics To generate swap space utilization statistics, run the command; sar -S sar -S 2 2 Note: The above command will run 2 times for swap usage info report every 2 seconds. I/O Statistics To generate input/output (I/O) statistics, run the command; sar -b sar -b 2 2 Note: The above command will run 2 times for I/O transfer rates info every 2 seconds.
  • 14. How to Install Configure and Use sysstat Utils 12 | P a g e Paging Statistics To generate paging statistics, run the command; sar -B sar -B 2 2 Note: The above command will run 2 times for paging usage info report every 2 seconds. Run Queue Length and Load Average Statistics To generate queue length and load averages statistics, run the command; sar -q sar -q 2 2 Note: The above command will run 2 times for load & queue usage info report every 2 seconds. Field Purpose runq-sz Run queue length (number of processes waiting for run time) plist-sz Number of processes and threads in the process list ldavg-1 System load average for the last minute ldavg-5 System load average for the past 5 minutes ldavg-15 System load average for the past 15 minutes
  • 15. How to Install Configure and Use sysstat Utils 13 | P a g e Swap Space Utilization Statistics To generate swap space utilization statistics, run the command; sar -S sar -S 2 2 SAR Report – Write Output File To store “sar” report to a data file, data file is stored in binary format and can be read by sar command, to store the report/data into a file run the command; sar -o /tmp/cpu_utilization_output_file -u 2 5 >/dev/null 2>&1 & SAR Report – Read Output File To read “sar” data file, run the command; sar -f /tmp/cpu_utilization_output_file
  • 16. How to Install Configure and Use sysstat Utils 14 | P a g e SAR Report – Read Specific Day Report All the data files are stored in the directory “/var/log/sa/” by default it’s configured for 28 days. In order to read a specific day’s report, run the command; sar -f /var/log/sa/saXX sar -f /var/log/sa/sa10 Note: Day of the month is represented by saXX, where xx means day of month. SAR Report – Read Specific Day and Time Report All the data files are stored in the directory “/var/log/sa/” by default it’s configured for 28 days. In order to read a specific day and time report, run the command; sar -f /var/log/sa/saXX -e -s 21:00:00 -e 22:00:00 sar -f /var/log/sa/sa10 -e -s 21:00:00 -e 22:00:00 Note: Day of the month is represented by saXX, where XX means day of month.