LINUX-
37 SAR (RHEL-7) P2
**Its same for RHEL6 as well as RHEL7.
Cron Entry:
/etc/cron.d/sysstat
Log Dir:
/var/log/sa
Let’s
start working with SAR,
VERSION,
[root@rhel7-server ~]# sar -V
sysstat
version 10.1.5
(C)
Sebastien Godard (sysstat <at> orange.fr)
Simple sar output,
[root@rhel7-server ~]# sar
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (1 CPU)
01:00:01 PM
CPU %user
%nice %system %iowait
%steal %idle
01:10:01 PM
all 0.14 0.00
0.17 0.00 0.00
99.69
01:20:01 PM
all 0.12 0.00
0.15 0.08 0.00
99.65
01:30:01 PM
all 0.21 0.00
0.23 0.00 0.00
99.56
01:40:02 PM
all 0.09 0.05
0.24 0.04 0.00
99.59
01:50:01 PM
all 0.09
0.00 0.16 0.00
0.00 99.75
02:00:01 PM
all 0.31 0.00
0.37 0.75 0.00
98.57
02:10:01 PM
all 0.53 0.00
0.54 0.58 0.00
98.35
02:20:01 PM
all 0.10 0.00
0.19 0.15 0.00
99.56
02:30:01 PM
all 0.17 0.00
0.23 0.01 0.00
99.59
02:40:01 PM
all 0.20 0.00
0.25 0.00 0.00
99.55
02:50:01 PM
all 0.09 0.00
0.17 0.00 0.00
99.73
03:00:01 PM
all 0.10 0.00
0.17 0.00 0.00
99.72
03:10:01 PM
all 0.09 0.00
0.18 0.01 0.00
99.71
Average:
all 0.17 0.00
0.23 0.13 0.00
99.46
O/P
shows todays data at interval of 10 minutes,
%user: The “user”
column showing how long the processor is spending each process.
%nice: nice value is used
to change the priority of a process. This table shows the time spend by CPU for
process whose nice value has been changed.
%sys: this shows the
percentage of time spend by the processor for operating system tasks, means how
long & how much of processor time (in percentage) spend for operating
system tasks.
%iowait: How long the
processer is waiting for devices (input and output)
%steal: How much of resources virtualized from the
physical CPU, this column shows the amount of time spend by a CPU (which is
virtualized), for resources from the physical CPU.
%idle: This shows the
idle time spend by the processor.
Running
sar 7 times at interval of 2 seconds,
[root@rhel7-server ~]# sar 2 7
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (1 CPU)
03:55:45 PM
CPU %user
%nice %system %iowait
%steal %idle
03:55:47 PM
all 84.00 0.00
16.00 0.00 0.00
0.00
03:55:49 PM
all 84.00 0.00
16.00 0.00 0.00
0.00
03:55:51 PM
all 83.66 0.00
16.34 0.00 0.00
0.00
03:55:53 PM
all 84.00 0.00
16.00 0.00 0.00
0.00
03:55:55 PM
all 84.58 0.00
15.42 0.00 0.00
0.00
03:55:57 PM
all 84.50 0.00
15.50 0.00 0.00
0.00
03:55:59 PM
all 84.00 0.00
16.00 0.00 0.00
0.00
Average:
all 84.11 0.00
15.89 0.00 0.00
0.00
See
the %user and %system, there might be something unusual going on,
Running
sar 7 times at interval of 2 seconds,
[root@rhel7-server ~]# sar 2 7
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (1 CPU)
03:56:23 PM
CPU %user
%nice %system %iowait
%steal %idle
03:56:25 PM
all 94.50 0.00
5.50 0.00 0.00
0.00
03:56:27 PM
all 94.00 0.00
6.00 0.00 0.00
0.00
03:56:29 PM
all 94.00 0.00
6.00 0.00 0.00
0.00
03:56:31 PM
all 93.56 0.00
6.44 0.00 0.00
0.00
03:56:33 PM
all 94.50 0.00
5.50 0.00 0.00
0.00
03:56:35 PM
all 95.02 0.00
4.98 0.00 0.00
0.00
03:56:37 PM
all 93.53 0.00
6.47 0.00 0.00
0.00
Average:
all 94.16 0.00
5.84 0.00 0.00
0.00
See
the %user and %system, there might be something unusual going on,
Running
sar 5 times at interval of 2 seconds,
[root@rhel7-server ~]# sar 2 5
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (1 CPU)
04:24:25 PM
CPU %user
%nice %system %iowait
%steal %idle
04:24:27 PM
all 1.61 0.00
98.39 0.00 0.00
0.00
04:24:29 PM
all 0.00 0.00
100.00 0.00 0.00
0.00
04:24:31 PM
all 0.00
0.00 100.00 0.00
0.00 0.00
04:24:33 PM
all 0.00 0.00
87.50 12.50 0.00
0.00
04:24:35 PM
all 1.82 0.00
56.36 41.82 0.00
0.00
Average:
all 0.68 0.00
89.83 9.49 0.00
0.00
See
the %system and %iowait, there must be something unusual going on,
CPU STATISTICS VIA SAR:
[root@rhel7-server ~]# sar -P ALL
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_
(4 CPU)
10:20:51 PM
LINUX RESTART
“-P ALL” means statistics
for ALL the individual Cores.
[root@rhel7-server ~]# sar -u
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4
CPU)
10:20:51 PM
LINUX RESTART
“-u” means cumulative
real-time CPU usage of all CPUs.
I just
restarted this system, that’s why nothing in O/P. Let’s check it from previous
files.
**use “-f” with sar to fetch data from
file.
[root@rhel7-server ~]# sar -P ALL -f /var/log/sa/sa11
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/11/2018 _x86_64_ (1 CPU)
01:30:01 PM
CPU %user
%nice %system %iowait
%steal %idle
01:40:01 PM
all 0.31 0.00
0.25 0.47 0.00
98.97
01:40:01 PM
0 0.31 0.00
0.25 0.47 0.00
98.97
01:40:01 PM
CPU %user %nice
%system %iowait %steal
%idle
01:50:01 PM
all 0.08 0.00
0.16 0.00 0.00
99.75
01:50:01 PM
0 0.08 0.00
0.16 0.00 0.00
99.75
01:50:01 PM
CPU %user
%nice %system %iowait
%steal %idle
02:00:02 PM
all 0.08 0.00
0.17 0.00 0.00
99.75
02:00:02 PM
0 0.08 0.00
0.17 0.00 0.00
99.75
========O/P
Truncated=========================
Though
there is only one CPU, that’s why showing for “0” only.
[root@rhel7-server ~]# sar -P ALL 1 1
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4 CPU)
05:00:26 PM
CPU %user
%nice %system %iowait
%steal %idle
05:00:27 PM
all 0.00 0.00
0.25 0.00 0.00
99.75
05:00:27 PM
0 0.00
0.00 0.00 0.00
0.00 100.00
05:00:27 PM
1 0.00 0.00
0.00 0.00 0.00
100.00
05:00:27 PM
2 0.00 0.00
0.00 0.00 0.00
100.00
05:00:27 PM
3 0.00 0.00
0.00 0.00 0.00
100.00
Average:
CPU %user
%nice %system %iowait
%steal %idle
Average:
all 0.00 0.00
0.25 0.00 0.00
99.75
Average:
0 0.00 0.00
0.00 0.00 0.00
100.00
Average:
1 0.00 0.00
0.00 0.00 0.00
100.00
Average:
2 0.00 0.00
0.00 0.00 0.00
100.00
Average:
3 0.00 0.00
0.00 0.00 0.00
100.00
Here
info for all CPU’s are displayed.
[root@rhel7-server ~]# sar -u -f /var/log/sa/sa11
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/11/2018 _x86_64_
(1 CPU)
01:30:01 PM
CPU %user
%nice %system %iowait
%steal %idle
01:40:01 PM
all 0.31 0.00
0.25 0.47 0.00
98.97
01:50:01 PM
all 0.08 0.00
0.16 0.00 0.00
99.75
02:00:02 PM
all 0.08 0.00
0.17 0.00 0.00
99.75
02:10:01 PM
all 0.09
0.00 0.17 0.18
0.00 99.57
02:20:01 PM
all 0.09 0.00
0.18 0.00 0.00
99.74
02:30:01 PM
all 0.08 0.00
0.16 0.00 0.00
99.76
02:40:01 PM
all 0.09 0.04
0.24 0.03 0.00
99.60
02:50:01 PM
all 0.09 0.00
0.17 0.00 0.00
99.75
03:00:01 PM
all 0.09 0.00
0.16 0.00 0.00
99.75
03:10:01 PM
all 0.09 0.00
0.16 0.00
0.00 99.75
06:10:01 PM
all 0.20 0.00
0.32 0.00 0.00
99.47
06:20:02 PM
all 0.16 0.00
0.24 0.18 0.00
99.42
06:30:01 PM
all 0.08 0.00
0.20 0.00 0.00
99.72
06:40:01 PM
all 0.09 0.00
0.17 0.00 0.00
99.74
06:50:01 PM
all 0.09 0.00
0.16 0.00 0.00
99.75
07:00:01 PM
all 0.09 0.00
0.16 0.00 0.00
99.75
07:10:01 PM
all 0.09 0.00
0.17 0.00 0.00
99.74
07:20:01 PM
all 0.21 0.00
0.24 0.08 0.00
99.47
07:30:01 PM
all 0.14 0.00
0.21 0.03 0.00
99.62
07:40:01 PM
all 0.09
0.00 0.18 0.00
0.00 99.74
Average:
all 0.11 0.00
0.19 0.05 0.00
99.64
[root@rhel7-server ~]# sar -u
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4
CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM
CPU %user
%nice %system %iowait
%steal %idle
05:00:01 PM
all 1.12 0.00
0.19 0.19 0.00
98.50
Average:
all 1.12 0.00
0.19 0.19 0.00
98.50
[root@rhel7-server ~]# sar -u ALL
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM
CPU %usr
%nice %sys %iowait
%steal %irq %soft
%guest %gnice %idle
05:00:01 PM
all 1.12 0.00
0.18 0.19 0.00
0.00 0.01 0.00
0.00 98.50
Average:
all 1.12 0.00
0.18 0.19 0.00
0.00 0.01 0.00
0.00 98.50
REALTIME CPU VIA SAR:
Cumulative CPU’s,
[root@rhel7-server ~]# sar -u 2 5
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
05:10:33 PM
CPU %user
%nice %system %iowait
%steal %idle
05:10:35 PM
all 0.00 0.00
0.00 0.00 0.00
100.00
05:10:37 PM
all 0.00 0.00
0.12 0.00 0.00
99.88
05:10:39 PM
all 0.00 0.00
0.00 0.00 0.00
100.00
05:10:41 PM
all 0.00 0.00
0.12 0.12 0.00
99.75
05:10:43 PM
all 0.00 0.00
0.00 0.00 0.00
100.00
Average:
all 0.00 0.00
0.05 0.03 0.00
99.92
Individual CPU’s,
[root@rhel7-server ~]# sar -P ALL 2 2
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
05:10:57 PM
CPU %user
%nice %system %iowait
%steal %idle
05:10:59 PM
all 0.00 0.00
0.12 0.00 0.00
99.88
05:10:59 PM
0 0.00 0.00
0.00 0.00 0.00
100.00
05:10:59 PM
1 0.00 0.00
0.00 0.00 0.00
100.00
05:10:59 PM
2 0.00 0.00
0.00 0.00 0.00
100.00
05:10:59 PM
3 0.00 0.00
0.00 0.00 0.00
100.00
05:10:59 PM
CPU %user
%nice %system %iowait
%steal %idle
05:11:01 PM
all 1.88
0.00 0.13 0.00
0.00 97.99
05:11:01 PM
0 1.50 0.00
0.00 0.00 0.00
98.50
05:11:01 PM
1 1.51 0.00
0.00 0.00 0.00
98.49
05:11:01 PM
2 2.01 0.00
0.00 0.00 0.00
97.99
05:11:01 PM
3 2.01 0.00
0.00 0.00 0.00
97.99
Average:
CPU %user
%nice %system %iowait
%steal %idle
Average:
all 0.94 0.00
0.13 0.00 0.00
98.94
Average:
0 0.75 0.00
0.00 0.00 0.00
99.25
Average:
1 0.75 0.00
0.00 0.00 0.00
99.25
Average:
2 1.00 0.00
0.00 0.00 0.00
99.00
Average:
3 1.00 0.00
0.00 0.00 0.00
99.00
MEMORY VIA SAR:
Amount
of memory used, amount of memory free, available cache, available buffers
[root@rhel7-server ~]# sar -r
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM kbmemfree
kbmemused %memused kbbuffers kbcached
kbcommit %commit kbactive
kbinact kbdirty
05:00:01 PM
451412 627752 58.17
880 227952 1104612
34.78 264764 187444
296
05:10:01 PM
426888 652276 60.44
880 228552 1121636
35.31 288112 187616
304
05:20:01 PM
426844 652320 60.45
880 228576 1121640
35.31 288356 187620
296
05:30:01 PM
426820 652344 60.45
880 228584 1121636
35.31 288284 187624
296
Average:
432991 646173 59.88
880 228416 1117381
35.18 282379 187576
298
REALTIME MEMORY VIA SAR,
[root@rhel7-server ~]# sar -r 2 5
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
05:33:58 PM kbmemfree
kbmemused %memused kbbuffers kbcached
kbcommit %commit kbactive
kbinact kbdirty
05:34:00 PM
427216 651948 60.41
880 228588 1120156
35.27 288188 187620 4
05:34:02 PM
427296 651868 60.40
880 228588 1120156
35.27 288180 187620 4
05:34:04 PM
427296 651868 60.40
880 228588 1120156
35.27 288180 187620 4
05:34:06 PM
427296 651868 60.40
880 228588 1120156
35.27 288180 187620 4
05:34:08 PM
427284 651880 60.41
880 228588 1120156
35.27 288180 187620 4
Average:
427278 651886 60.41
880 228588 1120156
35.27 288182 187620 4
kbcommit
& %commit is the overall memory used including RAM & Swap
kbmemfree: Amount of free
memory in kilobytes.
Kbmemused: Used memory
details in kilobytes, excluding memory used by kernel itself.
%memused: percentage of
memory used.
kbbuffers: buffer memory
used by the kernel in kilobytes.
kbcached: cached memory
used by the kernel in kilobytes.
kbcommit: Amount of memory
in kilobytes needed for current workload. This is an estimate of how much
RAM/swap is needed to guarantee that there never is out of memory.
%commit: Percentage of
memory needed for current workload in relation to the total amount of memory
(RAM+SWAP). This number may be greater than 100% because the kernel usually
overcommits memory.
kbactive: Amount of active
memory in kilobytes (memory that has been used more recently and usually not
reclaimed unless absolutely necessary).
kbinact: Amount of
inactive memory in kilobytes (memory which has been less recently used. It is more
eligible to be reclaimed for other purposes).
kbdirty: Amount of memory
in kilobytes waiting to get written back to the disk.
SWAP VIA SAR:
[root@rhel7-server ~]# sar -S
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_
(4 CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM kbswpfree
kbswpused %swpused kbswpcad
%swpcad
05:00:01 PM
2097148 0
0.00 0 0.00
05:10:01 PM
2097148 0 0.00 0
0.00
05:20:01 PM
2097148 0 0.00 0
0.00
05:30:01 PM
2097148 0 0.00 0
0.00
Average:
2097148 0 0.00
0 0.00
REALTIME SWAP VIA SAR,
[root@rhel7-server ~]# sar -S 2 5
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4 CPU)
05:38:10 PM kbswpfree
kbswpused %swpused kbswpcad
%swpcad
05:38:12 PM
2097148 0 0.00
0 0.00
05:38:14 PM
2097148 0 0.00 0
0.00
05:38:16 PM
2097148 0 0.00 0
0.00
05:38:18 PM
2097148 0 0.00 0
0.00
05:38:20 PM
2097148 0 0.00 0
0.00
Average:
2097148 0 0.00 0
0.00
kbswpfree: Amount of free
swap space in kilobytes.
kbswpused: Amount of used
swap space in kilobytes.
%swpused: Percentage of
used swap space.
kbswpcad: Amount of cached
swap memory in kilobytes. This is memory that once was swapped out, is swapped
back in but still also is in the swap area.
%swpcad: Percentage of
cached swap memory in relation to the amount of used swap space.
Number of memory pages freed, used, and cached,
[root@rhel7-server
~]# sar -R 1 3
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_
(4 CPU)
05:43:25 PM frmpg/s
bufpg/s campg/s
05:43:26 PM
0.00 0.00 0.00
05:43:27 PM
0.00 0.00 0.00
05:43:28 PM
0.00 0.00 0.00
Average:
0.00 0.00 0.00
Report paging statistics,
[root@rhel7-server ~]# sar -B 1 3
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
05:46:42 PM pgpgin/s pgpgout/s fault/s
majflt/s pgfree/s pgscank/s
pgscand/s pgsteal/s %vmeff
05:46:43 PM
0.00 1.00 29.00
0.00 62.00
0.00 0.00 0.00
0.00
05:46:44 PM
0.00 0.00 30.00
0.00 63.00 0.00
0.00 0.00 0.00
05:46:45 PM
0.00 0.00 19.00
0.00 63.00 0.00
0.00 0.00 0.00
Average:
0.00 0.33 26.00
0.00 62.67 0.00
0.00 0.00 0.00
majflt/s
Number
of major faults the system has made per second, those which have required
loading a memory page from disk. If this value is high then need to be alarmed,
system is running out of Memory.
%vmeff
Indicates
the number of pages scanned per second, if it’s value is 100% then 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.
Report page swap statistics,
[root@rhel7-server ~]# sar -W 1 3
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4
CPU)
05:48:58 PM pswpin/s pswpout/s
05:48:59 PM
0.00 0.00
05:49:00 PM
0.00 0.00
05:49:01 PM
0.00 0.00
Average:
0.00 0.00
INPUT/OUTPUT STATISTICS VIA SAR,
[root@rhel7-server ~]# sar -b
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4 CPU)
04:53:51 PM
tps rtps
wtps bread/s bwrtn/s
05:00:01 PM
1.50 1.16 0.34
86.96 3.90
05:10:01 PM
0.49 0.03 0.46
1.91 4.41
05:20:01 PM
0.23 0.00 0.23
0.00 2.15
05:30:01 PM
0.19 0.00 0.19
0.00 1.74
05:40:01 PM
0.22 0.00 0.22
0.00 1.94
05:50:01 PM
0.22 0.00 0.22
0.00 1.92
Average:
0.41 0.13 0.27
9.89 2.59
REALTIME,
[root@rhel7-server ~]# sar -b 1 5
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018
_x86_64_ (4
CPU)
05:59:17 PM
tps rtps
wtps bread/s bwrtn/s
05:59:18 PM
0.00 0.00 0.00
0.00 0.00
05:59:19 PM
0.00 0.00 0.00
0.00 0.00
05:59:20 PM
0.00 0.00 0.00
0.00 0.00
05:59:21 PM
0.00 0.00 0.00
0.00 0.00
05:59:22 PM
1.00 0.00 1.00
0.00 8.00
Average: 0.20
0.00 0.20 0.00
1.60
tps: Column show
transactions per second (includes both R/W, means total no of transfers (I/O
request) to physical device.
rtps: Column show read
transactions per second, means total number of read requests per second issued
to physical devices
wtps: Column show
write transactions per second, means total number of write requests per second
issued to physical devices.
bread/s: Column show
bytes read per second, means total amount of data read from the devices in
blocks per second
bwrtn/s: Column show
bytes written per second, means total amount of data written to devices in
blocks per second
BLOCK DEVICE I/O STATISTICS VIA SAR,
Block
devices like mount points, partitions, LUN from storage …
Using
option -p (pretty-print) along with -d make the dev column more readable,
[root@rhel7-server ~]# sar -p -d
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM
DEV tps
rd_sec/s wr_sec/s avgrq-sz
avgqu-sz await svctm
%util
05:00:01 PM
sda 1.50 86.96
3.90 60.57 0.01
8.86 6.74 1.01
05:00:01 PM
sr0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
05:00:01 PM rhel-root 1.54
86.96 3.90 59.08
0.01 8.71 6.58
1.01
05:00:01 PM rhel-swap 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
05:00:01 PM rhel-home 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
05:10:01 PM
sda 0.49 1.91
4.41 12.94 0.01
14.96 2.43 0.12
05:10:01 PM
sr0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
05:10:01 PM rhel-root 0.51
1.91 4.41 12.31
0.01 15.64 2.31
0.12
05:10:01 PM rhel-swap 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
05:10:01 PM rhel-home 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
05:20:01 PM
sda 0.23 0.00
2.15 9.16 0.01
43.71 1.40 0.03
05:20:01 PM
sr0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
05:20:01 PM rhel-root 0.25
0.00 2.15 8.50
0.01 42.79 1.30
0.03
====================O/P
Truncated======================
REALTIME,
[root@rhel7-server ~]# sar -d 1 1
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
06:21:05 PM
DEV tps
rd_sec/s wr_sec/s avgrq-sz
avgqu-sz await svctm
%util
06:21:06 PM
dev8-0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
06:21:06 PM
dev11-0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
06:21:06 PM
dev253-0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
06:21:06 PM
dev253-1 0.00 0.00
0.00 0.00 0.00
0.00 0.00
0.00
06:21:06 PM
dev253-2 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
DEV tps
rd_sec/s wr_sec/s avgrq-sz
avgqu-sz await svctm
%util
Average:
dev8-0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
dev11-0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
dev253-0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
dev253-1 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
dev253-2 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
[root@rhel7-server ~]# sar -p -d 1 1
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
06:14:50 PM
DEV tps
rd_sec/s wr_sec/s avgrq-sz
avgqu-sz await svctm
%util
06:14:51 PM
sda 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
06:14:51 PM
sr0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
06:14:51 PM rhel-root 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
06:14:51 PM rhel-swap 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
06:14:51 PM rhel-home 0.00
0.00 0.00 0.00
0.00 0.00 0.00
0.00
Average:
DEV tps
rd_sec/s wr_sec/s avgrq-sz
avgqu-sz await svctm
%util
Average:
sda 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
sr0 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
rhel-root 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
rhel-swap 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
Average:
rhel-home 0.00 0.00
0.00 0.00 0.00
0.00 0.00 0.00
DEV: Devices minor
and major numbers like dev253-0
Tps: Transactions per
second count
rd_sec/s: Read operation
done in a second
we_sec/s: Write operation
done in a second
%util: Total
utilization percentage
NETWORK STATISTICS VIA SAR,
[root@rhel7-server ~]# sar -n ALL
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM
IFACE rxpck/s
txpck/s rxkB/s txkB/s
rxcmp/s txcmp/s rxmcst/s
05:00:01 PM
eth0 0.82 0.39
0.07 0.07 0.00
0.00 0.00
05:00:01 PM
eth1 0.31 0.00
0.03 0.00 0.00
0.00 0.00
05:00:01 PM
eth2 0.30 0.01
0.02 0.00 0.00
0.00 0.00
05:00:01 PM
lo 0.69 0.69
0.05 0.05 0.00
0.00 0.00
05:10:01 PM
eth0 0.57 0.18
0.04 0.03 0.00
0.00 0.00
05:10:01 PM
eth1 0.33 0.00
0.02 0.00 0.00
0.00 0.00
05:10:01 PM
eth2 0.32 0.01
0.02 0.00 0.00
0.00 0.00
05:10:01 PM
lo 0.21 0.21
0.02 0.02 0.00
0.00 0.00
05:20:01 PM
eth0 0.59 0.20 0.04
0.04 0.00 0.00
0.00
05:20:01 PM
eth1 0.33 0.00
0.02 0.00 0.00
0.00 0.00
05:20:01 PM
eth2 0.33 0.01
0.02 0.00 0.00
0.00 0.00
05:20:01 PM
lo 0.00 0.00
0.00 0.00 0.00
0.00 0.00
05:30:01 PM
eth0 0.32 0.01
0.02 0.00 0.00
0.00 0.00
05:30:01 PM
eth1 0.33 0.00
0.02 0.00 0.00
0.00 0.00
05:30:01 PM
eth2 0.32 0.00
0.02 0.00 0.00
0.00 0.00
05:30:01 PM
lo 0.21 0.21
0.02 0.02 0.00
0.00 0.00
================O/P
Truncated=========================
KEYWORDS:
DEV
– For network interface statistics,
EDEV
– Display network device failure statistics
IP
– For IPv4 network traffic
EIP
– For IPv4 network errors
ICMP
– For ICMPv4 network traffic
EICMP
– For ICMPv4 network errors
TCP
– For TCPv4 network traffic
ETCP
– For TCPv4 network errors
UDP
– For UDPv4 network traffic
NFS
– For NFS client activities
NFSD
– For NFS server activities
SOCK
– For sockets in use for IPv4
[root@rhel7-server ~]# sar -n DEV 1 1
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
06:29:02 PM IFACE rxpck/s
txpck/s rxkB/s txkB/s
rxcmp/s txcmp/s rxmcst/s
06:29:03 PM
eth0 0.00 0.00
0.00 0.00 0.00
0.00 0.00
06:29:03 PM
eth1 0.00 0.00
0.00 0.00 0.00
0.00 0.00
06:29:03 PM
eth2 0.00 0.00
0.00 0.00 0.00
0.00 0.00
06:29:03 PM
lo 0.00 0.00
0.00 0.00 0.00
0.00 0.00
Average:
IFACE rxpck/s
txpck/s rxkB/s txkB/s
rxcmp/s txcmp/s rxmcst/s
Average:
eth0 0.00 0.00
0.00 0.00 0.00
0.00 0.00
Average:
eth1 0.00 0.00
0.00 0.00 0.00
0.00 0.00
Average:
eth2 0.00 0.00
0.00 0.00
0.00 0.00 0.00
Average:
lo 0.00 0.00
0.00 0.00 0.00
0.00 0.00
IFACE: stands for the
nic card interface name
rxpck/s: this shows the
total packets received per second
txpck/s: transmitted
packets per second
rxcmp/s: compressed
packets received
txcmp/s: compressed
packets transmitted
rxmcst/s: packets
multicasted per second.
LOAD AVERAGE VIA SAR,
[root@rhel7-server ~]# sar -q
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
10:20:51 PM
LINUX RESTART
04:53:51 PM runq-sz
plist-sz ldavg-1 ldavg-5
ldavg-15 blocked
05:00:01 PM
0 565 0.02
0.22 0.19 0
05:10:01 PM
0 565 0.00
0.03 0.11 0
05:20:01 PM
0 565 0.00
0.01 0.05 0
05:30:01 PM
0 564
0.00 0.01 0.05 0
05:40:01 PM
0 565 0.00
0.01 0.05 0
05:50:01 PM
0 565 0.00
0.01 0.05 0
06:00:01 PM
0 565 0.00
0.01 0.05 0
06:10:02 PM
0 565 0.01
0.02 0.05 1
06:20:01 PM
0 565 0.00
0.01 0.05 1
06:30:01 PM
0 564 0.00
0.01 0.05 0
Average:
0 565 0.00
0.03 0.07 0
[root@rhel7-server ~]# sar -q 1 5
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
06:38:34 PM runq-sz
plist-sz ldavg-1 ldavg-5
ldavg-15 blocked
06:38:35 PM
0 565 0.00
0.01 0.05 0
06:38:36 PM
1 565 0.00
0.01 0.05 0
06:38:37 PM
0 565 0.00
0.01 0.05 0
06:38:38 PM
0 565 0.00
0.01 0.05 0
06:38:39 PM
0 565 0.00
0.01 0.05 0
Average:
0 565 0.00
0.01 0.05 0
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
ALL STATISTICS VIA SAR,
[root@rhel7-server ~]# sar -A
FETCH HISTORICAL DATA FROM FILE VIA SAR,
[root@rhel7-server ~]# sar -P ALL -f /var/log/sa/sa10
[root@rhel7-server ~]# sar -P ALL -f /var/log/sa/sa11
Here
sa10 & sa11 are files of 10th & 11th august.
SAVING OUTPUT OF SAR,
[root@rhel7-server ~]# sar -d 1 3 -o sartest.txt
FETCHING DATA FROM FILE VIA SAR,
[root@rhel7-server ~]# sar -f sartest.txt
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_
(4 CPU)
06:46:03 PM
CPU %user
%nice %system %iowait
%steal %idle
06:46:04 PM
all 0.00 0.00
0.00 0.00 0.00
100.00
06:46:05 PM
all 0.00 0.00
0.25 0.00 0.00
99.75
06:46:06 PM
all 0.00
0.00 0.00 0.00
0.00 100.00
Average:
all 0.00 0.00
0.08 0.00 0.00
99.92
IN BETWEEN TIME REPORT VIA SAR,
-s
for start time <HH:MM:SS>
-e
for end time <HH:MM:SS>
[root@rhel7-server ~]# sar -s 17:00:00
[root@rhel7-server ~]# sar -s 17:00:00 -e 19:00:00
Linux 3.10.0-121.el7.x86_64 (rhel7-server) 08/12/2018 _x86_64_ (4 CPU)
05:00:01 PM
CPU %user
%nice %system %iowait
%steal %idle
05:10:01 PM
all 0.08 0.00
0.07 0.01 0.00
99.83
05:20:01 PM
all 0.08 0.00
0.06 0.00 0.00
99.86
05:30:01 PM
all 0.07 0.00
0.05 0.00 0.00
99.88
05:40:01 PM
all 0.08 0.00
0.05 0.00 0.00
99.86
05:50:01 PM
all 0.08 0.00
0.06 0.00 0.00
99.86
06:00:01 PM
all 0.08 0.00
0.05 0.00 0.00
99.87
06:10:02 PM
all 0.08 0.00
0.05 0.00 0.00
99.87
06:20:01 PM
all 0.07 0.00
0.06 0.01 0.00
99.86
06:30:01 PM
all 0.08 0.00
0.06 0.02 0.00
99.85
06:40:01 PM
all 0.08 0.00
0.06 0.00 0.00
99.86
Average:
all 0.08 0.00
0.06 0.01 0.00
99.86
[root@rhel7-server ~]# sar -d -s 17:00:00 -e 19:00:00
No comments:
Post a Comment