Тёмный

Using System Activity Report (SAR) in Linux For Present & Past System Performance Monitoring 

Nehra Classes
Подписаться 50 тыс.
Просмотров 17 тыс.
50% 1

Using System Activity Report (SAR) in Linux For Present & Past System Performance Monitoring:
====
System Activity Report (sar) is a Unix System V-derived system monitor command used to report on various system loads, including CPU activity, memory/paging, interrupts, device load, network and swap space utilization. Sar uses /proc filesystem for gathering information.
dnf repolist
dnf install sysstat -y
systemctl start sysstat
systemctl enable sysstat
It collects the data every 10 minutes and generate its report daily. Below crontab file is responsible for collecting and generating reports.
vim /etc/cron.d/sysstat
Run the tool at every 10 minutes automatically.
*/10 * * * * root /usr/lib64/sa/sa1 1 1
Generate a daily summary of process accounting at 23:55
55 23 * * * root /usr/lib64/sa/sa2 -A
Below is the Config File of SysStat ( sar command ).
cat /etc/sysconfig/sysstat
Example:1 Generating CPU Report on the Fly 6 times at every 3 seconds.
sar 3 6
If the %I/O wait is more than zero for a longer period of time then we can consider there is some bottleneck in I/O system (Hard disk or Network).
Example:2 Saving sar output to a file using -o
sar 2 5 -o /tmp/data
use “sar -f filename” to display the reports.
sar -f /tmp/data
Example:3 Generating Memory Usage report using -r option in the sar command which is used to generate memory usage report.
sar -r 3 6
kbcommit & %commit is the overall memory used including RAM & Swap
Example:4 Generating Paging Statistics Report using -B
-B option in the sar command is used to display paging statistics.
sar -B 3 6
In the report majflts/s shows the major faults per second means number of pages loaded into the memory from disk (swap), if its value is higher then we can say that system is running of RAM.
%vmeff indicates the number of pages scanned per second, if it’s vaule is 100 % its is consider OK and when it is below 30 % then there is some issue with virtual memory. Zero value indicates that there is no page scanned during that time.
Example:5 Generating block device statistics report using -d
-d option in the sar command is used to display the block device statistics report. Using option -p (pretty-print) along with -d make the dev column more readable, example is shown below :
sar -d -p 2 4
Example:6 Generating Network statistic report using -n
-n option in the sar command is used to generate network statistic report. Below is the synatx :
sar -n {keyword} or {ALL}
To generate all network statistic report use below command :
sar -n ALL
Example:7 Reading SAR log file using -f
As we have discuss that sar logs files are kept under /var/log/sa/saDD, using -f option in sar command we can read the log files.
sar -r -f /var/log/sa/sa12
*****
Thanks for watching the video. If it helped you then, please do like & share it with others as well. Feel free to post your queries & suggestions, we will be glad to answer your queries.
If you like our hard work then do subscribe to our channel & turn on the bell notification for latest updates.
*****
Join this channel to get access to perks:
/ @nehraclasses
*****
My PC: amzn.to/30amhRt
My DSLR Camera: amzn.to/36954Ml
My Boya Microphone: amzn.to/3mZavTS
My Mobile: amzn.to/2HCdilL
My Router: amzn.to/3mXC0x7
My TV Entertainment System: amzn.to/345150F
My Head-Phone: amzn.to/3ie4rDB
My Smart Watch: amzn.to/3cRbPUt
******
Contact Us:
WhatsApp: bit.ly/2Kpqp5z
Telegram Channel: t.me/NehraClasses
Email: nehraclasses@gmail.com
Registration Form: bit.ly/NehraCla...
******
Follow Us On Social Media Platforms:
Twitter: bit.ly/NehraCla...
Facebook Page: nehraclasses
Instagram: / nehraclasses
Website: bit.ly/NehraCla...
=======
©COPYRIGHT. ALL RIGHTS RESERVED.

Опубликовано:

 

15 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@RiturajanandRitu
@RiturajanandRitu Год назад
Sir can you also make a video explanation the parameter for network and device and cpu and memory explaining the Statistics for low performances system or high utililzed system where where we can get to know what is needed to increase or get added like cpu or bandwidth or memory.
@psawant27feb1990
@psawant27feb1990 Год назад
How to measure cpu utilisation. And send alet if utilisation value is above 70% atleast for 15 min then generate alert
@NehraClasses
@NehraClasses Год назад
you can create a cronjob for the same.
@umeshtrivedi9599
@umeshtrivedi9599 3 года назад
Very well explained. How can i get notes you're using in video ?
@NehraClasses
@NehraClasses 3 года назад
From our telegram channel
@umeshtrivedi9599
@umeshtrivedi9599 3 года назад
@@NehraClasses ok i will connect. Thank you💖
@khanmohsin1799
@khanmohsin1799 7 месяцев назад
@@NehraClasses can we get the history of cpu utilization before installing sar in the server ? As in we want to get the detail of last month on a daily ussge of cpu in the linux server
@PraveenKumar-en6ri
@PraveenKumar-en6ri 3 года назад
Nicely explained, relly helpful for beginners
@NehraClasses
@NehraClasses 3 года назад
Thanks 👍
@artsy-anamika
@artsy-anamika 3 года назад
How to find out and store process name using sar command?
@vipin_mishra19
@vipin_mishra19 2 года назад
Sar memory usage?
@pratimam6226
@pratimam6226 Год назад
how to get the data from last six months of the CPU?
@NehraClasses
@NehraClasses Год назад
use sar command
@nitindongre4787
@nitindongre4787 11 месяцев назад
​@@NehraClassesbut how
@hitman1793
@hitman1793 2 года назад
Good explain
@pankajnara
@pankajnara 4 года назад
Great Sir #pankajnara
@NehraClasses
@NehraClasses 4 года назад
Thanks
@kasheeable
@kasheeable 4 года назад
Nice sir
@NehraClasses
@NehraClasses 4 года назад
Thanks
@surajdhanurkar5644
@surajdhanurkar5644 4 года назад
is it possible to get 2 years back system activity report from sar
@NehraClasses
@NehraClasses 4 года назад
Definitely, if sar package it installed there already.
@surajdhanurkar5644
@surajdhanurkar5644 4 года назад
@@NehraClasses what would be the command
@NehraClasses
@NehraClasses 4 года назад
First verify how old data is present in sar logs. cd /var/log/sa
@NehraClasses
@NehraClasses 4 года назад
Take help from this tutorial. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-mvN-jukM5Fc.html
@hitman1793
@hitman1793 2 года назад
I will give free training on RU-vid why are you paid RU-vid video
Далее
How to use the ps Command | Linux Command Line Basics
14:45
Linux Performance Tools, Brendan Gregg, part 1 of 2
54:29
Linux Performance Troubleshooting Demos
10:51
Просмотров 67 тыс.