OSWatcher (oswbb) là 1 tập các shell scripts dùng để thu thập, lưu trữ lại các thông tin về OS, network nhằm hỗ trợ phân tích các vấn đề liên quan tới performance hệ thống. Đây là công cụ được cung cấp bởi Oracle, và có thể cài đặt riêng (standalone), hoặc sử dụng trong bộ TFA Database Support Tools Bundle.
Ta có thể cấu hình thời gian thu thập thông tin. Mặc định, thông tin sẽ được thu thập sau mỗi 30s và được lưu trữ lại trong vòng 48h.
OSWatcher sẽ gọi các công cụ hệ thống để thu thập thông tin, tùy theo platform như:
- ps
- top
- ifconfig
- mpstat
- iostat
- netstat
- traceroute
- vmstat
- sar (HP-UX Only)
- cpuinfo (Linux Only)
- meminfo (Linux Only)
- slabinfo (Linux Only)
OSWatcher có thể chạy trên các nền tảng:
- AIX
- Solaris
- HP-UX
- Linux
Để cài đặt, ta download OSWatcher về, sau đó extract ra để sử dụng
1 2 3 |
$ tar -xvf oswbb812.tar $ cd oswbb [oswbb]$ chmod 744 * |
Để chạy OSWatcher, ta dùng script startOSWbb và có thể truyền vào 4 tham số
1 |
$ ./startOSWbb 30 48 None /usr/app/archive |
ARG1 = khoảng thời gian tạo snapshot, mặc định là 30s
ARG2 = thời gian lưu trữ dữ liệu, mặc định 48h
ARG3 = công cụ nén các file dữ liệu lại sau khi được tạo ra (vd None, zip, gzip…)
ARG4 = vị trí lưu trữ các tập tin
Ta nên chạy OSWatcher dưới chế độ background
1 |
$ nohup ./startOSWbb.sh 60 48 & |
Để stop OSWatcher
1 |
$ ./stopOSWbb.sh |
Để phân tích dữ liệu thu thập được, ta sử dụng công cụ đi kèm là oswbba. Công cụ này có thể hỗ trợ vẽ đồ thị, tìm ra các nguyên nhân gây ảnh hưởng đến performance và đưa ra các lời khuyên để xử lý. Tham số cần truyền vào là vị trí thư mục lưu các file data.
1 |
$ java -jar oswbba.jar -i /u02/home/osw/archive |
oswbba cung cấp menu để ta tùy chọn
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
Enter 1 to Display CPU Process Queue Graphs Enter 2 to Display CPU Utilization Graphs Enter 3 to Display CPU Other Graphs Enter 4 to Display Memory Graphs Enter 5 to Display Disk IO Graphs Enter GC to Generate All CPU Gif Files Enter GM to Generate All Memory Gif Files Enter GD to Generate All Disk Gif Files Enter GN to Generate All Network Gif Files Enter L to Specify Alternate Location of Gif Directory Enter Z to Zoom Graph Time Scale (Does not change analysis dataset) Enter B to Returns to Baseline Graph Time Scale (Does not change analysis dataset) Enter R to Remove Currently Displayed Graphs Enter X to Export Parsed Data to Flat File Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale) Enter A to Analyze Data Enter D to Generate DashBoard Enter Q to Quit Program |
VD về kết quả phân tích tạo ra bởi oswbba, với option D, có tạo dashboard
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 |
[oswbb]$ java -jar oswbba.jar -i /home/oracle/orachk/tfa/repository/suptools/orcldb01/oswbb/oracle/archive Starting OSW Analyzer V8.1.2 OSWatcher Analyzer Written by Oracle Center of Expertise Copyright (c) 2017 by Oracle Corporation Parsing Data. Please Wait... Scanning file headers for version and platform info... Parsing file orcldb01_iostat_18.10.14.1400.dat ... Parsing file orcldb01_iostat_18.10.14.1500.dat ... Parsing file orcldb01_iostat_18.10.14.1600.dat ... Parsing file orcldb01_iostat_18.10.14.1700.dat ... Parsing file orcldb01_iostat_18.10.14.1800.dat ... Parsing file orcldb01_iostat_18.10.14.1900.dat ... Parsing Completed. Enter 1 to Display CPU Process Queue Graphs Enter 2 to Display CPU Utilization Graphs Enter 3 to Display CPU Other Graphs Enter 4 to Display Memory Graphs Enter 5 to Display Disk IO Graphs Enter GC to Generate All CPU Gif Files Enter GM to Generate All Memory Gif Files Enter GD to Generate All Disk Gif Files Enter GN to Generate All Network Gif Files Enter L to Specify Alternate Location of Gif Directory Enter Z to Zoom Graph Time Scale (Does not change analysis dataset) Enter B to Returns to Baseline Graph Time Scale (Does not change analysis dataset) Enter R to Remove Currently Displayed Graphs Enter X to Export Parsed Data to Flat File Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale) Enter A to Analyze Data Enter D to Generate DashBoard Enter Q to Quit Program Please Select an Option:D Enter a unique analysis/dashBoard directory name or enter <CR> to accept default name: A new analysis file analysis/orcldb01_Oct14140002_1539676230/analysis.txt has been created. Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Run_Queue.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Run_Adjusted_Queue.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Block_Queue.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_HB.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_PS_Processes.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Cpu_Idle.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Cpu_System.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Cpu_User.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Cpu_Wa.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Cpu_Interrupts.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Context_Switches.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Memory_Swap.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Memory_Free.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Memory_Page_In_Rate.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Memory_Page_Out_Rate.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Cpu_Wa.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_Block_Queue.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_IO_ST.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_IO_AW.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_IO_PB.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_IO_RPS.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_IO_WPS.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_OS_IO_TPS.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_rx_ok.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_rx_err.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_rx_drp.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_rx_ovr.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_tx_ok.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_tx_err.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_tx_drp.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_lo_tx_ovr.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_rx_ok.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_rx_err.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_rx_drp.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_rx_ovr.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_tx_ok.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_tx_err.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_tx_drp.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_link_eth1_tx_ovr.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_requests_sent_out.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_total_packets_received.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_bad_header_checksum.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_fragments_dropped.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_fragments_created.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_fragments_received.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_fragments_dropped_after.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_fragments_warn1.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_ip_fragments_warn2.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_udp_datagrams_in.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_udp_datagrams_out.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_udp_dropped.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_udp_broadcast_dropped.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_udp_socket_overflows.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_udp_bad_header_checksums.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_in_segs.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_out_segs.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_retrans_segs.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_conn_resets_received_segs.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_resets_sent.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_failed_conn_attempts.jpg Generating file analysis/orcldb01_Oct14140002_1539676230/dashboard/generated_files/OSWg_tcp_retran_error_rate.jpg This report is best viewed in a fixed font editor like textpad... OSWatcher Analyzer Input Archive: /backup/orachk/tfa/repository/suptools/orcldb01/oswbb/oracle/archive Archive Source Dest: /backup/orachk/tfa/repository/suptools/orcldb01/oswbb/oracle/archive Archive Begin Time: Oct 14 14:00:02 2018 Archive End Time: Oct 16 14:37:07 2018 Analysis Begin Time: Oct 14 14:00:02 2018 Analysis End Time: Oct 16 14:37:07 2018 Hostname: orcldb01 OS Version: Linux OSW Version: v8.1.2 Snapshot Freq: 30 CPU COUNT: 6 ############################################################################ # Contents Of This Report: # # Section 1: System Status # Section 2: System Slowdowns # Section 2.1: System Slowdown RCA Process Level Ordered By Impact # Section 3: System General Findings # Section 4: CPU Detailed Findings # Section 4.1: CPU Run Queue: # Section 4.2: CPU Utilization: Percent Busy # Section 4.3: CPU Utilization: Percent Sys # Section 5: Memory Detailed Findings # Section 5.1: Memory: Process Swap Queue # Section 5.2: Memory: Scan Rate # Section 5.3 Memory: Page In: # Section 5.4 Memory: Page Out: # Section 5.5 Memory: Page Tables (Linux only): # Section 5.6: Top 5 Memory Consuming Processes Beginning # Section 5.7: Top 5 Memory Consuming Processes Ending # Section 6: Disk Detailed Findings # Section 6.1: Disk Percent Utilization Findings # Section 6.2: Disk Service Times Findings # Section 6.3: Disk Wait Queue Times Findings ############################################################################ # Section 1: System Status # # This section lists the status of each major subsystem. Status values are: # Critical: The subsystem requires immediate attention # Warning: The subsystem detailed findings should be reviewed # OK: The subsystem was found to be okay # Unknown: The status of the subsystem could not be determined # # Subsystem Status ------------------------ CPU OK MEMORY CRITICAL I/O OK NET WARNING ############################################################################ # Section 2.0: System Slowdown Summary Ordered By Impact # # This section lists the times when the OS started to slowdown. oswbba is # able to measure this by looking at the timestamps in the individual files # it collects. It compares the time between the snapshots and looks to see # how this time differs from the expected timestamp which will be the oswbb # $ Snapshot Freq value listed at the top of this file. Any slowdowns listed # in this section will be ordered by the slowdown Secs column.The subsystem # most likely responsible for the slowdown will be identified here along with. # possible reason codes # No System Wide Slowdowns Detected ############################################################################ # Section 3: System General Findings |
Trong thư mục kết quả sẽ có tập tin dashboard để ta xem thông tin về CPU, memory, I/O, network 1 cách trực quan, dễ dàng

Thông tin về CPU

Thông tin về memory, với 1 số thông tin được đưa ra

Thông tin về network
Đây là công cụ khá hữu ích và nên được cài đặt trên mỗi server database. Trong các phần tiếp theo, chúng ta sẽ tiếp tục tìm hiểu các công cụ hỗ trợ khác được cung cấp bởi Oracle.
Leave a Reply