Linux OS Performance Monitoring 하기
: DBMS S/W 도 OS 위에서 설치/운영 되는 S/W 라 OS Resource 부족 시, Service Slownewss 가 발생 할수 있다. SAR 를 통해서, OS Performance Monitoring 하자.
출처 :
-. sar 설치 및 사용 방법
https://www.thegeekstuff.com/2011/03/sar-examples/?utm_source=feedburner
-. sar 자동 수집 관련
https://www.blackmoreops.com/2014/06/18/sysstat-sar-examples-usage/
-. sar 한글 설명
http://www.cubrid.com/CUBRIDwiki/71317
SAR(System Activity Reporter)를 이용한 OS Performance Monitoring
1. Collective CPU usage
2. Individual CPU statistics
3. Memory used and available
4. Swap space used and available
5. Overall I/O activities of the system
6. Individual device I/O activities
7. Context switch statistics
8. Run queue and load average data
9. Network statistics
10. Report sar data from a specific time
<<기본 확인 ( 버전, 수집 설정 등 )>>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | -- sar Version [root@tg ~]# sar -V sysstat version 10.1.5 (C) Sebastien Godard (sysstat <at> orange.fr) [root@tg ~]# which sar /usr/bin/sar [root@tg ~]# -- 1초 간격으로 3번 + Average [root@tg ~]# sar 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 10:06:02 AM CPU %user %nice %system %iowait %steal %idle 10:06:03 AM all 2.33 0.00 0.00 0.00 0.00 97.67 10:06:04 AM all 2.35 0.00 1.18 0.00 0.00 96.47 10:06:05 AM all 1.18 0.00 1.18 0.00 0.00 97.65 Average: all 1.95 0.00 0.78 0.00 0.00 97.27 [root@tg ~]# -- 자동 수집 설정 확인 [root@tg sysconfig]# 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 [root@tg sysconfig]# -- 자동 보관 설정 확인 [root@tg sysconfig]# cat /etc/sysconfig/sysstat # sysstat-10.1.5 configuration file. # How long to keep log files (in days). # If value is greater than 28, then log files are kept in # multiple directories, one for each month. HISTORY=28 # Compress (using gzip or bzip2) sa and sar files older than (in days): COMPRESSAFTER=31 # Parameters for the system activity data collector (see sadc manual page) # which are used for the generation of log files. SADC_OPTIONS="-S DISK" # Compression program to use. ZIP="bzip2" [root@tg sysconfig]# -- 자동 수집 설정 변경 ( 10 -> 2 분 ) [root@tg cron.d]# cat sysstat # Run system activity accounting tool every 10 minutes #*/10 * * * * root /usr/lib64/sa/sa1 1 1 */2 * * * * 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 [root@tg cron.d]# service sysstat restart Redirecting to /bin/systemctl restart sysstat.service [root@tg cron.d]# -- 자동 수집 Interval 변경 확인 [root@tg cron.d]#sar .. 생략 10:58:01 AM all 1.62 0.00 1.00 0.05 0.00 97.33 Average: all 1.72 0.02 0.92 0.16 0.00 97.18 10:58:13 AM LINUX RESTART 11:00:02 AM CPU %user %nice %system %iowait %steal %idle 11:02:01 AM all 1.97 0.00 1.18 0.01 0.00 96.83 Average: all 1.97 0.00 1.18 0.01 0.00 96.83 [root@tg cron.d]# -- sar 수집 파일 [root@tg sa]# cat /etc/cron.d/sysstat # Run system activity accounting tool every 10 minutes #*/10 * * * * root /usr/lib64/sa/sa1 1 1 # In the above crontab example: sa1 1 1 means that sa1 collects sar data 1 time with 1 second interval (for every 10 mins). */2 * * * * 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 [root@tg sa]# pwd /var/log/sa -- sa날짜 --> Interval 단위로 수집 하는 Raw 파일 -- sar날짜 --> Daily Summary 읽기 가능 파일 [root@tg sa]# ls -al total 3108 drwxr-xr-x. 2 root root 4096 Mar 14 00:00 . drwxr-xr-x. 17 root root 4096 Mar 13 10:31 .. -rw-r--r--. 1 root root 136164 Mar 9 23:50 sa09 -rw-r--r--. 1 root root 413052 Mar 10 23:50 sa10 -rw-r--r--. 1 root root 495372 Mar 11 23:50 sa11 -rw-r--r--. 1 root root 375208 Mar 12 18:10 sa12 -rw-r--r--. 1 root root 229436 Mar 13 23:50 sa13 -rw-r--r--. 1 root root 320184 Mar 14 11:40 sa14 -rw-r--r--. 1 root root 136401 Mar 9 23:53 sar09 -rw-r--r--. 1 root root 398199 Mar 10 23:53 sar10 -rw-r--r--. 1 root root 397751 Mar 11 23:53 sar11 -rw-r--r--. 1 root root 221542 Mar 13 23:53 sar13 [root@tg sa]# -- 특정날짜 성능 확인 [root@tg sa]# ls -al total 3300 drwxr-xr-x. 2 root root 4096 Mar 14 00:00 . drwxr-xr-x. 17 root root 4096 Mar 13 10:31 .. -rw-r--r--. 1 root root 136164 Mar 9 23:50 sa09 -rw-r--r--. 1 root root 413052 Mar 10 23:50 sa10 -rw-r--r--. 1 root root 495372 Mar 11 23:50 sa11 -rw-r--r--. 1 root root 375208 Mar 12 18:10 sa12 -rw-r--r--. 1 root root 229436 Mar 13 23:50 sa13 -rw-r--r--. 1 root root 505728 Mar 14 13:10 sa14 -rw-r--r--. 1 root root 136401 Mar 9 23:53 sar09 -rw-r--r--. 1 root root 398199 Mar 10 23:53 sar10 -rw-r--r--. 1 root root 397751 Mar 11 23:53 sar11 -rw-r--r--. 1 root root 221542 Mar 13 23:53 sar13 [root@tg sa]# sar -f sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM CPU %user %nice %system %iowait %steal %idle 12:10:01 AM all 1.65 0.00 0.97 0.20 0.00 97.17 12:20:01 AM all 1.43 0.00 0.93 0.08 0.00 97.56 .. 중략 Linux 3.8.13-98.7.1.el7uek.x86_64 --> Linux Kernel Version (tg) --> Hostname 03/14/2018 --> sar 수집일 _x86_64_ --> system Architecture (1 CPU) --> CPU 갯수 | cs |
<< 10가지 유용한 명령어 >>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | -------------------------------------------------------------------------------- -- 1. All Cpu Usage -------------------------------------------------------------------------------- -- 오늘 All CPU Usage -- %idle 통해서 CPU Load 판단 root@tg sa]# sar -u Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM CPU %user %nice %system %iowait %steal %idle 12:10:01 AM all 1.65 0.00 0.97 0.20 0.00 97.17 12:20:01 AM all 1.43 0.00 0.93 0.08 0.00 97.56 12:30:01 AM all 1.43 0.00 0.91 0.05 0.00 97.61 12:40:01 AM all 1.41 0.00 0.92 0.07 0.00 97.60 중략. -- 현재 All CPU Usage ( 1초 간격으로 3번 ) [root@tg sa]# sar -u 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:14:43 PM CPU %user %nice %system %iowait %steal %idle 01:14:44 PM all 1.18 0.00 1.18 0.00 0.00 97.65 01:14:45 PM all 1.15 0.00 1.15 0.00 0.00 97.70 01:14:46 PM all 2.30 0.00 1.15 0.00 0.00 96.55 Average: all 1.54 0.00 1.16 0.00 0.00 97.30 [root@tg sa]# -- 특정 날짜 All CPU Usage [root@tg sa]# sar -u -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM CPU %user %nice %system %iowait %steal %idle 12:10:01 AM all 1.65 0.00 0.97 0.20 0.00 97.17 12:20:01 AM all 1.43 0.00 0.93 0.08 0.00 97.56 중략.. -------------------------------------------------------------------------------- -- 2. Individual CPU Usage -------------------------------------------------------------------------------- -- CPU 는 0,1,2,3 순으로 -- %idle 통해서 CPU Load 판단 -- 오늘 CPU Usage ( CPU 0번 ) [root@tg sa]# sar -P 0 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM CPU %user %nice %system %iowait %steal %idle 12:10:01 AM 0 1.65 0.00 0.97 0.20 0.00 97.17 12:20:01 AM 0 1.43 0.00 0.93 0.08 0.00 97.56 12:30:01 AM 0 1.43 0.00 0.91 0.05 0.00 97.61 12:40:01 AM 0 1.41 0.00 0.92 0.07 0.00 97.60 중략.. -- 현재 CPU Usage ( CPU 0번 ) Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:32:10 PM CPU %user %nice %system %iowait %steal %idle 01:32:11 PM 0 1.18 0.00 1.18 0.00 0.00 97.65 01:32:12 PM 0 2.35 0.00 1.18 0.00 0.00 96.47 01:32:13 PM 0 1.18 0.00 1.18 0.00 0.00 97.65 Average: 0 1.57 0.00 1.18 0.00 0.00 97.25 [root@tg sa]# -- 특정 날짜 CPU Usage ( CPU 0 번 ) [root@tg sa]# sar -P 0 -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM CPU %user %nice %system %iowait %steal %idle 12:10:01 AM 0 1.65 0.00 0.97 0.20 0.00 97.17 12:20:01 AM 0 1.43 0.00 0.93 0.08 0.00 97.56 12:30:01 AM 0 1.43 0.00 0.91 0.05 0.00 97.61 중략.. -------------------------------------------------------------------------------- -- 3. Memory Used and Free -------------------------------------------------------------------------------- -- 오늘 Memory Usage -- kbmemfree - kilobyte Memory Free 2499820 --> 2441 M -- kbmemused - Kilobyte Memory Used 5414820 --> 5287 M [root@tg sa]# sar -r Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 12:10:01 AM 2499820 5414820 68.42 1484 4490324 2651988 9.18 1433256 3437228 8 12:20:01 AM 2496720 5417920 68.45 1484 4490452 2654148 9.19 1435576 3437172 8 12:30:01 AM 2484388 5430252 68.61 1484 4490612 2673900 9.26 1445344 3437212 8 중략.. -- 현재 Memory Usage [root@tg sa]# sar -r 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:34:12 PM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 01:34:13 PM 420524 7494116 94.69 1508 6147548 4249344 14.71 2148228 4750460 28 01:34:14 PM 420524 7494116 94.69 1508 6147548 4249344 14.71 2148232 4750460 28 01:34:15 PM 420524 7494116 94.69 1508 6147548 4249344 14.71 2148232 4750460 28 Average: 420524 7494116 94.69 1508 6147548 4249344 14.71 2148231 4750460 28 [root@tg sa]# -- 특정 날짜 Memory Usage root@tg sa]# sar -r -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit kbactive kbinact kbdirty 12:10:01 AM 2499820 5414820 68.42 1484 4490324 2651988 9.18 1433256 3437228 8 12:20:01 AM 2496720 5417920 68.45 1484 4490452 2654148 9.19 1435576 3437172 8 12:30:01 AM 2484388 5430252 68.61 1484 4490612 2673900 9.26 1445344 3437212 8 중략.. -------------------------------------------------------------------------------- --4. Swap Space Used -------------------------------------------------------------------------------- -- 오늘 Swap Space Usage -- kbswpused - Kilobyte Swap Used -- %swpused - Swap Used % = kbswpused / ( kbswpfree + kbswpused ) [root@tg sa]# sar -S Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM kbswpfree kbswpused %swpused kbswpcad %swpcad 12:10:01 AM 20971516 0 0.00 0 0.00 12:20:01 AM 20971516 0 0.00 0 0.00 12:30:01 AM 20971516 0 0.00 0 0.00 -- 현재 Swap Space Usage [root@tg sa]# sar -S 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:39:46 PM kbswpfree kbswpused %swpused kbswpcad %swpcad 01:39:47 PM 20971516 0 0.00 0 0.00 01:39:48 PM 20971516 0 0.00 0 0.00 01:39:49 PM 20971516 0 0.00 0 0.00 Average: 20971516 0 0.00 0 0.00 -- 특정 날짜 Swap Space Usage [root@tg sa]# sar -S -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM kbswpfree kbswpused %swpused kbswpcad %swpcad 12:10:01 AM 20971516 0 0.00 0 0.00 12:20:01 AM 20971516 0 0.00 0 0.00 12:30:01 AM 20971516 0 0.00 0 0.00 -------------------------------------------------------------------------------- -- 5. Overall I/O Activities -------------------------------------------------------------------------------- -- 오늘 I/O -- tps - read+write / seconds -- rtps - read / seconds -- wtps - write / seconds -- bread/s - Bytes read per seconds -- bwrtn/s - Bytes written per seconds. [root@tg sa]# sar -b Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM tps rtps wtps bread/s bwrtn/s 12:10:01 AM 4.09 0.13 3.96 1.05 63.62 12:20:01 AM 2.56 0.04 2.52 0.32 32.76 12:30:01 AM 2.67 0.05 2.62 0.43 32.90 중략.. -- 현재 I/O [root@tg sa]# sar -b 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:45:39 PM tps rtps wtps bread/s bwrtn/s 01:45:40 PM 0.00 0.00 0.00 0.00 0.00 01:45:41 PM 5.88 0.00 5.88 0.00 94.12 01:45:42 PM 0.00 0.00 0.00 0.00 0.00 Average: 1.95 0.00 1.95 0.00 31.25 -- 특정 날짜 I/O [root@tg sa]# sar -b -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM tps rtps wtps bread/s bwrtn/s 12:10:01 AM 4.09 0.13 3.96 1.05 63.62 12:20:01 AM 2.56 0.04 2.52 0.32 32.76 12:30:01 AM 2.67 0.05 2.62 0.43 32.90 중략.. -------------------------------------------------------------------------------- -- 6. 특정 Block Device I/O -------------------------------------------------------------------------------- -- 오늘 특정 Block Device I/O [root@tg sa]# sar -d Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 12:10:01 AM dev11-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM dev8-0 4.09 1.05 63.62 15.80 0.01 2.10 2.03 0.83 12:10:01 AM dev252-0 0.10 0.00 0.72 7.11 0.00 2.77 2.45 0.02 12:10:01 AM dev252-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM dev252-2 0.25 0.00 2.04 8.32 0.00 1.15 1.05 0.03 12:10:01 AM dev252-3 3.66 1.05 60.86 16.90 0.01 2.22 2.16 0.79 12:20:01 AM dev11-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 중략.. -- 현재 특정 Block Device I/O [root@tg sa]# sar -d 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:49:09 PM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 01:49:10 PM dev11-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:49:10 PM dev8-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:49:10 PM dev252-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:49:10 PM dev252-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:49:10 PM dev252-2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:49:10 PM dev252-3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -- 특정 날짜 특정 Block Device I/O [root@tg sa]# sar -d -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM DEV tps rd_sec/s wr_sec/s avgrq-sz avgqu-sz await svctm %util 12:10:01 AM dev11-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM dev8-0 4.09 1.05 63.62 15.80 0.01 2.10 2.03 0.83 12:10:01 AM dev252-0 0.10 0.00 0.72 7.11 0.00 2.77 2.45 0.02 12:10:01 AM dev252-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM dev252-2 0.25 0.00 2.04 8.32 0.00 1.15 1.05 0.03 12:10:01 AM dev252-3 3.66 1.05 60.86 16.90 0.01 2.22 2.16 0.79 12:20:01 AM dev11-0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 중략.. -------------------------------------------------------------------------------- -- 7. Context Switch / Seconds -------------------------------------------------------------------------------- -- 오늘 Context Switch / Seconds root@tg sa]# sar -w Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM proc/s cswch/s 12:10:01 AM 0.36 2060.08 12:20:01 AM 0.28 2046.24 12:30:01 AM 0.27 2046.27 중략.. -- 현재 Context Switch / Seconds [root@tg sa]# sar -w 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:51:35 PM proc/s cswch/s 01:51:36 PM 0.00 2027.91 01:51:37 PM 0.00 1988.51 01:51:38 PM 0.00 1954.65 Average: 0.00 1990.35 [root@tg sa]# -- 특정 날짜 Context Switch / Seconds [root@tg sa]# sar -w -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM proc/s cswch/s 12:10:01 AM 0.36 2060.08 12:20:01 AM 0.28 2046.24 12:30:01 AM 0.27 2046.27 중략.. -------------------------------------------------------------------------------- -- 8. Run Queue and Load Average -------------------------------------------------------------------------------- -- 오늘 Run Queue and Load Average -- blocked - I/O 대기 root@tg sa]# sar -q Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked 12:10:01 AM 0 308 0.01 0.03 0.05 0 12:20:01 AM 0 308 0.00 0.01 0.05 0 12:30:01 AM 1 310 0.40 0.10 0.07 0 중략.. -- 현재 Run Queue and Load Average [root@tg sa]# sar -q 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:53:22 PM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked 01:53:23 PM 0 449 0.00 0.01 0.05 0 01:53:24 PM 0 449 0.00 0.01 0.05 0 01:53:25 PM 0 449 0.00 0.01 0.05 0 Average: 0 449 0.00 0.01 0.05 0 -- 특정 날짜 Run Queue and Load Average [root@tg sa]# sar -q -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked 12:10:01 AM 0 308 0.01 0.03 0.05 0 12:20:01 AM 0 308 0.00 0.01 0.05 0 12:30:01 AM 1 310 0.40 0.10 0.07 0 중략.. -------------------------------------------------------------------------------- -- 9. N/W -------------------------------------------------------------------------------- -- 오늘 N/W [root@tg sa]# sar -n DEV Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 12:10:01 AM virbr0-nic 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM enp0s8 0.10 0.16 0.01 0.01 0.00 0.00 0.00 12:10:01 AM enp0s3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM virbr0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM lo 0.16 0.16 0.01 0.01 0.00 0.00 0.00 12:20:01 AM virbr0-nic 0.00 0.00 0.00 0.00 0.00 0.00 0.00 중략.. -- 현재 N/W [root@tg sa]# sar -n DEV 1 3 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:56:18 PM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 01:56:19 PM virbr0-nic 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:56:19 PM enp0s8 1.19 1.19 0.07 0.20 0.00 0.00 0.00 01:56:19 PM enp0s3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:56:19 PM virbr0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 01:56:19 PM lo 0.00 0.00 0.00 0.00 0.00 0.00 0.00 중략.. -- 특정 날짜 N/W [root@tg sa]# sar -n DEV -f /var/log/sa/sa14 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 12:00:01 AM IFACE rxpck/s txpck/s rxkB/s txkB/s rxcmp/s txcmp/s rxmcst/s 12:10:01 AM virbr0-nic 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM enp0s8 0.10 0.16 0.01 0.01 0.00 0.00 0.00 12:10:01 AM enp0s3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM virbr0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12:10:01 AM lo 0.16 0.16 0.01 0.01 0.00 0.00 0.00 12:20:01 AM virbr0-nic 0.00 0.00 0.00 0.00 0.00 0.00 0.00 중략.. -------------------------------------------------------------------------------- -- 10. 특정 시점 이후 과거 데이타 확인 하기 -------------------------------------------------------------------------------- -- 오늘 13시(13:00:00) 이후, [root@tg sa]# sar -u -f /var/log/sa/sa14 -s 13:00:00 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:00:02 PM CPU %user %nice %system %iowait %steal %idle 01:02:01 PM all 2.04 0.00 1.18 0.11 0.00 96.67 01:04:01 PM all 1.50 0.00 0.97 0.09 0.00 97.44 01:06:01 PM all 1.66 0.01 1.03 0.47 0.00 96.83 -- 시작시간, 종료 시간 지정 [root@tg sa]# sar -u -f /var/log/sa/sa14 -s 13:00:00 -e 19:00:00 ... -- 특정 날짜 13시(13:00:00) 이후 [root@tg sa]# sar -u -s 13:00:00 Linux 3.8.13-98.7.1.el7uek.x86_64 (tg) 03/14/2018 _x86_64_ (1 CPU) 01:00:02 PM CPU %user %nice %system %iowait %steal %idle 01:02:01 PM all 2.04 0.00 1.18 0.11 0.00 96.67 01:04:01 PM all 1.50 0.00 0.97 0.09 0.00 97.44 01:06:01 PM all 1.66 0.01 1.03 0.47 0.00 96.83 01:08:01 PM all 1.49 0.00 0.87 0.00 0.00 97.64 01:10:01 PM all 1.58 0.01 0.91 0.01 0.00 97.49 01:12:01 PM all 1.38 0.00 0.96 0.11 0.00 97.55 01:14:01 PM all 1.39 0.00 0.90 0.15 0.00 97.56 중략.. -------------------------------------------------------------------------------- | cs |