Merge lp:~percona-toolkit-dev/percona-toolkit/bash-tool-testing into lp:percona-toolkit/1.0
- bash-tool-testing
- Merge into 1.0
Proposed by
Daniel Nichter
Status: | Merged |
---|---|
Approved by: | Daniel Nichter |
Approved revision: | 87 |
Merged at revision: | 80 |
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/bash-tool-testing |
Merge into: | lp:percona-toolkit/1.0 |
Diff against target: |
8959 lines (+3873/-3740) 123 files modified
bin/pt-diskstats (+11/-15) bin/pt-mysql-summary (+76/-66) bin/pt-pmp (+20/-21) bin/pt-summary (+130/-117) t/pt-diskstats/group-by-all-01 (+0/-41) t/pt-diskstats/group-by-disk-01 (+0/-14) t/pt-diskstats/group-by-disk-02 (+0/-8) t/pt-diskstats/group-by-disk-03 (+0/-13) t/pt-diskstats/group-by-disk-04 (+0/-11) t/pt-diskstats/group-by-disk-05 (+0/-14) t/pt-diskstats/group-by-sample-01 (+0/-10) t/pt-diskstats/group-by-sample-02 (+0/-34) t/pt-diskstats/group-by-sample-03 (+0/-11) t/pt-diskstats/group-by-sample-04 (+0/-16) t/pt-diskstats/group_by_all.sh (+47/-0) t/pt-diskstats/group_by_disk.sh (+74/-0) t/pt-diskstats/group_by_sample.sh (+84/-0) t/pt-diskstats/pt-diskstats.t (+4/-2) t/pt-mysql-summary/find-my-cnf-file-01 (+0/-6) t/pt-mysql-summary/find-my-cnf-file-02 (+0/-6) t/pt-mysql-summary/find-my-cnf-file-03 (+0/-6) t/pt-mysql-summary/find-my-cnf-file-04 (+0/-6) t/pt-mysql-summary/find_my_cnf_file.sh (+19/-0) t/pt-mysql-summary/format-innodb-status-01 (+0/-52) t/pt-mysql-summary/format-innodb-status-02 (+0/-35) t/pt-mysql-summary/format-innodb-status-03 (+0/-19) t/pt-mysql-summary/format-innodb-status-04 (+0/-29) t/pt-mysql-summary/format_binlog_filters.sh (+11/-0) t/pt-mysql-summary/format_innodb_status.sh (+146/-0) t/pt-mysql-summary/format_overall_db_stats.sh (+60/-0) t/pt-mysql-summary/format_status_variables-01 (+0/-93) t/pt-mysql-summary/format_status_variables.sh (+96/-0) t/pt-mysql-summary/fuzz-01 (+0/-6) t/pt-mysql-summary/fuzz.sh (+6/-0) t/pt-mysql-summary/get-mysql-tz (+0/-6) t/pt-mysql-summary/get-mysql-uptime (+0/-9) t/pt-mysql-summary/get-mysql-version (+0/-9) t/pt-mysql-summary/get_mysql_info.sh (+25/-0) t/pt-mysql-summary/overall_db_stats-01 (+0/-33) t/pt-mysql-summary/overall_db_stats-02 (+0/-27) t/pt-mysql-summary/parse-master-status-01 (+0/-9) t/pt-mysql-summary/parse-mysqld-instances-01 (+0/-12) t/pt-mysql-summary/parse-mysqld-instances-02 (+0/-10) t/pt-mysql-summary/parse-mysqld-instances-03 (+0/-10) t/pt-mysql-summary/parse-mysqld-instances-04 (+0/-13) t/pt-mysql-summary/parse-processlist-01 (+0/-61) t/pt-mysql-summary/parse_mysqld_instances.sh (+46/-0) t/pt-mysql-summary/pretty-print-my-cnf-01 (+0/-37) t/pt-mysql-summary/pretty_print_cnf_file.sh (+39/-0) t/pt-mysql-summary/pt-mysql-summary.t (+4/-2) t/pt-mysql-summary/summarize-binlogs-01 (+0/-10) t/pt-mysql-summary/summarize_binlogs.sh (+12/-0) t/pt-mysql-summary/summarize_processlist.sh (+63/-0) t/pt-pmp/aggregate-stacktrace-01 (+0/-27) t/pt-pmp/aggregate-stacktrace-02 (+0/-19) t/pt-pmp/aggregate-stacktrace-03 (+0/-18) t/pt-pmp/aggregate-stacktrace-03-b (+0/-16) t/pt-pmp/aggregate-stacktrace-04 (+0/-12) t/pt-pmp/aggregate-stacktrace-05 (+0/-13) t/pt-pmp/aggregate_stacktrace.sh (+122/-0) t/pt-pmp/pt-pmp.t (+4/-2) t/pt-summary/format-filesystems-01 (+0/-9) t/pt-summary/format-filesystems-02 (+0/-10) t/pt-summary/format-filesystems-03 (+0/-9) t/pt-summary/format-filesystems-04 (+0/-13) t/pt-summary/format-filesystems-05 (+0/-11) t/pt-summary/format-filesystems-06 (+0/-13) t/pt-summary/format_vmstat.sh (+19/-17) t/pt-summary/fusionmpt-01 (+0/-19) t/pt-summary/fusionmpt-02 (+0/-15) t/pt-summary/fusionmpt-03 (+0/-15) t/pt-summary/lsi-megaraid-bbu-status (+0/-38) t/pt-summary/lsi-megaraid-devices-0 (+0/-100) t/pt-summary/lsi-megaraid-devices-1 (+0/-134) t/pt-summary/lsi-megaraid-vdevices-0 (+0/-132) t/pt-summary/lsi-megaraid-vdevices-1 (+0/-43) t/pt-summary/netstat-summary-01 (+0/-17) t/pt-summary/netstat-summary-02 (+0/-30) t/pt-summary/parse-arcconf-01 (+0/-154) t/pt-summary/parse-arcconf-02 (+0/-20) t/pt-summary/parse-dmesg-raid-01 (+0/-8) t/pt-summary/parse-dmesg-raid-02 (+0/-8) t/pt-summary/parse-dmesg-raid-03 (+0/-8) t/pt-summary/parse-dmesg-raid-04 (+0/-8) t/pt-summary/parse-dmidecode-mem-devices-01 (+0/-465) t/pt-summary/parse-dmidecode-mem-devices-02 (+0/-750) t/pt-summary/parse-dmidecode-mem-devices-03 (+0/-28) t/pt-summary/parse-dmidecode-mem-devices-04 (+0/-21) t/pt-summary/parse-dmidecode-mem-devices-05 (+0/-28) t/pt-summary/parse-fdisk-01 (+0/-14) t/pt-summary/parse-free-minus-b (+0/-63) t/pt-summary/parse-hpacucli-01 (+0/-22) t/pt-summary/parse-ip-s-link-01 (+0/-13) t/pt-summary/parse-ip-s-link-02 (+0/-13) t/pt-summary/parse-lsi-megaraid-adapter-info (+0/-237) t/pt-summary/parse-lspci-ethernet-01 (+0/-9) t/pt-summary/parse-lspci-raid-01 (+0/-8) t/pt-summary/parse-lspci-raid-02 (+0/-8) t/pt-summary/parse-lspci-raid-03 (+0/-8) t/pt-summary/parse-lspci-raid-04 (+0/-8) t/pt-summary/parse-lspci-raid-05 (+0/-8) t/pt-summary/parse-proc-cpuinfo (+0/-70) t/pt-summary/parse-virtualization-dmesg (+0/-8) t/pt-summary/parse_arcconf.sh (+175/-0) t/pt-summary/parse_dmidecode_mem_devices.sh (+103/-0) t/pt-summary/parse_ethernet_controller_lspci.sh (+8/-0) t/pt-summary/parse_fdisk.sh (+13/-0) t/pt-summary/parse_filesystems.sh (+51/-0) t/pt-summary/parse_free_minus_b.sh (+66/-0) t/pt-summary/parse_fusionmpt_lsiutil.sh (+49/-0) t/pt-summary/parse_hpacucli.sh (+23/-0) t/pt-summary/parse_ip_s_link.sh (+27/-0) t/pt-summary/parse_lsi_megaraid.sh (+695/-0) t/pt-summary/parse_netstat.sh (+48/-0) t/pt-summary/parse_proc_cpuinfo.sh (+71/-0) t/pt-summary/parse_raid_controller_dmesg.sh (+31/-0) t/pt-summary/parse_raid_controller_lspci.sh (+38/-0) t/pt-summary/parse_virtualization_dmesg.sh (+7/-0) t/pt-summary/pt-summary.t (+4/-2) t/pt-summary/samples/dmidecode-001.txt (+452/-0) t/pt-summary/samples/dmidecode-002.txt (+732/-0) util/test-bash-functions (+162/-0) util/test-bash-tool (+0/-120) |
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/bash-tool-testing |
Related bugs: | |
Related blueprints: |
Bash Tool Testing
(High)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Approve | ||
Review via email: mp+72235@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/pt-diskstats' | |||
2 | --- bin/pt-diskstats 2011-08-04 20:35:38 +0000 | |||
3 | +++ bin/pt-diskstats 2011-08-19 17:39:24 +0000 | |||
4 | @@ -284,10 +284,10 @@ | |||
5 | 284 | # last sample. | 284 | # last sample. |
6 | 285 | group_by_disk () { | 285 | group_by_disk () { |
7 | 286 | [ -z "${awk_print_line}" ] && design_print_formats | 286 | [ -z "${awk_print_line}" ] && design_print_formats |
9 | 287 | cat > /tmp/percona-toolkit.awk <<EOF | 287 | awk " |
10 | 288 | BEGIN { | 288 | BEGIN { |
11 | 289 | devs = 0; | 289 | devs = 0; |
13 | 290 | devname = "${OPT_d}"; | 290 | devname = \"${OPT_d}\"; |
14 | 291 | } | 291 | } |
15 | 292 | \$1 !~ /TS/ && \$3 ~ devname { | 292 | \$1 !~ /TS/ && \$3 ~ devname { |
16 | 293 | ${awk_parse_line} | 293 | ${awk_parse_line} |
17 | @@ -303,7 +303,7 @@ | |||
18 | 303 | } | 303 | } |
19 | 304 | ${awk_find_max_device_name_length} | 304 | ${awk_find_max_device_name_length} |
20 | 305 | ${awk_print_header} | 305 | ${awk_print_header} |
22 | 306 | elapsed = curr_ts - first["ts"]; | 306 | elapsed = curr_ts - first[\"ts\"]; |
23 | 307 | for ( i = 1; i <= devs; i++ ) { | 307 | for ( i = 1; i <= devs; i++ ) { |
24 | 308 | dev = devsort[i]; | 308 | dev = devsort[i]; |
25 | 309 | ${awk_get_overall_increments} | 309 | ${awk_get_overall_increments} |
26 | @@ -312,21 +312,19 @@ | |||
27 | 312 | t_in_progress = (tot_in_progress / (iterations - 1)); | 312 | t_in_progress = (tot_in_progress / (iterations - 1)); |
28 | 313 | devs_in_group = 1; | 313 | devs_in_group = 1; |
29 | 314 | ${awk_compute_read_write_stats} | 314 | ${awk_compute_read_write_stats} |
31 | 315 | line_ts="{" (iterations - 1) "}"; | 315 | line_ts=\"{\" (iterations - 1) \"}\"; |
32 | 316 | ${awk_print_line} | 316 | ${awk_print_line} |
33 | 317 | } | 317 | } |
37 | 318 | } | 318 | } " "$@" |
35 | 319 | EOF | ||
36 | 320 | awk -f /tmp/percona-toolkit.awk "$@" | ||
38 | 321 | } | 319 | } |
39 | 322 | 320 | ||
40 | 323 | # Prints out one line for each sample, summing up all disks together. | 321 | # Prints out one line for each sample, summing up all disks together. |
41 | 324 | group_by_sample() { | 322 | group_by_sample() { |
42 | 325 | [ -z "${awk_print_line}" ] && design_print_formats | 323 | [ -z "${awk_print_line}" ] && design_print_formats |
44 | 326 | cat > /tmp/percona-toolkit.awk <<EOF | 324 | awk " |
45 | 327 | BEGIN { | 325 | BEGIN { |
46 | 328 | devs = 0; | 326 | devs = 0; |
48 | 329 | devname = "${OPT_d}"; | 327 | devname = \"${OPT_d}\"; |
49 | 330 | } | 328 | } |
50 | 331 | \$1 !~ /TS/ && \$3 ~ devname { | 329 | \$1 !~ /TS/ && \$3 ~ devname { |
51 | 332 | ${awk_parse_line} | 330 | ${awk_parse_line} |
52 | @@ -368,7 +366,7 @@ | |||
53 | 368 | devs_in_group = devs; | 366 | devs_in_group = devs; |
54 | 369 | ${awk_compute_read_write_stats} | 367 | ${awk_compute_read_write_stats} |
55 | 370 | if ( devs > 1 ) { | 368 | if ( devs > 1 ) { |
57 | 371 | dev = "{" devs "}"; | 369 | dev = \"{\" devs \"}\"; |
58 | 372 | } | 370 | } |
59 | 373 | else { | 371 | else { |
60 | 374 | dev = devsort[1]; | 372 | dev = devsort[1]; |
61 | @@ -377,14 +375,12 @@ | |||
62 | 377 | printed_a_line = 1; | 375 | printed_a_line = 1; |
63 | 378 | } | 376 | } |
64 | 379 | if ( iterations == 1 || printed_a_line == 1 ) { | 377 | if ( iterations == 1 || printed_a_line == 1 ) { |
67 | 380 | # We don't save "curr" as "prev" on every sample we see, because if the | 378 | # We don't save curr as prev on every sample we see, because if the |
68 | 381 | # interval of printing is more than one sample, we want "prev" to be | 379 | # interval of printing is more than one sample, we want prev to be |
69 | 382 | # the first sample in the interval, not the previous sample seen. | 380 | # the first sample in the interval, not the previous sample seen. |
70 | 383 | ${awk_save_curr_as_prev} | 381 | ${awk_save_curr_as_prev} |
71 | 384 | } | 382 | } |
75 | 385 | } | 383 | } " "$@" |
73 | 386 | EOF | ||
74 | 387 | awk -f /tmp/percona-toolkit.awk "$@" | ||
76 | 388 | } | 384 | } |
77 | 389 | 385 | ||
78 | 390 | # Prints out one line for each sample, for each disk that matches the pattern. | 386 | # Prints out one line for each sample, for each disk that matches the pattern. |
79 | 391 | 387 | ||
80 | === modified file 'bin/pt-mysql-summary' | |||
81 | --- bin/pt-mysql-summary 2011-08-04 20:35:38 +0000 | |||
82 | +++ bin/pt-mysql-summary 2011-08-19 17:39:24 +0000 | |||
83 | @@ -202,9 +202,10 @@ | |||
84 | 202 | # Parses the output of 'ps -e -o args | $AP_GREP mysqld' or 'ps auxww...' | 202 | # Parses the output of 'ps -e -o args | $AP_GREP mysqld' or 'ps auxww...' |
85 | 203 | # which should be in /tmp/percona-toolkit. | 203 | # which should be in /tmp/percona-toolkit. |
86 | 204 | parse_mysqld_instances () { | 204 | parse_mysqld_instances () { |
87 | 205 | local file=$1 | ||
88 | 205 | echo " Port Data Directory Socket" | 206 | echo " Port Data Directory Socket" |
89 | 206 | echo " ===== ========================== ======" | 207 | echo " ===== ========================== ======" |
91 | 207 | $AP_GREP '/mysqld ' /tmp/percona-toolkit | while read line; do | 208 | $AP_GREP '/mysqld ' $file | while read line; do |
92 | 208 | for word in ${line}; do | 209 | for word in ${line}; do |
93 | 209 | # Some grep doesn't have -o, so I have to pull out the words I want by | 210 | # Some grep doesn't have -o, so I have to pull out the words I want by |
94 | 210 | # looking at each word | 211 | # looking at each word |
95 | @@ -226,12 +227,14 @@ | |||
96 | 226 | # /tmp/percona-toolkit. You have to specify the port for the instance you are | 227 | # /tmp/percona-toolkit. You have to specify the port for the instance you are |
97 | 227 | # interested in, in case there are multiple instances. | 228 | # interested in, in case there are multiple instances. |
98 | 228 | find_my_cnf_file() { | 229 | find_my_cnf_file() { |
101 | 229 | if test -n "$1" && $AP_GREP -- "/mysqld.*--port=$1" /tmp/percona-toolkit >/dev/null 2>&1 ; then | 230 | local file=$1 |
102 | 230 | $AP_GREP -- "/mysqld.*--port=$1" /tmp/percona-toolkit \ | 231 | local port=$2 |
103 | 232 | if test -n "$port" && $AP_GREP -- "/mysqld.*--port=$port" $file >/dev/null 2>&1 ; then | ||
104 | 233 | $AP_GREP -- "/mysqld.*--port=$port" $file \ | ||
105 | 231 | | $AP_AWK 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }' \ | 234 | | $AP_AWK 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }' \ |
106 | 232 | | head -n1 | 235 | | head -n1 |
107 | 233 | else | 236 | else |
109 | 234 | $AP_GREP '/mysqld' /tmp/percona-toolkit \ | 237 | $AP_GREP '/mysqld' $file \ |
110 | 235 | | $AP_AWK 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }' \ | 238 | | $AP_AWK 'BEGIN{RS=" "; FS="=";} $1 ~ /--defaults-file/ { print $2; }' \ |
111 | 236 | | head -n1 | 239 | | head -n1 |
112 | 237 | fi | 240 | fi |
113 | @@ -255,7 +258,8 @@ | |||
114 | 255 | # Gets the system start and uptime in human readable format. Last restart date | 258 | # Gets the system start and uptime in human readable format. Last restart date |
115 | 256 | # should be in /tmp/percona-toolkit. | 259 | # should be in /tmp/percona-toolkit. |
116 | 257 | get_mysql_uptime () { | 260 | get_mysql_uptime () { |
118 | 258 | restart="$(cat /tmp/percona-toolkit)" | 261 | local file=$1 |
119 | 262 | restart="$(cat $file)" | ||
120 | 259 | uptime="$(get_stat Uptime)" | 263 | uptime="$(get_stat Uptime)" |
121 | 260 | uptime="$(secs_to_time ${uptime})" | 264 | uptime="$(secs_to_time ${uptime})" |
122 | 261 | echo "${restart} (up ${uptime})" | 265 | echo "${restart} (up ${uptime})" |
123 | @@ -263,16 +267,18 @@ | |||
124 | 263 | 267 | ||
125 | 264 | # Summarizes the output of SHOW MASTER LOGS, which is in /tmp/percona-toolkit | 268 | # Summarizes the output of SHOW MASTER LOGS, which is in /tmp/percona-toolkit |
126 | 265 | summarize_binlogs () { | 269 | summarize_binlogs () { |
130 | 266 | name_val "Binlogs" $(wc -l /tmp/percona-toolkit) | 270 | local file=$1 |
131 | 267 | name_val "Zero-Sized" $($AP_GREP -c '\<0$' /tmp/percona-toolkit) | 271 | name_val "Binlogs" $(wc -l $file) |
132 | 268 | size=$($AP_AWK '{t += $2} END{printf "%0.f\n", t}' /tmp/percona-toolkit) | 272 | name_val "Zero-Sized" $($AP_GREP -c '\<0$' $file) |
133 | 273 | size=$($AP_AWK '{t += $2} END{printf "%0.f\n", t}' $file) | ||
134 | 269 | name_val "Total Size" $(shorten ${size} 1) | 274 | name_val "Total Size" $(shorten ${size} 1) |
135 | 270 | } | 275 | } |
136 | 271 | 276 | ||
137 | 272 | # Print out binlog_do_db and binlog_ignore_db | 277 | # Print out binlog_do_db and binlog_ignore_db |
138 | 273 | format_binlog_filters () { | 278 | format_binlog_filters () { |
141 | 274 | name_val "binlog_do_db" $(cut -f3 /tmp/percona-toolkit) | 279 | local file=$1 |
142 | 275 | name_val "binlog_ignore_db" $(cut -f4 /tmp/percona-toolkit) | 280 | name_val "binlog_do_db" $(cut -f3 $file) |
143 | 281 | name_val "binlog_ignore_db" $(cut -f4 $file) | ||
144 | 276 | } | 282 | } |
145 | 277 | 283 | ||
146 | 278 | # Takes as input a file that has two samples of SHOW STATUS, columnized next to | 284 | # Takes as input a file that has two samples of SHOW STATUS, columnized next to |
147 | @@ -280,9 +286,10 @@ | |||
148 | 280 | # absolute, all-time per second, and per-second over the interval between the | 286 | # absolute, all-time per second, and per-second over the interval between the |
149 | 281 | # samples. Omits any rows that are all zeroes. | 287 | # samples. Omits any rows that are all zeroes. |
150 | 282 | format_status_variables () { | 288 | format_status_variables () { |
151 | 289 | local file=$1 | ||
152 | 283 | # First, figure out the intervals. | 290 | # First, figure out the intervals. |
155 | 284 | utime1=$($AP_AWK '/Uptime /{print $2}' /tmp/percona-toolkit); | 291 | utime1=$($AP_AWK '/Uptime /{print $2}' $file); |
156 | 285 | utime2=$($AP_AWK '/Uptime /{print $3}' /tmp/percona-toolkit); | 292 | utime2=$($AP_AWK '/Uptime /{print $3}' $file); |
157 | 286 | ${AP_AWK} " | 293 | ${AP_AWK} " |
158 | 287 | BEGIN { | 294 | BEGIN { |
159 | 288 | utime1 = ${utime1}; | 295 | utime1 = ${utime1}; |
160 | @@ -319,12 +326,12 @@ | |||
161 | 319 | printf(format, \$1, perday, persec, nowsec); | 326 | printf(format, \$1, perday, persec, nowsec); |
162 | 320 | } | 327 | } |
163 | 321 | } | 328 | } |
165 | 322 | }" /tmp/percona-toolkit | 329 | }" $file |
166 | 323 | } | 330 | } |
167 | 324 | 331 | ||
171 | 325 | # Slices the processlist a bunch of different ways. Uses input from | 332 | # Slices the processlist a bunch of different ways. The processlist should be |
172 | 326 | # /tmp/percona-toolkit-mysql-processlist. The processlist should be created with the \G | 333 | # created with the \G flag so it's vertical. |
173 | 327 | # flag so it's vertical. The parsing is a bit awkward because different | 334 | # The parsing is a bit awkward because different |
174 | 328 | # versions of awk have limitations like "too many fields on line xyz". So we | 335 | # versions of awk have limitations like "too many fields on line xyz". So we |
175 | 329 | # use 'cut' to shorten the lines. We count all things into temporary variables | 336 | # use 'cut' to shorten the lines. We count all things into temporary variables |
176 | 330 | # for each process in the processlist, and when we hit the Info: line which | 337 | # for each process in the processlist, and when we hit the Info: line which |
177 | @@ -332,13 +339,14 @@ | |||
178 | 332 | # variables. If we're summarizing Command, we count everything; otherwise, only | 339 | # variables. If we're summarizing Command, we count everything; otherwise, only |
179 | 333 | # non-Sleep processes get counted towards the sum and max of Time. | 340 | # non-Sleep processes get counted towards the sum and max of Time. |
180 | 334 | summarize_processlist () { | 341 | summarize_processlist () { |
181 | 342 | local file=$1 | ||
182 | 335 | for param in Command User Host db State; do | 343 | for param in Command User Host db State; do |
183 | 336 | echo | 344 | echo |
184 | 337 | printf ' %-30s %8s %7s %9s %9s\n' \ | 345 | printf ' %-30s %8s %7s %9s %9s\n' \ |
185 | 338 | "${param}" "COUNT(*)" Working "SUM(Time)" "MAX(Time)" | 346 | "${param}" "COUNT(*)" Working "SUM(Time)" "MAX(Time)" |
186 | 339 | echo " ------------------------------" \ | 347 | echo " ------------------------------" \ |
187 | 340 | "-------- ------- --------- ---------" | 348 | "-------- ------- --------- ---------" |
189 | 341 | cut -c1-80 /tmp/percona-toolkit-mysql-processlist \ | 349 | cut -c1-80 $file \ |
190 | 342 | | $AP_AWK " | 350 | | $AP_AWK " |
191 | 343 | \$1 == \"${param}:\" { | 351 | \$1 == \"${param}:\" { |
192 | 344 | p = substr(\$0, index(\$0, \":\") + 2); | 352 | p = substr(\$0, index(\$0, \":\") + 2); |
193 | @@ -384,6 +392,7 @@ | |||
194 | 384 | # sets in regular expressions, like [[:space:]] (looking at you, Debian). So | 392 | # sets in regular expressions, like [[:space:]] (looking at you, Debian). So |
195 | 385 | # the below patterns contain [<space><tab>] and must remain that way. | 393 | # the below patterns contain [<space><tab>] and must remain that way. |
196 | 386 | pretty_print_cnf_file () { | 394 | pretty_print_cnf_file () { |
197 | 395 | local file=$1 | ||
198 | 387 | $AP_AWK ' | 396 | $AP_AWK ' |
199 | 388 | BEGIN { | 397 | BEGIN { |
200 | 389 | FS="=" | 398 | FS="=" |
201 | @@ -403,7 +412,7 @@ | |||
202 | 403 | else { | 412 | else { |
203 | 404 | print $1; | 413 | print $1; |
204 | 405 | } | 414 | } |
206 | 406 | }' /tmp/percona-toolkit | 415 | }' $file |
207 | 407 | } | 416 | } |
208 | 408 | 417 | ||
209 | 409 | find_checkpoint_age() { | 418 | find_checkpoint_age() { |
210 | @@ -525,37 +534,38 @@ | |||
211 | 525 | 534 | ||
212 | 526 | # Summarizes various things about InnoDB status that are not easy to see by eye. | 535 | # Summarizes various things about InnoDB status that are not easy to see by eye. |
213 | 527 | format_innodb_status () { | 536 | format_innodb_status () { |
224 | 528 | name_val "Checkpoint Age" $(shorten $(find_checkpoint_age "${1}")) | 537 | local file=$1 |
225 | 529 | name_val "InnoDB Queue" "$(awk '/queries inside/{print}' "${1}")" | 538 | name_val "Checkpoint Age" $(shorten $(find_checkpoint_age "${file}")) |
226 | 530 | name_val "Oldest Transaction" "$(find_max_trx_time "${1}") Seconds"; | 539 | name_val "InnoDB Queue" "$(awk '/queries inside/{print}' "${file}")" |
227 | 531 | name_val "History List Len" $(awk '/History list length/{print $4}' "$1") | 540 | name_val "Oldest Transaction" "$(find_max_trx_time "${file}") Seconds"; |
228 | 532 | name_val "Read Views" $(awk '/read views open inside/{print $1}' "${1}") | 541 | name_val "History List Len" $(awk '/History list length/{print $4}' "${file}") |
229 | 533 | name_val "Undo Log Entries" "$(summarize_undo_log_entries "${1}")" | 542 | name_val "Read Views" $(awk '/read views open inside/{print $1}' "${file}") |
230 | 534 | name_val "Pending I/O Reads" "$(find_pending_io_reads "${1}")" | 543 | name_val "Undo Log Entries" "$(summarize_undo_log_entries "${file}")" |
231 | 535 | name_val "Pending I/O Writes" "$(find_pending_io_writes "${1}")" | 544 | name_val "Pending I/O Reads" "$(find_pending_io_reads "${file}")" |
232 | 536 | name_val "Pending I/O Flushes" "$(find_pending_io_flushes "${1}")" | 545 | name_val "Pending I/O Writes" "$(find_pending_io_writes "${file}")" |
233 | 537 | $AP_AWK -F, '/^---TRANSACTION/{print $2}' "${1}" \ | 546 | name_val "Pending I/O Flushes" "$(find_pending_io_flushes "${file}")" |
234 | 547 | $AP_AWK -F, '/^---TRANSACTION/{print $2}' "${file}" \ | ||
235 | 538 | | $AP_SED -e 's/ [0-9]* sec.*//' | sort | uniq -c > /tmp/percona-toolkit2 | 548 | | $AP_SED -e 's/ [0-9]* sec.*//' | sort | uniq -c > /tmp/percona-toolkit2 |
236 | 539 | name_val "Transaction States" "$(group_concat /tmp/percona-toolkit2)" | 549 | name_val "Transaction States" "$(group_concat /tmp/percona-toolkit2)" |
238 | 540 | if $AP_GREP 'TABLE LOCK table' "${1}" >/dev/null ; then | 550 | if $AP_GREP 'TABLE LOCK table' "${file}" >/dev/null ; then |
239 | 541 | echo "Tables Locked" | 551 | echo "Tables Locked" |
241 | 542 | $AP_AWK '/^TABLE LOCK table/{print $4}' "${1}" \ | 552 | $AP_AWK '/^TABLE LOCK table/{print $4}' "${file}" \ |
242 | 543 | | sort | uniq -c | sort -rn | 553 | | sort | uniq -c | sort -rn |
243 | 544 | fi | 554 | fi |
245 | 545 | if $AP_GREP 'has waited at' "${1}" > /dev/null ; then | 555 | if $AP_GREP 'has waited at' "${file}" > /dev/null ; then |
246 | 546 | echo "Semaphore Waits" | 556 | echo "Semaphore Waits" |
248 | 547 | $AP_GREP 'has waited at' "${1}" | cut -d' ' -f6-8 \ | 557 | $AP_GREP 'has waited at' "${file}" | cut -d' ' -f6-8 \ |
249 | 548 | | sort | uniq -c | sort -rn | 558 | | sort | uniq -c | sort -rn |
250 | 549 | fi | 559 | fi |
252 | 550 | if $AP_GREP 'reserved it in mode' "${1}" > /dev/null; then | 560 | if $AP_GREP 'reserved it in mode' "${file}" > /dev/null; then |
253 | 551 | echo "Semaphore Holders" | 561 | echo "Semaphore Holders" |
254 | 552 | $AP_AWK '/has reserved it in mode/{ | 562 | $AP_AWK '/has reserved it in mode/{ |
255 | 553 | print substr($0, 1 + index($0, "("), index($0, ")") - index($0, "(") - 1); | 563 | print substr($0, 1 + index($0, "("), index($0, ")") - index($0, "(") - 1); |
257 | 554 | }' "${1}" | sort | uniq -c | sort -rn | 564 | }' "${file}" | sort | uniq -c | sort -rn |
258 | 555 | fi | 565 | fi |
260 | 556 | if $AP_GREP -e 'Mutex at' -e 'lock on' "${1}" >/dev/null 2>&1; then | 566 | if $AP_GREP -e 'Mutex at' -e 'lock on' "${file}" >/dev/null 2>&1; then |
261 | 557 | echo "Mutexes/Locks Waited For" | 567 | echo "Mutexes/Locks Waited For" |
263 | 558 | $AP_GREP -e 'Mutex at' -e 'lock on' "${1}" | $AP_SED -e 's/^[XS]-//' -e 's/,.*$//' \ | 568 | $AP_GREP -e 'Mutex at' -e 'lock on' "${file}" | $AP_SED -e 's/^[XS]-//' -e 's/,.*$//' \ |
264 | 559 | | sort | uniq -c | sort -rn | 569 | | sort | uniq -c | sort -rn |
265 | 560 | fi | 570 | fi |
266 | 561 | } | 571 | } |
267 | @@ -564,6 +574,7 @@ | |||
268 | 564 | # tables, views, etc. $1 is the file name. $2 is the database name; if none, | 574 | # tables, views, etc. $1 is the file name. $2 is the database name; if none, |
269 | 565 | # then there should be multiple databases. | 575 | # then there should be multiple databases. |
270 | 566 | format_overall_db_stats () { | 576 | format_overall_db_stats () { |
271 | 577 | local file=$1 | ||
272 | 567 | echo | 578 | echo |
273 | 568 | # We keep counts of everything in an associative array keyed by db name, and | 579 | # We keep counts of everything in an associative array keyed by db name, and |
274 | 569 | # what it is. The num_dbs counter is to ensure sort order is consistent when | 580 | # what it is. The num_dbs counter is to ensure sort order is consistent when |
275 | @@ -622,7 +633,7 @@ | |||
276 | 622 | printf fmt, db, counts[db ",tables"], counts[db ",views"], counts[db ",sps"], counts[db ",trg"], counts[db ",func"], counts[db ",fk"], counts[db ",partn"]; | 633 | printf fmt, db, counts[db ",tables"], counts[db ",views"], counts[db ",sps"], counts[db ",trg"], counts[db ",func"], counts[db ",fk"], counts[db ",partn"]; |
277 | 623 | } | 634 | } |
278 | 624 | } | 635 | } |
280 | 625 | ' /tmp/percona-toolkit-mysqldump > /tmp/percona-toolkit | 636 | ' $file > /tmp/percona-toolkit |
281 | 626 | head -n2 /tmp/percona-toolkit | 637 | head -n2 /tmp/percona-toolkit |
282 | 627 | tail -n +3 /tmp/percona-toolkit | sort | 638 | tail -n +3 /tmp/percona-toolkit | sort |
283 | 628 | 639 | ||
284 | @@ -682,7 +693,7 @@ | |||
285 | 682 | print ""; | 693 | print ""; |
286 | 683 | } | 694 | } |
287 | 684 | } | 695 | } |
289 | 685 | ' /tmp/percona-toolkit-mysqldump > /tmp/percona-toolkit | 696 | ' $file > /tmp/percona-toolkit |
290 | 686 | head -n1 /tmp/percona-toolkit | 697 | head -n1 /tmp/percona-toolkit |
291 | 687 | tail -n +2 /tmp/percona-toolkit | sort | 698 | tail -n +2 /tmp/percona-toolkit | sort |
292 | 688 | 699 | ||
293 | @@ -755,7 +766,7 @@ | |||
294 | 755 | print ""; | 766 | print ""; |
295 | 756 | } | 767 | } |
296 | 757 | } | 768 | } |
298 | 758 | ' /tmp/percona-toolkit-mysqldump > /tmp/percona-toolkit | 769 | ' $file > /tmp/percona-toolkit |
299 | 759 | head -n1 /tmp/percona-toolkit | 770 | head -n1 /tmp/percona-toolkit |
300 | 760 | tail -n +2 /tmp/percona-toolkit | sort | 771 | tail -n +2 /tmp/percona-toolkit | sort |
301 | 761 | 772 | ||
302 | @@ -846,12 +857,11 @@ | |||
303 | 846 | print ""; | 857 | print ""; |
304 | 847 | } | 858 | } |
305 | 848 | } | 859 | } |
307 | 849 | ' /tmp/percona-toolkit-mysqldump > /tmp/percona-toolkit | 860 | ' $file > /tmp/percona-toolkit |
308 | 850 | hdr=$($AP_GREP -n Database /tmp/percona-toolkit | cut -d: -f1); | 861 | hdr=$($AP_GREP -n Database /tmp/percona-toolkit | cut -d: -f1); |
309 | 851 | head -n${hdr} /tmp/percona-toolkit | 862 | head -n${hdr} /tmp/percona-toolkit |
310 | 852 | tail -n +$((${hdr} + 1)) /tmp/percona-toolkit | sort | 863 | tail -n +$((${hdr} + 1)) /tmp/percona-toolkit | sort |
311 | 853 | echo | 864 | echo |
312 | 854 | |||
313 | 855 | } | 865 | } |
314 | 856 | 866 | ||
315 | 857 | # ############################################################################## | 867 | # ############################################################################## |
316 | @@ -878,7 +888,7 @@ | |||
317 | 878 | name_val "System time" "`date -u +'%F %T UTC'` (local TZ: `date +'%Z %z'`)" | 888 | name_val "System time" "`date -u +'%F %T UTC'` (local TZ: `date +'%Z %z'`)" |
318 | 879 | section Instances | 889 | section Instances |
319 | 880 | ps auxww 2>/dev/null | $AP_GREP mysqld > /tmp/percona-toolkit | 890 | ps auxww 2>/dev/null | $AP_GREP mysqld > /tmp/percona-toolkit |
321 | 881 | parse_mysqld_instances | 891 | parse_mysqld_instances /tmp/percona-toolkit |
322 | 882 | 892 | ||
323 | 883 | # ######################################################################## | 893 | # ######################################################################## |
324 | 884 | # Fetch some basic info so we can start | 894 | # Fetch some basic info so we can start |
325 | @@ -890,13 +900,13 @@ | |||
326 | 890 | exit 1 | 900 | exit 1 |
327 | 891 | fi | 901 | fi |
328 | 892 | user="$(cat /tmp/percona-toolkit)"; | 902 | user="$(cat /tmp/percona-toolkit)"; |
336 | 893 | mysql -ss -e 'SHOW /*!40100 GLOBAL*/ VARIABLES' "$@" > /tmp/percona-toolkit-mysql-variables | 903 | mysql "$@" -ss -e 'SHOW /*!40100 GLOBAL*/ VARIABLES' > /tmp/percona-toolkit-mysql-variables |
337 | 894 | mysql -ss -e 'SHOW /*!50000 GLOBAL*/ STATUS' "$@" > /tmp/percona-toolkit-mysql-status | 904 | mysql "$@" -ss -e 'SHOW /*!50000 GLOBAL*/ STATUS' > /tmp/percona-toolkit-mysql-status |
338 | 895 | mysql -ss -e 'SHOW DATABASES' "$@" > /tmp/percona-toolkit-mysql-databases 2>/dev/null | 905 | mysql "$@" -ss -e 'SHOW DATABASES' > /tmp/percona-toolkit-mysql-databases 2>/dev/null |
339 | 896 | mysql -ssE -e 'SHOW SLAVE STATUS' "$@" > /tmp/percona-toolkit-mysql-slave 2>/dev/null | 906 | mysql "$@" -ssE -e 'SHOW SLAVE STATUS' > /tmp/percona-toolkit-mysql-slave 2>/dev/null |
340 | 897 | mysql -ssE -e 'SHOW /*!50000 ENGINE*/ INNODB STATUS' "$@" > /tmp/percona-toolkit-innodb-status 2>/dev/null | 907 | mysql "$@" -ssE -e 'SHOW /*!50000 ENGINE*/ INNODB STATUS' > /tmp/percona-toolkit-innodb-status 2>/dev/null |
341 | 898 | mysql -ssE -e 'SHOW FULL PROCESSLIST' "$@" > /tmp/percona-toolkit-mysql-processlist 2>/dev/null | 908 | mysql "$@" -ssE -e 'SHOW FULL PROCESSLIST' > /tmp/percona-toolkit-mysql-processlist 2>/dev/null |
342 | 899 | now="$(mysql -ss -e 'SELECT NOW()' "$@")" | 909 | now="$(mysql "$@" -ss -e 'SELECT NOW()')" |
343 | 900 | port="$(get_var port)" | 910 | port="$(get_var port)" |
344 | 901 | 911 | ||
345 | 902 | # ######################################################################## | 912 | # ######################################################################## |
346 | @@ -909,9 +919,9 @@ | |||
347 | 909 | get_mysql_version | 919 | get_mysql_version |
348 | 910 | 920 | ||
349 | 911 | uptime="$(get_stat Uptime)" | 921 | uptime="$(get_stat Uptime)" |
351 | 912 | mysql -ss -e "SELECT LEFT(NOW() - INTERVAL ${uptime} SECOND, 16)" "$@" \ | 922 | mysql "$@" -ss -e "SELECT LEFT(NOW() - INTERVAL ${uptime} SECOND, 16)" \ |
352 | 913 | > /tmp/percona-toolkit | 923 | > /tmp/percona-toolkit |
354 | 914 | name_val Started "$(get_mysql_uptime)" | 924 | name_val Started "$(get_mysql_uptime /tmp/percona-toolkit)" |
355 | 915 | 925 | ||
356 | 916 | name_val Databases "$($AP_GREP -c . /tmp/percona-toolkit-mysql-databases)" | 926 | name_val Databases "$($AP_GREP -c . /tmp/percona-toolkit-mysql-databases)" |
357 | 917 | name_val Datadir "$(get_var datadir)" | 927 | name_val Datadir "$(get_var datadir)" |
358 | @@ -932,7 +942,7 @@ | |||
359 | 932 | # Processlist, sliced several different ways | 942 | # Processlist, sliced several different ways |
360 | 933 | # ######################################################################## | 943 | # ######################################################################## |
361 | 934 | section Processlist | 944 | section Processlist |
363 | 935 | summarize_processlist | 945 | summarize_processlist /tmp/percona-toolkit-mysql-processlist |
364 | 936 | 946 | ||
365 | 937 | # ######################################################################## | 947 | # ######################################################################## |
366 | 938 | # Queries and query plans | 948 | # Queries and query plans |
367 | @@ -940,7 +950,7 @@ | |||
368 | 940 | section "Status_Counters_(Wait_10_Seconds)" | 950 | section "Status_Counters_(Wait_10_Seconds)" |
369 | 941 | sleep 10 | 951 | sleep 10 |
370 | 942 | # TODO: gather this data in the same format as normal: stats, TS line | 952 | # TODO: gather this data in the same format as normal: stats, TS line |
372 | 943 | mysql -ss -e 'SHOW /*!50000 GLOBAL*/ STATUS' "$@" \ | 953 | mysql "$@" -ss -e 'SHOW /*!50000 GLOBAL*/ STATUS' \ |
373 | 944 | | join /tmp/percona-toolkit-mysql-status - > /tmp/percona-toolkit | 954 | | join /tmp/percona-toolkit-mysql-status - > /tmp/percona-toolkit |
374 | 945 | # Make a file with a list of things we want to omit because they aren't | 955 | # Make a file with a list of things we want to omit because they aren't |
375 | 946 | # counters, they are gauges (in RRDTool terminology). Gauges are shown | 956 | # counters, they are gauges (in RRDTool terminology). Gauges are shown |
376 | @@ -967,7 +977,7 @@ | |||
377 | 967 | do | 977 | do |
378 | 968 | echo "${var}" >> /tmp/percona-toolkit-noncounters | 978 | echo "${var}" >> /tmp/percona-toolkit-noncounters |
379 | 969 | done | 979 | done |
381 | 970 | format_status_variables | $AP_GREP -v -f /tmp/percona-toolkit-noncounters | 980 | format_status_variables /tmp/percona-toolkit | $AP_GREP -v -f /tmp/percona-toolkit-noncounters |
382 | 971 | 981 | ||
383 | 972 | # ######################################################################## | 982 | # ######################################################################## |
384 | 973 | # Table cache | 983 | # Table cache |
385 | @@ -1035,7 +1045,7 @@ | |||
386 | 1035 | # that option to mysqldump, because when mysqldump checks for them, it | 1045 | # that option to mysqldump, because when mysqldump checks for them, it |
387 | 1036 | # can take a long time, one table at a time. | 1046 | # can take a long time, one table at a time. |
388 | 1037 | triggers="--skip-triggers" | 1047 | triggers="--skip-triggers" |
390 | 1038 | trg=$(mysql -ss -e "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS" 2>/dev/null); | 1048 | trg=$(mysql "$@" -ss -e "SELECT COUNT(*) FROM INFORMATION_SCHEMA.TRIGGERS" 2>/dev/null); |
391 | 1039 | if [ "${res}" ]; then | 1049 | if [ "${res}" ]; then |
392 | 1040 | if [ "${res}" -gt 0 ]; then | 1050 | if [ "${res}" -gt 0 ]; then |
393 | 1041 | triggers="--triggers" | 1051 | triggers="--triggers" |
394 | @@ -1048,15 +1058,15 @@ | |||
395 | 1048 | echo "There are ${num_dbs} databases. Would you like to dump all, or just one?" | 1058 | echo "There are ${num_dbs} databases. Would you like to dump all, or just one?" |
396 | 1049 | echo -n "Type the name of the database, or press Enter to dump all of them. " | 1059 | echo -n "Type the name of the database, or press Enter to dump all of them. " |
397 | 1050 | read dbtodump | 1060 | read dbtodump |
399 | 1051 | mysqldump --no-data --skip-comments \ | 1061 | mysqldump "$@" --no-data --skip-comments \ |
400 | 1052 | --skip-add-locks --skip-add-drop-table --compact \ | 1062 | --skip-add-locks --skip-add-drop-table --compact \ |
401 | 1053 | --skip-lock-all-tables --skip-lock-tables --skip-set-charset \ | 1063 | --skip-lock-all-tables --skip-lock-tables --skip-set-charset \ |
403 | 1054 | ${trg_arg} "$@" ${dbtodump:---all-databases} > /tmp/percona-toolkit-mysqldump | 1064 | ${trg_arg} ${dbtodump:---all-databases} > /tmp/percona-toolkit-mysqldump |
404 | 1055 | # Test the result by checking the file, not by the exit status, because we | 1065 | # Test the result by checking the file, not by the exit status, because we |
405 | 1056 | # might get partway through and then die, and the info is worth analyzing | 1066 | # might get partway through and then die, and the info is worth analyzing |
406 | 1057 | # anyway. | 1067 | # anyway. |
407 | 1058 | if $AP_GREP 'CREATE TABLE' /tmp/percona-toolkit-mysqldump >/dev/null 2>&1; then | 1068 | if $AP_GREP 'CREATE TABLE' /tmp/percona-toolkit-mysqldump >/dev/null 2>&1; then |
409 | 1059 | format_overall_db_stats | 1069 | format_overall_db_stats /tmp/percona-toolkit-mysqldump |
410 | 1060 | else | 1070 | else |
411 | 1061 | echo "Skipping schema analysis due to apparent error in dump file" | 1071 | echo "Skipping schema analysis due to apparent error in dump file" |
412 | 1062 | rm -f /tmp/percona-toolkit-mysqldump | 1072 | rm -f /tmp/percona-toolkit-mysqldump |
413 | @@ -1189,8 +1199,8 @@ | |||
414 | 1189 | # Users & Security | 1199 | # Users & Security |
415 | 1190 | # ######################################################################## | 1200 | # ######################################################################## |
416 | 1191 | section Security | 1201 | section Security |
419 | 1192 | users="$(mysql -ss \ | 1202 | users="$(mysql "$@" -ss \ |
420 | 1193 | -e 'SELECT COUNT(*), SUM(user=""), SUM(password=""), SUM(password NOT LIKE "*%") FROM mysql.user' "$@" 2>/dev/null \ | 1203 | -e 'SELECT COUNT(*), SUM(user=""), SUM(password=""), SUM(password NOT LIKE "*%") FROM mysql.user' 2>/dev/null \ |
421 | 1194 | | $AP_AWK '{printf "%d users, %d anon, %d w/o pw, %d old pw\n", $1, $2, $3, $4}')" | 1204 | | $AP_AWK '{printf "%d users, %d anon, %d w/o pw, %d old pw\n", $1, $2, $3, $4}')" |
422 | 1195 | name_val Users "${users}" | 1205 | name_val Users "${users}" |
423 | 1196 | name_val "Old Passwords" $(get_var old_passwords) | 1206 | name_val "Old Passwords" $(get_var old_passwords) |
424 | @@ -1201,15 +1211,15 @@ | |||
425 | 1201 | section Binary_Logging | 1211 | section Binary_Logging |
426 | 1202 | binlog=$(get_var log_bin) | 1212 | binlog=$(get_var log_bin) |
427 | 1203 | if [ "${binlog}" ]; then | 1213 | if [ "${binlog}" ]; then |
430 | 1204 | mysql -ss -e 'SHOW MASTER LOGS' "$@" > /tmp/percona-toolkit 2>/dev/null | 1214 | mysql "$@" -ss -e 'SHOW MASTER LOGS' > /tmp/percona-toolkit 2>/dev/null |
431 | 1205 | summarize_binlogs | 1215 | summarize_binlogs /tmp/percona-toolkit |
432 | 1206 | format="$(get_var binlog_format)" | 1216 | format="$(get_var binlog_format)" |
433 | 1207 | name_val binlog_format "${format:-STATEMENT}" | 1217 | name_val binlog_format "${format:-STATEMENT}" |
434 | 1208 | name_val expire_logs_days $(get_var expire_logs_days) | 1218 | name_val expire_logs_days $(get_var expire_logs_days) |
435 | 1209 | name_val sync_binlog $(get_var sync_binlog) | 1219 | name_val sync_binlog $(get_var sync_binlog) |
436 | 1210 | name_val server_id $(get_var server_id) | 1220 | name_val server_id $(get_var server_id) |
439 | 1211 | mysql -ss -e 'SHOW MASTER STATUS' "$@" > /tmp/percona-toolkit 2>/dev/null | 1221 | mysql "$@" -ss -e 'SHOW MASTER STATUS' > /tmp/percona-toolkit 2>/dev/null |
440 | 1212 | format_binlog_filters | 1222 | format_binlog_filters /tmp/percona-toolkit |
441 | 1213 | fi | 1223 | fi |
442 | 1214 | 1224 | ||
443 | 1215 | # Replication: seconds behind, running, filters, skip_slave_start, skip_errors, | 1225 | # Replication: seconds behind, running, filters, skip_slave_start, skip_errors, |
444 | @@ -1243,7 +1253,7 @@ | |||
445 | 1243 | # ######################################################################## | 1253 | # ######################################################################## |
446 | 1244 | section Configuration_File | 1254 | section Configuration_File |
447 | 1245 | ps auxww 2>/dev/null | $AP_GREP mysqld > /tmp/percona-toolkit | 1255 | ps auxww 2>/dev/null | $AP_GREP mysqld > /tmp/percona-toolkit |
449 | 1246 | cnf_file=$(find_my_cnf_file ${port}); | 1256 | cnf_file=$(find_my_cnf_file /tmp/percona-toolkit ${port}); |
450 | 1247 | if [ ! -e "${cnf_file}" ]; then | 1257 | if [ ! -e "${cnf_file}" ]; then |
451 | 1248 | name_val "Config File" "Cannot autodetect, trying common locations" | 1258 | name_val "Config File" "Cannot autodetect, trying common locations" |
452 | 1249 | cnf_file="/etc/my.cnf"; | 1259 | cnf_file="/etc/my.cnf"; |
453 | @@ -1257,7 +1267,7 @@ | |||
454 | 1257 | if [ -e "${cnf_file}" ]; then | 1267 | if [ -e "${cnf_file}" ]; then |
455 | 1258 | name_val "Config File" "${cnf_file}" | 1268 | name_val "Config File" "${cnf_file}" |
456 | 1259 | cat "${cnf_file}" > /tmp/percona-toolkit | 1269 | cat "${cnf_file}" > /tmp/percona-toolkit |
458 | 1260 | pretty_print_cnf_file | 1270 | pretty_print_cnf_file /tmp/percona-toolkit |
459 | 1261 | else | 1271 | else |
460 | 1262 | name_val "Config File" "Cannot autodetect or find, giving up" | 1272 | name_val "Config File" "Cannot autodetect or find, giving up" |
461 | 1263 | fi | 1273 | fi |
462 | 1264 | 1274 | ||
463 | === modified file 'bin/pt-pmp' | |||
464 | --- bin/pt-pmp 2011-08-04 20:35:38 +0000 | |||
465 | +++ bin/pt-pmp 2011-08-19 17:39:24 +0000 | |||
466 | @@ -17,16 +17,17 @@ | |||
467 | 17 | # to aggregate, and the files to read. If maxlen=0, it means infinity. We have | 17 | # to aggregate, and the files to read. If maxlen=0, it means infinity. We have |
468 | 18 | # to pass the maxlen argument into this function to make maxlen testable. | 18 | # to pass the maxlen argument into this function to make maxlen testable. |
469 | 19 | aggregate_stacktrace() { | 19 | aggregate_stacktrace() { |
472 | 20 | maxlen="$1"; | 20 | local maxlen=$1; |
473 | 21 | cat > /tmp/percona-toolkit.awk <<EOF | 21 | shift |
474 | 22 | awk " | ||
475 | 22 | BEGIN { | 23 | BEGIN { |
477 | 23 | s = ""; | 24 | s = \"\"; |
478 | 24 | } | 25 | } |
479 | 25 | /^Thread/ { | 26 | /^Thread/ { |
481 | 26 | if ( s != "" ) { | 27 | if ( s != \"\" ) { |
482 | 27 | print s; | 28 | print s; |
483 | 28 | } | 29 | } |
485 | 29 | s = ""; | 30 | s = \"\"; |
486 | 30 | c = 0; | 31 | c = 0; |
487 | 31 | } | 32 | } |
488 | 32 | /^\#/ { | 33 | /^\#/ { |
489 | @@ -38,37 +39,37 @@ | |||
490 | 38 | targ = \$4; | 39 | targ = \$4; |
491 | 39 | } | 40 | } |
492 | 40 | if ( targ ~ /[<\\(]/ ) { | 41 | if ( targ ~ /[<\\(]/ ) { |
494 | 41 | targ = substr(\$0, index(\$0, " in ") + 4); | 42 | targ = substr(\$0, index(\$0, \" in \") + 4); |
495 | 42 | if ( targ ~ / from / ) { | 43 | if ( targ ~ / from / ) { |
497 | 43 | targ = substr(targ, 1, index(targ, " from ") - 1); | 44 | targ = substr(targ, 1, index(targ, \" from \") - 1); |
498 | 44 | } | 45 | } |
499 | 45 | if ( targ ~ / at / ) { | 46 | if ( targ ~ / at / ) { |
501 | 46 | targ = substr(targ, 1, index(targ, " at ") - 1); | 47 | targ = substr(targ, 1, index(targ, \" at \") - 1); |
502 | 47 | } | 48 | } |
503 | 48 | # Shorten C++ templates, e.g. in t/samples/stacktrace-004.txt | 49 | # Shorten C++ templates, e.g. in t/samples/stacktrace-004.txt |
504 | 49 | while ( targ ~ />::/ ) { | 50 | while ( targ ~ />::/ ) { |
506 | 50 | if ( 0 == gsub(/<[^<>]*>/, "", targ) ) { | 51 | if ( 0 == gsub(/<[^<>]*>/, \"\", targ) ) { |
507 | 51 | break; | 52 | break; |
508 | 52 | } | 53 | } |
509 | 53 | } | 54 | } |
510 | 54 | # Further shorten argument lists. | 55 | # Further shorten argument lists. |
511 | 55 | while ( targ ~ /\\(/ ) { | 56 | while ( targ ~ /\\(/ ) { |
513 | 56 | if ( 0 == gsub(/\\([^()]*\\)/, "", targ) ) { | 57 | if ( 0 == gsub(/\\([^()]*\\)/, \"\", targ) ) { |
514 | 57 | break; | 58 | break; |
515 | 58 | } | 59 | } |
516 | 59 | } | 60 | } |
517 | 60 | # Remove void and const decorators. | 61 | # Remove void and const decorators. |
520 | 61 | gsub(/ ?(void|const) ?/, "", targ); | 62 | gsub(/ ?(void|const) ?/, \"\", targ); |
521 | 62 | gsub(/ /, "", targ); | 63 | gsub(/ /, \"\", targ); |
522 | 63 | } | 64 | } |
523 | 64 | else if ( targ ~ /\\?\\?/ && \$2 ~ /[1-9]/ ) { | 65 | else if ( targ ~ /\\?\\?/ && \$2 ~ /[1-9]/ ) { |
524 | 65 | # Substitute ?? by the name of the library. | 66 | # Substitute ?? by the name of the library. |
525 | 66 | targ = \$NF; | 67 | targ = \$NF; |
526 | 67 | while ( targ ~ /\\// ) { | 68 | while ( targ ~ /\\// ) { |
528 | 68 | targ = substr(targ, index(targ, "/") + 1); | 69 | targ = substr(targ, index(targ, \"/\") + 1); |
529 | 69 | } | 70 | } |
532 | 70 | targ = substr(targ, 1, index(targ, ".") - 1); | 71 | targ = substr(targ, 1, index(targ, \".\") - 1); |
533 | 71 | targ = targ "::??"; | 72 | targ = targ \"::??\"; |
534 | 72 | } | 73 | } |
535 | 73 | } | 74 | } |
536 | 74 | else { | 75 | else { |
537 | @@ -76,14 +77,14 @@ | |||
538 | 76 | } | 77 | } |
539 | 77 | # get rid of long symbol names such as 'pthread_cond_wait@@GLIBC_2.3.2' | 78 | # get rid of long symbol names such as 'pthread_cond_wait@@GLIBC_2.3.2' |
540 | 78 | if ( targ ~ /@@/ ) { | 79 | if ( targ ~ /@@/ ) { |
542 | 79 | fname = substr(targ, 1, index(targ, "@@") - 1); | 80 | fname = substr(targ, 1, index(targ, \"@@\") - 1); |
543 | 80 | } | 81 | } |
544 | 81 | else { | 82 | else { |
545 | 82 | fname = targ; | 83 | fname = targ; |
546 | 83 | } | 84 | } |
547 | 84 | if ( ${maxlen:-0} == 0 || c < ${maxlen:-0} ) { | 85 | if ( ${maxlen:-0} == 0 || c < ${maxlen:-0} ) { |
550 | 85 | if (s != "" ) { | 86 | if (s != \"\" ) { |
551 | 86 | s = s "," fname; | 87 | s = s \",\" fname; |
552 | 87 | } | 88 | } |
553 | 88 | else { | 89 | else { |
554 | 89 | s = fname; | 90 | s = fname; |
555 | @@ -94,9 +95,7 @@ | |||
556 | 94 | END { | 95 | END { |
557 | 95 | print s | 96 | print s |
558 | 96 | } | 97 | } |
562 | 97 | EOF | 98 | " "$@" | sort | uniq -c | sort -r -n -k 1,1 |
560 | 98 | awk -f /tmp/percona-toolkit.awk "$2" | sort | uniq -c | sort -r -n -k 1,1 | ||
561 | 99 | rm -f /tmp/percona-toolkit | ||
563 | 100 | } | 99 | } |
564 | 101 | 100 | ||
565 | 102 | # The main program to run. | 101 | # The main program to run. |
566 | 103 | 102 | ||
567 | === modified file 'bin/pt-summary' | |||
568 | --- bin/pt-summary 2011-08-04 20:35:38 +0000 | |||
569 | +++ bin/pt-summary 2011-08-19 17:39:24 +0000 | |||
570 | @@ -136,13 +136,14 @@ | |||
571 | 136 | # Parse Linux's /proc/cpuinfo, which should be stored in /tmp/percona-toolkit. | 136 | # Parse Linux's /proc/cpuinfo, which should be stored in /tmp/percona-toolkit. |
572 | 137 | # ############################################################################## | 137 | # ############################################################################## |
573 | 138 | parse_proc_cpuinfo () { | 138 | parse_proc_cpuinfo () { |
574 | 139 | local file=$1 | ||
575 | 139 | # Physical processors are indicated by distinct 'physical id'. Virtual CPUs | 140 | # Physical processors are indicated by distinct 'physical id'. Virtual CPUs |
576 | 140 | # are indicated by paragraphs -- one per paragraph. We assume that all | 141 | # are indicated by paragraphs -- one per paragraph. We assume that all |
577 | 141 | # processors are identical, i.e. that there are not some processors with dual | 142 | # processors are identical, i.e. that there are not some processors with dual |
578 | 142 | # cores and some with quad cores. | 143 | # cores and some with quad cores. |
582 | 143 | virtual=$(grep -c ^processor /tmp/percona-toolkit); | 144 | virtual=$(grep -c ^processor $file); |
583 | 144 | physical=$(grep 'physical id' /tmp/percona-toolkit | sort -u | wc -l); | 145 | physical=$(grep 'physical id' $file | sort -u | wc -l); |
584 | 145 | cores=$(grep 'cpu cores' /tmp/percona-toolkit | head -n 1 | cut -d: -f2); | 146 | cores=$(grep 'cpu cores' $file | head -n 1 | cut -d: -f2); |
585 | 146 | 147 | ||
586 | 147 | # Older kernel won't have 'physical id' or 'cpu cores'. | 148 | # Older kernel won't have 'physical id' or 'cpu cores'. |
587 | 148 | if [ "${physical}" = "0" ]; then physical=${virtual}; fi | 149 | if [ "${physical}" = "0" ]; then physical=${virtual}; fi |
588 | @@ -155,17 +156,17 @@ | |||
589 | 155 | 156 | ||
590 | 156 | name_val "Processors" "physical = ${physical}, cores = ${cores}, virtual = ${virtual}, hyperthreading = ${htt}" | 157 | name_val "Processors" "physical = ${physical}, cores = ${cores}, virtual = ${virtual}, hyperthreading = ${htt}" |
591 | 157 | 158 | ||
603 | 158 | awk -F: '/cpu MHz/{print $2}' /tmp/percona-toolkit \ | 159 | awk -F: '/cpu MHz/{print $2}' $file \ |
604 | 159 | | sort | uniq -c > /tmp/percona-toolkit2 | 160 | | sort | uniq -c > "$file.unq" |
605 | 160 | name_val "Speeds" "$(group_concat /tmp/percona-toolkit2)" | 161 | name_val "Speeds" "$(group_concat "$file.unq")" |
606 | 161 | 162 | ||
607 | 162 | awk -F: '/model name/{print $2}' /tmp/percona-toolkit \ | 163 | awk -F: '/model name/{print $2}' $file \ |
608 | 163 | | sort | uniq -c > /tmp/percona-toolkit2 | 164 | | sort | uniq -c > "$file.unq" |
609 | 164 | name_val "Models" "$(group_concat /tmp/percona-toolkit2)" | 165 | name_val "Models" "$(group_concat "$file.unq")" |
610 | 165 | 166 | ||
611 | 166 | awk -F: '/cache size/{print $2}' /tmp/percona-toolkit \ | 167 | awk -F: '/cache size/{print $2}' $file \ |
612 | 167 | | sort | uniq -c > /tmp/percona-toolkit2 | 168 | | sort | uniq -c > "$file.unq" |
613 | 168 | name_val "Caches" "$(group_concat /tmp/percona-toolkit2)" | 169 | name_val "Caches" "$(group_concat "$file.unq")" |
614 | 169 | } | 170 | } |
615 | 170 | 171 | ||
616 | 171 | # ############################################################################## | 172 | # ############################################################################## |
617 | @@ -196,16 +197,18 @@ | |||
618 | 196 | # Parse the output of 'free -b' plus the contents of /proc/meminfo | 197 | # Parse the output of 'free -b' plus the contents of /proc/meminfo |
619 | 197 | # ############################################################################## | 198 | # ############################################################################## |
620 | 198 | parse_free_minus_b () { | 199 | parse_free_minus_b () { |
627 | 199 | physical=$(awk '/Mem:/{print $3}' "${1}") | 200 | local file=$1 |
628 | 200 | swap=$(awk '/Swap:/{print $3}' "${1}") | 201 | |
629 | 201 | virtual=$(shorten $(($physical + $swap))) | 202 | local physical=$(awk '/Mem:/{print $3}' "${file}") |
630 | 202 | 203 | local swap=$(awk '/Swap:/{print $3}' "${file}") | |
631 | 203 | name_val Total $(shorten $(awk '/Mem:/{print $2}' "${1}")) | 204 | local virtual=$(shorten $(($physical + $swap))) |
632 | 204 | name_val Free $(shorten $(awk '/Mem:/{print $4}' "${1}")) | 205 | |
633 | 206 | name_val Total $(shorten $(awk '/Mem:/{print $2}' "${file}")) | ||
634 | 207 | name_val Free $(shorten $(awk '/Mem:/{print $4}' "${file}")) | ||
635 | 205 | name_val Used "physical = $(shorten ${physical}), swap = $(shorten ${swap}), virtual = ${virtual}" | 208 | name_val Used "physical = $(shorten ${physical}), swap = $(shorten ${swap}), virtual = ${virtual}" |
639 | 206 | name_val Buffers $(shorten $(awk '/Mem:/{print $6}' "${1}")) | 209 | name_val Buffers $(shorten $(awk '/Mem:/{print $6}' "${file}")) |
640 | 207 | name_val Caches $(shorten $(awk '/Mem:/{print $7}' "${1}")) | 210 | name_val Caches $(shorten $(awk '/Mem:/{print $7}' "${file}")) |
641 | 208 | name_val Dirty "$(awk '/Dirty:/ {print $2, $3}' "${1}")" | 211 | name_val Dirty "$(awk '/Dirty:/ {print $2, $3}' "${file}")" |
642 | 209 | } | 212 | } |
643 | 210 | 213 | ||
644 | 211 | # ############################################################################## | 214 | # ############################################################################## |
645 | @@ -233,10 +236,10 @@ | |||
646 | 233 | } | 236 | } |
647 | 234 | 237 | ||
648 | 235 | # ############################################################################## | 238 | # ############################################################################## |
651 | 236 | # Parse memory devices from the output of 'dmidecode', which should be stored in | 239 | # Parse memory devices from the output of 'dmidecode'. |
650 | 237 | # /tmp/percona-toolkit. | ||
652 | 238 | # ############################################################################## | 240 | # ############################################################################## |
653 | 239 | parse_dmidecode_mem_devices () { | 241 | parse_dmidecode_mem_devices () { |
654 | 242 | local file=$1 | ||
655 | 240 | echo " Locator Size Speed Form Factor Type Type Detail" | 243 | echo " Locator Size Speed Form Factor Type Type Detail" |
656 | 241 | echo " ========= ======== ================= ============= ============= ===========" | 244 | echo " ========= ======== ================= ============= ============= ===========" |
657 | 242 | # Print paragraphs containing 'Memory Device\n', extract the desired bits, | 245 | # Print paragraphs containing 'Memory Device\n', extract the desired bits, |
658 | @@ -254,7 +257,7 @@ | |||
659 | 254 | -e 's/</{/g' \ | 257 | -e 's/</{/g' \ |
660 | 255 | -e 's/>/}/g' \ | 258 | -e 's/>/}/g' \ |
661 | 256 | -e 's/[ \t]*\n/\n/g' \ | 259 | -e 's/[ \t]*\n/\n/g' \ |
663 | 257 | /tmp/percona-toolkit \ | 260 | $file \ |
664 | 258 | | awk -F: '/Size|Type|Form.Factor|Type.Detail|[^ ]Locator/{printf("|%s", $2)}/Speed/{print "|" $2}' \ | 261 | | awk -F: '/Size|Type|Form.Factor|Type.Detail|[^ ]Locator/{printf("|%s", $2)}/Speed/{print "|" $2}' \ |
665 | 259 | | sed -e 's/No Module Installed/{EMPTY}/' \ | 262 | | sed -e 's/No Module Installed/{EMPTY}/' \ |
666 | 260 | | sort \ | 263 | | sort \ |
667 | @@ -292,10 +295,11 @@ | |||
668 | 292 | # Parse the output of 'netstat -antp' which should be in /tmp/percona-toolkit. | 295 | # Parse the output of 'netstat -antp' which should be in /tmp/percona-toolkit. |
669 | 293 | # ############################################################################## | 296 | # ############################################################################## |
670 | 294 | parse_netstat () { | 297 | parse_netstat () { |
671 | 298 | local file=$1 | ||
672 | 295 | echo " Connections from remote IP addresses" | 299 | echo " Connections from remote IP addresses" |
673 | 296 | awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ { | 300 | awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ { |
674 | 297 | print substr($5, 0, index($5, ":") - 1); | 301 | print substr($5, 0, index($5, ":") - 1); |
676 | 298 | }' /tmp/percona-toolkit | sort | uniq -c \ | 302 | }' $file | sort | uniq -c \ |
677 | 299 | | awk "{ | 303 | | awk "{ |
678 | 300 | fuzzy_var=\$1; | 304 | fuzzy_var=\$1; |
679 | 301 | ${fuzzy_formula} | 305 | ${fuzzy_formula} |
680 | @@ -305,7 +309,7 @@ | |||
681 | 305 | echo " Connections to local IP addresses" | 309 | echo " Connections to local IP addresses" |
682 | 306 | awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ { | 310 | awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ { |
683 | 307 | print substr($4, 0, index($4, ":") - 1); | 311 | print substr($4, 0, index($4, ":") - 1); |
685 | 308 | }' /tmp/percona-toolkit | sort | uniq -c \ | 312 | }' $file | sort | uniq -c \ |
686 | 309 | | awk "{ | 313 | | awk "{ |
687 | 310 | fuzzy_var=\$1; | 314 | fuzzy_var=\$1; |
688 | 311 | ${fuzzy_formula} | 315 | ${fuzzy_formula} |
689 | @@ -315,7 +319,7 @@ | |||
690 | 315 | echo " Connections to top 10 local ports" | 319 | echo " Connections to top 10 local ports" |
691 | 316 | awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ { | 320 | awk '$1 ~ /^tcp/ && $5 ~ /^[1-9]/ { |
692 | 317 | print substr($4, index($4, ":") + 1); | 321 | print substr($4, index($4, ":") + 1); |
694 | 318 | }' /tmp/percona-toolkit | sort | uniq -c | sort -rn | head -n10 \ | 322 | }' $file | sort | uniq -c | sort -rn | head -n10 \ |
695 | 319 | | awk "{ | 323 | | awk "{ |
696 | 320 | fuzzy_var=\$1; | 324 | fuzzy_var=\$1; |
697 | 321 | ${fuzzy_formula} | 325 | ${fuzzy_formula} |
698 | @@ -324,7 +328,7 @@ | |||
699 | 324 | echo " States of connections" | 328 | echo " States of connections" |
700 | 325 | awk '$1 ~ /^tcp/ { | 329 | awk '$1 ~ /^tcp/ { |
701 | 326 | print $6; | 330 | print $6; |
703 | 327 | }' /tmp/percona-toolkit | sort | uniq -c | sort -rn \ | 331 | }' $file | sort | uniq -c | sort -rn \ |
704 | 328 | | awk "{ | 332 | | awk "{ |
705 | 329 | fuzzy_var=\$1; | 333 | fuzzy_var=\$1; |
706 | 330 | ${fuzzy_formula} | 334 | ${fuzzy_formula} |
707 | @@ -341,7 +345,10 @@ | |||
708 | 341 | # requires two passes through the file. The first pass finds the max size of | 345 | # requires two passes through the file. The first pass finds the max size of |
709 | 342 | # these columns and prints out a printf spec, and the second prints out the | 346 | # these columns and prints out a printf spec, and the second prints out the |
710 | 343 | # file nicely aligned. | 347 | # file nicely aligned. |
712 | 344 | cat > /tmp/pt-summary.awk <<-EOF | 348 | local file=$1 |
713 | 349 | local platform=$2 | ||
714 | 350 | |||
715 | 351 | local spec=$(awk " | ||
716 | 345 | BEGIN { | 352 | BEGIN { |
717 | 346 | device = 10; | 353 | device = 10; |
718 | 347 | fstype = 4; | 354 | fstype = 4; |
719 | @@ -351,9 +358,9 @@ | |||
720 | 351 | f_device = \$1; | 358 | f_device = \$1; |
721 | 352 | f_fstype = \$10; | 359 | f_fstype = \$10; |
722 | 353 | f_options = substr(\$11, 2, length(\$11) - 2); | 360 | f_options = substr(\$11, 2, length(\$11) - 2); |
724 | 354 | if ( "$2" == "FreeBSD" ) { | 361 | if ( \"$2\" == \"FreeBSD\" ) { |
725 | 355 | f_fstype = substr(\$9, 2, length(\$9) - 2); | 362 | f_fstype = substr(\$9, 2, length(\$9) - 2); |
727 | 356 | f_options = substr(\$0, index(\$0, ",") + 2); | 363 | f_options = substr(\$0, index(\$0, \",\") + 2); |
728 | 357 | f_options = substr(f_options, 1, length(f_options) - 1); | 364 | f_options = substr(f_options, 1, length(f_options) - 1); |
729 | 358 | } | 365 | } |
730 | 359 | if ( length(f_device) > device ) { | 366 | if ( length(f_device) > device ) { |
731 | @@ -367,30 +374,26 @@ | |||
732 | 367 | } | 374 | } |
733 | 368 | } | 375 | } |
734 | 369 | END{ | 376 | END{ |
736 | 370 | print "%-" device "s %5s %4s %-" fstype "s %-" options "s %s"; | 377 | print \"%-\" device \"s %5s %4s %-\" fstype \"s %-\" options \"s %s\"; |
737 | 371 | } | 378 | } |
742 | 372 | EOF | 379 | " $file) |
739 | 373 | spec="$( awk -f /tmp/pt-summary.awk "$1" )"; | ||
740 | 374 | #awk -f /tmp/pt-summary.awk "$1" | ||
741 | 375 | #return; | ||
743 | 376 | 380 | ||
745 | 377 | cat > /tmp/pt-summary.awk <<-EOF | 381 | awk " |
746 | 378 | BEGIN { | 382 | BEGIN { |
749 | 379 | spec=" ${spec}\\n"; | 383 | spec=\" ${spec}\\n\"; |
750 | 380 | printf spec, "Filesystem", "Size", "Used", "Type", "Opts", "Mountpoint"; | 384 | printf spec, \"Filesystem\", \"Size\", \"Used\", \"Type\", \"Opts\", \"Mountpoint\"; |
751 | 381 | } | 385 | } |
752 | 382 | { | 386 | { |
753 | 383 | f_fstype = \$10; | 387 | f_fstype = \$10; |
754 | 384 | f_options = substr(\$11, 2, length(\$11) - 2); | 388 | f_options = substr(\$11, 2, length(\$11) - 2); |
756 | 385 | if ( "$2" == "FreeBSD" ) { | 389 | if ( \"$2\" == \"FreeBSD\" ) { |
757 | 386 | f_fstype = substr(\$9, 2, length(\$9) - 2); | 390 | f_fstype = substr(\$9, 2, length(\$9) - 2); |
759 | 387 | f_options = substr(\$0, index(\$0, ",") + 2); | 391 | f_options = substr(\$0, index(\$0, \",\") + 2); |
760 | 388 | f_options = substr(f_options, 1, length(f_options) - 1); | 392 | f_options = substr(f_options, 1, length(f_options) - 1); |
761 | 389 | } | 393 | } |
762 | 390 | printf spec, \$1, \$2, \$5, f_fstype, f_options, \$6; | 394 | printf spec, \$1, \$2, \$5, f_fstype, f_options, \$6; |
763 | 391 | } | 395 | } |
766 | 392 | EOF | 396 | " $file |
765 | 393 | awk -f /tmp/pt-summary.awk "$1" | ||
767 | 394 | } | 397 | } |
768 | 395 | 398 | ||
769 | 396 | # ############################################################################## | 399 | # ############################################################################## |
770 | @@ -398,6 +401,7 @@ | |||
771 | 398 | # multiple fdisk -l outputs in the file. | 401 | # multiple fdisk -l outputs in the file. |
772 | 399 | # ############################################################################## | 402 | # ############################################################################## |
773 | 400 | parse_fdisk () { | 403 | parse_fdisk () { |
774 | 404 | local file=$1 | ||
775 | 401 | awk ' | 405 | awk ' |
776 | 402 | BEGIN { | 406 | BEGIN { |
777 | 403 | format="%-12s %4s %10s %10s %18s\n"; | 407 | format="%-12s %4s %10s %10s %18s\n"; |
778 | @@ -423,7 +427,7 @@ | |||
779 | 423 | } | 427 | } |
780 | 424 | printf(format, $1, "Part", start, end, sprintf("%.0f", (end - start) * units)); | 428 | printf(format, $1, "Part", start, end, sprintf("%.0f", (end - start) * units)); |
781 | 425 | } | 429 | } |
783 | 426 | ' /tmp/percona-toolkit | 430 | ' $file |
784 | 427 | } | 431 | } |
785 | 428 | 432 | ||
786 | 429 | # ############################################################################## | 433 | # ############################################################################## |
787 | @@ -431,17 +435,18 @@ | |||
788 | 431 | # virtualization. | 435 | # virtualization. |
789 | 432 | # ############################################################################## | 436 | # ############################################################################## |
790 | 433 | parse_virtualization_dmesg () { | 437 | parse_virtualization_dmesg () { |
792 | 434 | if grep -qi -e vmware -e vmxnet -e 'paravirtualized kernel on vmi' /tmp/percona-toolkit; then | 438 | local file=$1 |
793 | 439 | if grep -qi -e vmware -e vmxnet -e 'paravirtualized kernel on vmi' $file; then | ||
794 | 435 | echo "VMWare"; | 440 | echo "VMWare"; |
796 | 436 | elif grep -qi -e 'paravirtualized kernel on xen' -e 'Xen virtual console' /tmp/percona-toolkit; then | 441 | elif grep -qi -e 'paravirtualized kernel on xen' -e 'Xen virtual console' $file; then |
797 | 437 | echo "Xen"; | 442 | echo "Xen"; |
799 | 438 | elif grep -qi qemu /tmp/percona-toolkit; then | 443 | elif grep -qi qemu $file; then |
800 | 439 | echo "QEmu"; | 444 | echo "QEmu"; |
802 | 440 | elif grep -qi 'paravirtualized kernel on KVM' /tmp/percona-toolkit; then | 445 | elif grep -qi 'paravirtualized kernel on KVM' $file; then |
803 | 441 | echo "KVM"; | 446 | echo "KVM"; |
805 | 442 | elif grep -q VBOX /tmp/percona-toolkit; then | 447 | elif grep -q VBOX $file; then |
806 | 443 | echo "VirtualBox"; | 448 | echo "VirtualBox"; |
808 | 444 | elif grep -qi 'hd.: Virtual .., ATA.*drive' /tmp/percona-toolkit; then | 449 | elif grep -qi 'hd.: Virtual .., ATA.*drive' $file; then |
809 | 445 | echo "Microsoft VirtualPC"; | 450 | echo "Microsoft VirtualPC"; |
810 | 446 | fi | 451 | fi |
811 | 447 | } | 452 | } |
812 | @@ -462,7 +467,8 @@ | |||
813 | 462 | # Ethernet cards. | 467 | # Ethernet cards. |
814 | 463 | # ############################################################################## | 468 | # ############################################################################## |
815 | 464 | parse_ethernet_controller_lspci () { | 469 | parse_ethernet_controller_lspci () { |
817 | 465 | grep -i ethernet /tmp/percona-toolkit | cut -d: -f3 | while read line; do | 470 | local file=$1 |
818 | 471 | grep -i ethernet $file | cut -d: -f3 | while read line; do | ||
819 | 466 | name_val Controller "${line}" | 472 | name_val Controller "${line}" |
820 | 467 | done | 473 | done |
821 | 468 | } | 474 | } |
822 | @@ -472,20 +478,21 @@ | |||
823 | 472 | # controllers. | 478 | # controllers. |
824 | 473 | # ############################################################################## | 479 | # ############################################################################## |
825 | 474 | parse_raid_controller_lspci () { | 480 | parse_raid_controller_lspci () { |
827 | 475 | if grep -q "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS" /tmp/percona-toolkit; then | 481 | local file=$1 |
828 | 482 | if grep -q "RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS" $file; then | ||
829 | 476 | echo 'LSI Logic MegaRAID SAS' | 483 | echo 'LSI Logic MegaRAID SAS' |
831 | 477 | elif grep -q "Fusion-MPT SAS" /tmp/percona-toolkit; then | 484 | elif grep -q "Fusion-MPT SAS" $file; then |
832 | 478 | echo 'Fusion-MPT SAS' | 485 | echo 'Fusion-MPT SAS' |
834 | 479 | elif grep -q "RAID bus controller: LSI Logic / Symbios Logic Unknown" /tmp/percona-toolkit; then | 486 | elif grep -q "RAID bus controller: LSI Logic / Symbios Logic Unknown" $file; then |
835 | 480 | echo 'LSI Logic Unknown' | 487 | echo 'LSI Logic Unknown' |
837 | 481 | elif grep -q "RAID bus controller: Adaptec AAC-RAID" /tmp/percona-toolkit; then | 488 | elif grep -q "RAID bus controller: Adaptec AAC-RAID" $file; then |
838 | 482 | echo 'AACRAID' | 489 | echo 'AACRAID' |
840 | 483 | elif grep -q "3ware [0-9]* Storage Controller" /tmp/percona-toolkit; then | 490 | elif grep -q "3ware [0-9]* Storage Controller" $file; then |
841 | 484 | echo '3Ware' | 491 | echo '3Ware' |
843 | 485 | elif grep -q "Hewlett-Packard Company Smart Array" /tmp/percona-toolkit; then | 492 | elif grep -q "Hewlett-Packard Company Smart Array" $file; then |
844 | 486 | echo 'HP Smart Array' | 493 | echo 'HP Smart Array' |
847 | 487 | elif grep -q " RAID bus controller: " /tmp/percona-toolkit; then | 494 | elif grep -q " RAID bus controller: " $file; then |
848 | 488 | awk -F: '/RAID bus controller\:/ {print $3" "$5" "$6}' /tmp/percona-toolkit | 495 | awk -F: '/RAID bus controller\:/ {print $3" "$5" "$6}' $file |
849 | 489 | fi | 496 | fi |
850 | 490 | } | 497 | } |
851 | 491 | 498 | ||
852 | @@ -494,14 +501,15 @@ | |||
853 | 494 | # controllers. | 501 | # controllers. |
854 | 495 | # ############################################################################## | 502 | # ############################################################################## |
855 | 496 | parse_raid_controller_dmesg () { | 503 | parse_raid_controller_dmesg () { |
856 | 504 | local file=$1 | ||
857 | 497 | pat='scsi[0-9].*: .*' | 505 | pat='scsi[0-9].*: .*' |
859 | 498 | if grep -qi "${pat}megaraid" /tmp/percona-toolkit; then | 506 | if grep -qi "${pat}megaraid" $file; then |
860 | 499 | echo 'LSI Logic MegaRAID SAS' | 507 | echo 'LSI Logic MegaRAID SAS' |
862 | 500 | elif grep -q "Fusion MPT SAS" /tmp/percona-toolkit; then | 508 | elif grep -q "Fusion MPT SAS" $file; then |
863 | 501 | echo 'Fusion-MPT SAS' | 509 | echo 'Fusion-MPT SAS' |
865 | 502 | elif grep -q "${pat}aacraid" /tmp/percona-toolkit; then | 510 | elif grep -q "${pat}aacraid" $file; then |
866 | 503 | echo 'AACRAID' | 511 | echo 'AACRAID' |
868 | 504 | elif grep -q "${pat}3ware [0-9]* Storage Controller" /tmp/percona-toolkit; then | 512 | elif grep -q "${pat}3ware [0-9]* Storage Controller" $file; then |
869 | 505 | echo '3Ware' | 513 | echo '3Ware' |
870 | 506 | fi | 514 | fi |
871 | 507 | } | 515 | } |
872 | @@ -511,20 +519,22 @@ | |||
873 | 511 | # /tmp/percona-toolkit | 519 | # /tmp/percona-toolkit |
874 | 512 | # ############################################################################## | 520 | # ############################################################################## |
875 | 513 | parse_hpacucli () { | 521 | parse_hpacucli () { |
877 | 514 | grep 'logicaldrive\|physicaldrive' /tmp/percona-toolkit | 522 | local file=$1 |
878 | 523 | grep 'logicaldrive\|physicaldrive' $file | ||
879 | 515 | } | 524 | } |
880 | 516 | 525 | ||
881 | 517 | # ############################################################################## | 526 | # ############################################################################## |
882 | 518 | # Parse the output of arcconf, which should be stored in /tmp/percona-toolkit | 527 | # Parse the output of arcconf, which should be stored in /tmp/percona-toolkit |
883 | 519 | # ############################################################################## | 528 | # ############################################################################## |
884 | 520 | parse_arcconf () { | 529 | parse_arcconf () { |
889 | 521 | model=$(awk -F: '/Controller Model/{print $2}' /tmp/percona-toolkit) | 530 | local file=$1 |
890 | 522 | chan="$(awk -F: '/Channel description/{print $2}' /tmp/percona-toolkit)" | 531 | model=$(awk -F: '/Controller Model/{print $2}' $file) |
891 | 523 | cache="$(awk -F: '/Installed memory/{print $2}' /tmp/percona-toolkit)" | 532 | chan="$(awk -F: '/Channel description/{print $2}' $file)" |
892 | 524 | status="$(awk -F: '/Controller Status/{print $2}' /tmp/percona-toolkit)" | 533 | cache="$(awk -F: '/Installed memory/{print $2}' $file)" |
893 | 534 | status="$(awk -F: '/Controller Status/{print $2}' $file)" | ||
894 | 525 | name_val Specs "${model/ /},${chan},${cache} cache,${status}" | 535 | name_val Specs "${model/ /},${chan},${cache} cache,${status}" |
895 | 526 | 536 | ||
897 | 527 | battery=$(grep -A5 'Controller Battery Info' /tmp/percona-toolkit \ | 537 | battery=$(grep -A5 'Controller Battery Info' $file \ |
898 | 528 | | awk '/Capacity remaining/ {c=$4} | 538 | | awk '/Capacity remaining/ {c=$4} |
899 | 529 | /Status/ {s=$3} | 539 | /Status/ {s=$3} |
900 | 530 | /Time remaining/ {t=sprintf("%dd%dh%dm", $7, $9, $11)} | 540 | /Time remaining/ {t=sprintf("%dd%dh%dm", $7, $9, $11)} |
901 | @@ -537,9 +547,8 @@ | |||
902 | 537 | echo | 547 | echo |
903 | 538 | echo " LogicalDev Size RAID Disks Stripe Status Cache" | 548 | echo " LogicalDev Size RAID Disks Stripe Status Cache" |
904 | 539 | echo " ========== ========= ==== ===== ====== ======= =======" | 549 | echo " ========== ========= ==== ===== ====== ======= =======" |
908 | 540 | for dev in $(awk '/Logical device number/{print $4}' /tmp/percona-toolkit); do | 550 | for dev in $(awk '/Logical device number/{print $4}' $file); do |
909 | 541 | sed -n -e "/^Logical device .* ${dev}$/,/^$\|^Logical device number/p" \ | 551 | sed -n -e "/^Logical device .* ${dev}$/,/^$\|^Logical device number/p" $file \ |
907 | 542 | /tmp/percona-toolkit \ | ||
910 | 543 | | awk ' | 552 | | awk ' |
911 | 544 | /Logical device name/ {d=$5} | 553 | /Logical device name/ {d=$5} |
912 | 545 | /Size/ {z=$3 " " $4} | 554 | /Size/ {z=$3 " " $4} |
913 | @@ -565,7 +574,7 @@ | |||
914 | 565 | 574 | ||
915 | 566 | # Find the paragraph with physical devices, tabularize with assoc arrays. | 575 | # Find the paragraph with physical devices, tabularize with assoc arrays. |
916 | 567 | tempresult="" | 576 | tempresult="" |
918 | 568 | sed -n -e '/Physical Device information/,/^$/p' /tmp/percona-toolkit \ | 577 | sed -n -e '/Physical Device information/,/^$/p' $file \ |
919 | 569 | | awk -F: ' | 578 | | awk -F: ' |
920 | 570 | /Device #[0-9]/ { | 579 | /Device #[0-9]/ { |
921 | 571 | device=substr($0, index($0, "#")); | 580 | device=substr($0, index($0, "#")); |
922 | @@ -612,32 +621,33 @@ | |||
923 | 612 | } | 621 | } |
924 | 613 | } | 622 | } |
925 | 614 | }' | 623 | }' |
926 | 615 | |||
927 | 616 | } | 624 | } |
928 | 617 | 625 | ||
929 | 618 | # ############################################################################## | 626 | # ############################################################################## |
931 | 619 | # Parse the output of "lsiutil -i -s" from /tmp/percona-toolkit | 627 | # Parse the output of "lsiutil -i -s". |
932 | 620 | # ############################################################################## | 628 | # ############################################################################## |
933 | 621 | parse_fusionmpt_lsiutil () { | 629 | parse_fusionmpt_lsiutil () { |
934 | 630 | local file=$1 | ||
935 | 622 | echo | 631 | echo |
938 | 623 | awk '/LSI.*Firmware/ { print " ", $0 }' /tmp/percona-toolkit | 632 | awk '/LSI.*Firmware/ { print " ", $0 }' $file |
939 | 624 | grep . /tmp/percona-toolkit | sed -n -e '/B___T___L/,$ {s/^/ /; p}' | 633 | grep . $file | sed -n -e '/B___T___L/,$ {s/^/ /; p}' |
940 | 625 | } | 634 | } |
941 | 626 | 635 | ||
942 | 627 | # ############################################################################## | 636 | # ############################################################################## |
943 | 628 | # Parse the output of MegaCli64 -AdpAllInfo -aALL from /tmp/percona-toolkit. | 637 | # Parse the output of MegaCli64 -AdpAllInfo -aALL from /tmp/percona-toolkit. |
944 | 629 | # ############################################################################## | 638 | # ############################################################################## |
945 | 630 | parse_lsi_megaraid_adapter_info () { | 639 | parse_lsi_megaraid_adapter_info () { |
956 | 631 | name=$(awk -F: '/Product Name/{print substr($2, 2)}' /tmp/percona-toolkit); | 640 | local file=$1 |
957 | 632 | int=$(awk '/Host Interface/{print $4}' /tmp/percona-toolkit); | 641 | name=$(awk -F: '/Product Name/{print substr($2, 2)}' $file); |
958 | 633 | prt=$(awk '/Number of Backend Port/{print $5}' /tmp/percona-toolkit); | 642 | int=$(awk '/Host Interface/{print $4}' $file); |
959 | 634 | bbu=$(awk '/^BBU :/{print $3}' /tmp/percona-toolkit); | 643 | prt=$(awk '/Number of Backend Port/{print $5}' $file); |
960 | 635 | mem=$(awk '/Memory Size/{print $4}' /tmp/percona-toolkit); | 644 | bbu=$(awk '/^BBU :/{print $3}' $file); |
961 | 636 | vdr=$(awk '/Virtual Drives/{print $4}' /tmp/percona-toolkit); | 645 | mem=$(awk '/Memory Size/{print $4}' $file); |
962 | 637 | dvd=$(awk '/Degraded/{print $3}' /tmp/percona-toolkit); | 646 | vdr=$(awk '/Virtual Drives/{print $4}' $file); |
963 | 638 | phy=$(awk '/^ Disks/{print $3}' /tmp/percona-toolkit); | 647 | dvd=$(awk '/Degraded/{print $3}' $file); |
964 | 639 | crd=$(awk '/Critical Disks/{print $4}' /tmp/percona-toolkit); | 648 | phy=$(awk '/^ Disks/{print $3}' $file); |
965 | 640 | fad=$(awk '/Failed Disks/{print $4}' /tmp/percona-toolkit); | 649 | crd=$(awk '/Critical Disks/{print $4}' $file); |
966 | 650 | fad=$(awk '/Failed Disks/{print $4}' $file); | ||
967 | 641 | name_val Model "${name}, ${int} interface, ${prt} ports" | 651 | name_val Model "${name}, ${int} interface, ${prt} ports" |
968 | 642 | name_val Cache "${mem} Memory, BBU ${bbu}" | 652 | name_val Cache "${mem} Memory, BBU ${bbu}" |
969 | 643 | } | 653 | } |
970 | @@ -647,9 +657,10 @@ | |||
971 | 647 | # /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL | 657 | # /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |
972 | 648 | # ############################################################################## | 658 | # ############################################################################## |
973 | 649 | parse_lsi_megaraid_bbu_status () { | 659 | parse_lsi_megaraid_bbu_status () { |
977 | 650 | charge=$(awk '/Relative State/{print $5}' /tmp/percona-toolkit); | 660 | local file=$1 |
978 | 651 | temp=$(awk '/^Temperature/{print $2}' /tmp/percona-toolkit); | 661 | charge=$(awk '/Relative State/{print $5}' $file); |
979 | 652 | soh=$(awk '/isSOHGood:/{print $2}' /tmp/percona-toolkit); | 662 | temp=$(awk '/^Temperature/{print $2}' $file); |
980 | 663 | soh=$(awk '/isSOHGood:/{print $2}' $file); | ||
981 | 653 | name_val BBU "${charge}% Charged, Temperature ${temp}C, isSOHGood=${soh}" | 664 | name_val BBU "${charge}% Charged, Temperature ${temp}C, isSOHGood=${soh}" |
982 | 654 | } | 665 | } |
983 | 655 | 666 | ||
984 | @@ -660,11 +671,12 @@ | |||
985 | 660 | # /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL | 671 | # /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL |
986 | 661 | # ############################################################################## | 672 | # ############################################################################## |
987 | 662 | parse_lsi_megaraid_devices () { | 673 | parse_lsi_megaraid_devices () { |
988 | 674 | local file=$1 | ||
989 | 663 | echo | 675 | echo |
990 | 664 | echo " PhysiclDev Type State Errors Vendor Model Size" | 676 | echo " PhysiclDev Type State Errors Vendor Model Size" |
991 | 665 | echo " ========== ==== ======= ====== ======= ============ ===========" | 677 | echo " ========== ==== ======= ====== ======= ============ ===========" |
994 | 666 | for dev in $(awk '/Device Id/{print $3}' /tmp/percona-toolkit); do | 678 | for dev in $(awk '/Device Id/{print $3}' $file); do |
995 | 667 | sed -e '/./{H;$!d;}' -e "x;/Device Id: ${dev}/!d;" /tmp/percona-toolkit \ | 679 | sed -e '/./{H;$!d;}' -e "x;/Device Id: ${dev}/!d;" $file \ |
996 | 668 | | awk ' | 680 | | awk ' |
997 | 669 | /Media Type/ {d=substr($0, index($0, ":") + 2)} | 681 | /Media Type/ {d=substr($0, index($0, ":") + 2)} |
998 | 670 | /PD Type/ {t=$3} | 682 | /PD Type/ {t=$3} |
999 | @@ -688,6 +700,7 @@ | |||
1000 | 688 | # /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll | 700 | # /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll |
1001 | 689 | # ############################################################################## | 701 | # ############################################################################## |
1002 | 690 | parse_lsi_megaraid_virtual_devices () { | 702 | parse_lsi_megaraid_virtual_devices () { |
1003 | 703 | local file=$1 | ||
1004 | 691 | # Somewhere on the Internet, I found the following guide to understanding the | 704 | # Somewhere on the Internet, I found the following guide to understanding the |
1005 | 692 | # RAID level, but I don't know the source anymore. | 705 | # RAID level, but I don't know the source anymore. |
1006 | 693 | # Primary-0, Secondary-0, RAID Level Qualifier-0 = 0 | 706 | # Primary-0, Secondary-0, RAID Level Qualifier-0 = 0 |
1007 | @@ -758,7 +771,7 @@ | |||
1008 | 758 | devices[device ",stripe"], devices[device ",state"], | 771 | devices[device ",stripe"], devices[device ",state"], |
1009 | 759 | devices[device ",wpolicy"] ", " devices[device ",rpolicy"]); | 772 | devices[device ",wpolicy"] ", " devices[device ",rpolicy"]); |
1010 | 760 | } | 773 | } |
1012 | 761 | }' /tmp/percona-toolkit | 774 | }' $file |
1013 | 762 | } | 775 | } |
1014 | 763 | 776 | ||
1015 | 764 | # ############################################################################## | 777 | # ############################################################################## |
1016 | @@ -766,15 +779,16 @@ | |||
1017 | 766 | # system activity is enough. | 779 | # system activity is enough. |
1018 | 767 | # ############################################################################## | 780 | # ############################################################################## |
1019 | 768 | format_vmstat () { | 781 | format_vmstat () { |
1021 | 769 | cat > /tmp/pt-summary.awk <<-EOF | 782 | local file=$1 |
1022 | 783 | awk " | ||
1023 | 770 | BEGIN { | 784 | BEGIN { |
1025 | 771 | format = " %2s %2s %4s %4s %5s %5s %6s %6s %3s %3s %3s %3s %3s\n"; | 785 | format = \" %2s %2s %4s %4s %5s %5s %6s %6s %3s %3s %3s %3s %3s\n\"; |
1026 | 772 | } | 786 | } |
1027 | 773 | /procs/ { | 787 | /procs/ { |
1029 | 774 | print " procs ---swap-- -----io---- ---system---- --------cpu--------"; | 788 | print \" procs ---swap-- -----io---- ---system---- --------cpu--------\"; |
1030 | 775 | } | 789 | } |
1031 | 776 | /bo/ { | 790 | /bo/ { |
1033 | 777 | printf format, "r", "b", "si", "so", "bi", "bo", "ir", "cs", "us", "sy", "il", "wa", "st"; | 791 | printf format, \"r\", \"b\", \"si\", \"so\", \"bi\", \"bo\", \"ir\", \"cs\", \"us\", \"sy\", \"il\", \"wa\", \"st\"; |
1034 | 778 | } | 792 | } |
1035 | 779 | \$0 !~ /r/ { | 793 | \$0 !~ /r/ { |
1036 | 780 | fuzzy_var = \$1; ${fuzzy_formula} r = fuzzy_var; | 794 | fuzzy_var = \$1; ${fuzzy_formula} r = fuzzy_var; |
1037 | @@ -792,9 +806,8 @@ | |||
1038 | 792 | fuzzy_var = \$17; st = fuzzy_var; | 806 | fuzzy_var = \$17; st = fuzzy_var; |
1039 | 793 | printf format, r, b, si, so, bi, bo, ir, cs, us, sy, il, wa, st; | 807 | printf format, r, b, si, so, bi, bo, ir, cs, us, sy, il, wa, st; |
1040 | 794 | } | 808 | } |
1044 | 795 | EOF | 809 | " $file |
1045 | 796 | awk -f /tmp/pt-summary.awk /tmp/percona-toolkit | 810 | } |
1043 | 797 | } | ||
1046 | 798 | 811 | ||
1047 | 799 | # ############################################################################## | 812 | # ############################################################################## |
1048 | 800 | # The main() function is called at the end of the script. This makes it | 813 | # The main() function is called at the end of the script. This makes it |
1049 | @@ -931,7 +944,7 @@ | |||
1050 | 931 | dmesg > /tmp/percona-toolkit 2>/dev/null | 944 | dmesg > /tmp/percona-toolkit 2>/dev/null |
1051 | 932 | fi | 945 | fi |
1052 | 933 | if [ -s /tmp/percona-toolkit ]; then | 946 | if [ -s /tmp/percona-toolkit ]; then |
1054 | 934 | virt="$(parse_virtualization_dmesg)" | 947 | virt="$(parse_virtualization_dmesg /tmp/percona-toolkit)" |
1055 | 935 | fi | 948 | fi |
1056 | 936 | if [ -z "${virt}" ]; then | 949 | if [ -z "${virt}" ]; then |
1057 | 937 | if which lspci >/dev/null 2>&1; then | 950 | if which lspci >/dev/null 2>&1; then |
1058 | @@ -963,7 +976,7 @@ | |||
1059 | 963 | section Processor | 976 | section Processor |
1060 | 964 | if [ -f /proc/cpuinfo ]; then | 977 | if [ -f /proc/cpuinfo ]; then |
1061 | 965 | cat /proc/cpuinfo > /tmp/percona-toolkit 2>/dev/null | 978 | cat /proc/cpuinfo > /tmp/percona-toolkit 2>/dev/null |
1063 | 966 | parse_proc_cpuinfo | 979 | parse_proc_cpuinfo /tmp/percona-toolkit |
1064 | 967 | elif [ "${platform}" = "FreeBSD" ]; then | 980 | elif [ "${platform}" = "FreeBSD" ]; then |
1065 | 968 | parse_sysctl_cpu_freebsd /tmp/percona-toolkit.sysctl | 981 | parse_sysctl_cpu_freebsd /tmp/percona-toolkit.sysctl |
1066 | 969 | elif [ "${platform}" = "SunOS" ]; then | 982 | elif [ "${platform}" = "SunOS" ]; then |
1067 | @@ -995,7 +1008,7 @@ | |||
1068 | 995 | fi | 1008 | fi |
1069 | 996 | 1009 | ||
1070 | 997 | if which dmidecode >/dev/null 2>&1 && dmidecode > /tmp/percona-toolkit 2>/dev/null; then | 1010 | if which dmidecode >/dev/null 2>&1 && dmidecode > /tmp/percona-toolkit 2>/dev/null; then |
1072 | 998 | parse_dmidecode_mem_devices | 1011 | parse_dmidecode_mem_devices /tmp/percona-toolkit |
1073 | 999 | fi | 1012 | fi |
1074 | 1000 | 1013 | ||
1075 | 1001 | # ######################################################################## | 1014 | # ######################################################################## |
1076 | @@ -1028,7 +1041,7 @@ | |||
1077 | 1028 | 1041 | ||
1078 | 1029 | # Relies on /tmp/percona-toolkit having data from the Disk Schedulers loop. | 1042 | # Relies on /tmp/percona-toolkit having data from the Disk Schedulers loop. |
1079 | 1030 | section "Disk_Partioning" | 1043 | section "Disk_Partioning" |
1081 | 1031 | parse_fdisk | 1044 | parse_fdisk /tmp/percona-toolkit |
1082 | 1032 | 1045 | ||
1083 | 1033 | section "Kernel_Inode_State" | 1046 | section "Kernel_Inode_State" |
1084 | 1034 | for file in dentry-state file-nr inode-nr; do | 1047 | for file in dentry-state file-nr inode-nr; do |
1085 | @@ -1052,14 +1065,14 @@ | |||
1086 | 1052 | # /var/log/dmesg if possible. | 1065 | # /var/log/dmesg if possible. |
1087 | 1053 | # ######################################################################## | 1066 | # ######################################################################## |
1088 | 1054 | if which lspci >/dev/null 2>&1 && lspci > /tmp/percona-toolkit 2>/dev/null; then | 1067 | if which lspci >/dev/null 2>&1 && lspci > /tmp/percona-toolkit 2>/dev/null; then |
1090 | 1055 | controller="$(parse_raid_controller_lspci)" | 1068 | controller="$(parse_raid_controller_lspci /tmp/percona-toolkit)" |
1091 | 1056 | fi | 1069 | fi |
1092 | 1057 | if [ -z "${controller}" ]; then | 1070 | if [ -z "${controller}" ]; then |
1093 | 1058 | cat /var/log/dmesg > /tmp/percona-toolkit 2>/dev/null | 1071 | cat /var/log/dmesg > /tmp/percona-toolkit 2>/dev/null |
1094 | 1059 | if [ ! -s /tmp/percona-toolkit ]; then | 1072 | if [ ! -s /tmp/percona-toolkit ]; then |
1095 | 1060 | dmesg > /tmp/percona-toolkit 2>/dev/null | 1073 | dmesg > /tmp/percona-toolkit 2>/dev/null |
1096 | 1061 | fi | 1074 | fi |
1098 | 1062 | controller="$(parse_raid_controller_dmesg)" | 1075 | controller="$(parse_raid_controller_dmesg /tmp/percona-toolkit)" |
1099 | 1063 | fi | 1076 | fi |
1100 | 1064 | 1077 | ||
1101 | 1065 | name_val Controller "${controller:-No RAID controller detected}" | 1078 | name_val Controller "${controller:-No RAID controller detected}" |
1102 | @@ -1073,28 +1086,28 @@ | |||
1103 | 1073 | notfound="" | 1086 | notfound="" |
1104 | 1074 | if [ "${controller}" = "AACRAID" ]; then | 1087 | if [ "${controller}" = "AACRAID" ]; then |
1105 | 1075 | if arcconf getconfig 1 > /tmp/percona-toolkit 2>/dev/null; then | 1088 | if arcconf getconfig 1 > /tmp/percona-toolkit 2>/dev/null; then |
1107 | 1076 | parse_arcconf | 1089 | parse_arcconf /tmp/percona-toolkit |
1108 | 1077 | elif ! which arcconf >/dev/null 2>&1; then | 1090 | elif ! which arcconf >/dev/null 2>&1; then |
1109 | 1078 | notfound="e.g. http://www.adaptec.com/en-US/support/raid/scsi_raid/ASR-2120S/" | 1091 | notfound="e.g. http://www.adaptec.com/en-US/support/raid/scsi_raid/ASR-2120S/" |
1110 | 1079 | fi | 1092 | fi |
1111 | 1080 | elif [ "${controller}" = "HP Smart Array" ]; then | 1093 | elif [ "${controller}" = "HP Smart Array" ]; then |
1112 | 1081 | if hpacucli ctrl all show config > /tmp/percona-toolkit 2>/dev/null; then | 1094 | if hpacucli ctrl all show config > /tmp/percona-toolkit 2>/dev/null; then |
1114 | 1082 | parse_hpacucli | 1095 | parse_hpacucli /tmp/percona-toolkit |
1115 | 1083 | elif ! which hpacucli >/dev/null 2>&1; then | 1096 | elif ! which hpacucli >/dev/null 2>&1; then |
1116 | 1084 | notfound="your package repository or the manufacturer's website" | 1097 | notfound="your package repository or the manufacturer's website" |
1117 | 1085 | fi | 1098 | fi |
1118 | 1086 | elif [ "${controller}" = "LSI Logic MegaRAID SAS" ]; then | 1099 | elif [ "${controller}" = "LSI Logic MegaRAID SAS" ]; then |
1119 | 1087 | if MegaCli64 -AdpAllInfo -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then | 1100 | if MegaCli64 -AdpAllInfo -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then |
1121 | 1088 | parse_lsi_megaraid_adapter_info | 1101 | parse_lsi_megaraid_adapter_info /tmp/percona-toolkit |
1122 | 1089 | elif ! which MegaCli64 >/dev/null 2>&1; then | 1102 | elif ! which MegaCli64 >/dev/null 2>&1; then |
1123 | 1090 | notfound="your package repository or the manufacturer's website" | 1103 | notfound="your package repository or the manufacturer's website" |
1124 | 1091 | fi | 1104 | fi |
1125 | 1092 | if MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then | 1105 | if MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then |
1127 | 1093 | parse_lsi_megaraid_bbu_status | 1106 | parse_lsi_megaraid_bbu_status /tmp/percona-toolkit |
1128 | 1094 | fi | 1107 | fi |
1129 | 1095 | if MegaCli64 -LdPdInfo -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then | 1108 | if MegaCli64 -LdPdInfo -aALL -NoLog > /tmp/percona-toolkit 2>/dev/null; then |
1132 | 1096 | parse_lsi_megaraid_virtual_devices | 1109 | parse_lsi_megaraid_virtual_devices /tmp/percona-toolkit |
1133 | 1097 | parse_lsi_megaraid_devices | 1110 | parse_lsi_megaraid_devices /tmp/percona-toolkit |
1134 | 1098 | fi | 1111 | fi |
1135 | 1099 | fi | 1112 | fi |
1136 | 1100 | 1113 | ||
1137 | @@ -1110,7 +1123,7 @@ | |||
1138 | 1110 | if [ "${platform}" = "Linux" ]; then | 1123 | if [ "${platform}" = "Linux" ]; then |
1139 | 1111 | section Network_Config | 1124 | section Network_Config |
1140 | 1112 | if which lspci > /dev/null 2>&1 && lspci > /tmp/percona-toolkit 2>/dev/null; then | 1125 | if which lspci > /dev/null 2>&1 && lspci > /tmp/percona-toolkit 2>/dev/null; then |
1142 | 1113 | parse_ethernet_controller_lspci | 1126 | parse_ethernet_controller_lspci /tmp/percona-toolkit |
1143 | 1114 | fi | 1127 | fi |
1144 | 1115 | if sysctl net.ipv4.tcp_fin_timeout > /dev/null 2>&1; then | 1128 | if sysctl net.ipv4.tcp_fin_timeout > /dev/null 2>&1; then |
1145 | 1116 | name_val "FIN Timeout" "$(sysctl net.ipv4.tcp_fin_timeout)" | 1129 | name_val "FIN Timeout" "$(sysctl net.ipv4.tcp_fin_timeout)" |
1146 | @@ -1130,7 +1143,7 @@ | |||
1147 | 1130 | if [ "${platform}" = "Linux" ]; then | 1143 | if [ "${platform}" = "Linux" ]; then |
1148 | 1131 | section Network_Connections | 1144 | section Network_Connections |
1149 | 1132 | if netstat -antp > /tmp/percona-toolkit 2>/dev/null; then | 1145 | if netstat -antp > /tmp/percona-toolkit 2>/dev/null; then |
1151 | 1133 | parse_netstat | 1146 | parse_netstat /tmp/percona-toolkit |
1152 | 1134 | fi | 1147 | fi |
1153 | 1135 | fi | 1148 | fi |
1154 | 1136 | fi | 1149 | fi |
1155 | @@ -1153,7 +1166,7 @@ | |||
1156 | 1153 | section "Simplified_and_fuzzy_rounded_vmstat_(wait_please)" | 1166 | section "Simplified_and_fuzzy_rounded_vmstat_(wait_please)" |
1157 | 1154 | vmstat 1 5 > /tmp/percona-toolkit | 1167 | vmstat 1 5 > /tmp/percona-toolkit |
1158 | 1155 | if [ "${platform}" = "Linux" ]; then | 1168 | if [ "${platform}" = "Linux" ]; then |
1160 | 1156 | format_vmstat | 1169 | format_vmstat /tmp/percona-toolkit |
1161 | 1157 | else | 1170 | else |
1162 | 1158 | # TODO: simplify/format for other platforms | 1171 | # TODO: simplify/format for other platforms |
1163 | 1159 | cat /tmp/percona-toolkit | 1172 | cat /tmp/percona-toolkit |
1164 | 1160 | 1173 | ||
1165 | === removed file 't/pt-diskstats/group-by-all-01' | |||
1166 | --- t/pt-diskstats/group-by-all-01 2011-07-01 16:29:50 +0000 | |||
1167 | +++ t/pt-diskstats/group-by-all-01 1970-01-01 00:00:00 +0000 | |||
1168 | @@ -1,41 +0,0 @@ | |||
1169 | 1 | #!/bin/bash | ||
1170 | 2 | #group_by_all samples/diskstats-001.txt | ||
1171 | 3 | |||
1172 | 4 | cat <<EOF > $1 | ||
1173 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1174 | 6 | 2.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1175 | 7 | 2.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 23.0 53.2 0.6 85% 0.0 0.9 0% 0 | ||
1176 | 8 | 2.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1177 | 9 | 2.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 23.0 53.2 0.6 85% 0.0 0.9 0% 0 | ||
1178 | 10 | 2.0 cciss/c0d1 466.5 44.6 10.2 0% 11.2 23.9 985.0 47.5 22.8 0% 0.1 0.1 92% 18 | ||
1179 | 11 | 2.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1180 | 12 | 2.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 153.0 8.0 0.6 0% 0.1 0.8 0% 0 | ||
1181 | 13 | 2.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1182 | 14 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1183 | 15 | 4.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1184 | 16 | 4.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 16.0 35.5 0.3 77% 0.0 0.4 0% 0 | ||
1185 | 17 | 4.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1186 | 18 | 4.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 16.0 35.5 0.3 77% 0.0 0.4 0% 0 | ||
1187 | 19 | 4.0 cciss/c0d1 373.0 47.2 8.6 0% 10.2 27.4 560.0 46.2 12.6 0% 0.1 0.1 91% 17 | ||
1188 | 20 | 4.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1189 | 21 | 4.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1190 | 22 | 4.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1191 | 23 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1192 | 24 | 5.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1193 | 25 | 5.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 4.0 62.0 0.1 87% 0.0 0.0 0% 0 | ||
1194 | 26 | 5.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1195 | 27 | 5.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 4.0 62.0 0.1 87% 0.0 0.0 0% 0 | ||
1196 | 28 | 5.0 cciss/c0d1 848.0 42.6 17.7 0% 21.6 25.5 1979.0 49.7 48.0 0% 0.2 0.1 178% 9 | ||
1197 | 29 | 5.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1198 | 30 | 5.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1199 | 31 | 5.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1200 | 32 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1201 | 33 | 7.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1202 | 34 | 7.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 21.0 74.7 0.8 89% 0.0 0.5 0% 0 | ||
1203 | 35 | 7.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1204 | 36 | 7.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 21.0 74.7 0.8 89% 0.0 0.5 0% 0 | ||
1205 | 37 | 7.0 cciss/c0d1 340.0 36.6 6.1 0% 8.1 23.8 913.0 49.4 22.0 0% 0.1 0.1 86% 5 | ||
1206 | 38 | 7.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1207 | 39 | 7.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 194.5 8.0 0.8 0% 0.1 0.6 0% 0 | ||
1208 | 40 | 7.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1209 | 41 | EOF | ||
1210 | 42 | 0 | ||
1211 | === removed file 't/pt-diskstats/group-by-disk-01' | |||
1212 | --- t/pt-diskstats/group-by-disk-01 2011-07-01 16:29:50 +0000 | |||
1213 | +++ t/pt-diskstats/group-by-disk-01 1970-01-01 00:00:00 +0000 | |||
1214 | @@ -1,14 +0,0 @@ | |||
1215 | 1 | #!/bin/bash | ||
1216 | 2 | #group_by_disk samples/diskstats-001.txt | ||
1217 | 3 | |||
1218 | 4 | cat <<EOF > $1 | ||
1219 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1220 | 6 | {4} ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1221 | 7 | {4} cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 17.7 56.2 0.5 86% 0.0 0.6 0% 0 | ||
1222 | 8 | {4} cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1223 | 9 | {4} cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 17.7 56.2 0.5 86% 0.0 0.6 0% 0 | ||
1224 | 10 | {4} cciss/c0d1 458.1 43.0 9.6 0% 11.5 25.1 985.0 48.4 23.3 0% 0.1 0.1 102% 0 | ||
1225 | 11 | {4} cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1226 | 12 | {4} dm-0 0.0 0.0 0.0 0% 0.0 0.0 99.3 8.0 0.4 0% 0.1 0.7 0% 0 | ||
1227 | 13 | {4} md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1228 | 14 | EOF | ||
1229 | 15 | 0 | ||
1230 | === removed file 't/pt-diskstats/group-by-disk-02' | |||
1231 | --- t/pt-diskstats/group-by-disk-02 2011-07-01 16:29:50 +0000 | |||
1232 | +++ t/pt-diskstats/group-by-disk-02 1970-01-01 00:00:00 +0000 | |||
1233 | @@ -1,8 +0,0 @@ | |||
1234 | 1 | #!/bin/bash | ||
1235 | 2 | #group_by_disk samples/diskstats-005.txt | ||
1236 | 3 | |||
1237 | 4 | cat <<EOF > $1 | ||
1238 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1239 | 6 | {5} sda3 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1240 | 7 | {5} sda4 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1241 | 8 | EOF | ||
1242 | 9 | 0 | ||
1243 | === removed file 't/pt-diskstats/group-by-disk-03' | |||
1244 | --- t/pt-diskstats/group-by-disk-03 2011-07-01 16:29:50 +0000 | |||
1245 | +++ t/pt-diskstats/group-by-disk-03 1970-01-01 00:00:00 +0000 | |||
1246 | @@ -1,13 +0,0 @@ | |||
1247 | 1 | #!/bin/bash | ||
1248 | 2 | #group_by_disk /tmp/aspersa | ||
1249 | 3 | |||
1250 | 4 | cat <<EOF > $1 | ||
1251 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1252 | 6 | {5} sda3 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1253 | 7 | {5} sda4 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1254 | 8 | EOF | ||
1255 | 9 | |||
1256 | 10 | cat > $2 <<EOF | ||
1257 | 11 | TS 1298130002.073935000 | ||
1258 | 12 | EOF | ||
1259 | 13 | cat >>$2 samples/diskstats-005.txt | ||
1260 | 14 | 0 | ||
1261 | === removed file 't/pt-diskstats/group-by-disk-04' | |||
1262 | --- t/pt-diskstats/group-by-disk-04 2011-07-01 16:29:50 +0000 | |||
1263 | +++ t/pt-diskstats/group-by-disk-04 1970-01-01 00:00:00 +0000 | |||
1264 | @@ -1,11 +0,0 @@ | |||
1265 | 1 | #!/bin/bash | ||
1266 | 2 | #group_by_disk /tmp/aspersa | ||
1267 | 3 | |||
1268 | 4 | cat <<EOF > $1 | ||
1269 | 5 | EOF | ||
1270 | 6 | |||
1271 | 7 | cat <<EOF > $2 | ||
1272 | 8 | TS 1297205887.156653000 | ||
1273 | 9 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 | ||
1274 | 10 | TS 1297205888.161613000 | ||
1275 | 11 | EOF | ||
1276 | 12 | 0 | ||
1277 | === removed file 't/pt-diskstats/group-by-disk-05' | |||
1278 | --- t/pt-diskstats/group-by-disk-05 2011-07-01 16:29:50 +0000 | |||
1279 | +++ t/pt-diskstats/group-by-disk-05 1970-01-01 00:00:00 +0000 | |||
1280 | @@ -1,14 +0,0 @@ | |||
1281 | 1 | #!/bin/bash | ||
1282 | 2 | #group_by_disk /tmp/aspersa | ||
1283 | 3 | |||
1284 | 4 | cat <<EOF > $1 | ||
1285 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1286 | 6 | {1} ram0 1.0 1.0 0.0 50% 0.0 1.0 1.0 1.0 0.0 50% 0.0 1.0 0% 0 | ||
1287 | 7 | EOF | ||
1288 | 8 | |||
1289 | 9 | cat <<EOF > $2 | ||
1290 | 10 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 | ||
1291 | 11 | TS 1297205887.156653000 | ||
1292 | 12 | 1 0 ram0 1 1 1 1 1 1 1 1 1 1 1 | ||
1293 | 13 | TS 1297205888.161613000 | ||
1294 | 14 | EOF | ||
1295 | 15 | 0 | ||
1296 | === removed file 't/pt-diskstats/group-by-sample-01' | |||
1297 | --- t/pt-diskstats/group-by-sample-01 2011-07-01 16:29:50 +0000 | |||
1298 | +++ t/pt-diskstats/group-by-sample-01 1970-01-01 00:00:00 +0000 | |||
1299 | @@ -1,10 +0,0 @@ | |||
1300 | 1 | #!/bin/bash | ||
1301 | 2 | #group_by_sample samples/diskstats-001.txt | ||
1302 | 3 | |||
1303 | 4 | cat <<EOF > $1 | ||
1304 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1305 | 6 | 2.0 {8} 466.5 44.6 10.2 0% 1.4 23.9 1184.0 42.6 24.6 18% 0.0 0.2 12% 18 | ||
1306 | 7 | 4.0 {8} 373.0 47.2 8.6 0% 1.3 27.4 592.0 45.6 13.2 16% 0.0 0.1 11% 17 | ||
1307 | 8 | 5.0 {8} 848.0 42.6 17.7 0% 2.7 25.5 1987.0 49.8 48.3 3% 0.0 0.1 22% 9 | ||
1308 | 9 | 7.0 {8} 340.0 36.6 6.1 0% 1.0 23.8 1149.5 43.4 24.3 23% 0.0 0.2 11% 5 | ||
1309 | 10 | EOF | ||
1310 | 11 | 0 | ||
1311 | === removed file 't/pt-diskstats/group-by-sample-02' | |||
1312 | --- t/pt-diskstats/group-by-sample-02 2011-07-01 16:29:50 +0000 | |||
1313 | +++ t/pt-diskstats/group-by-sample-02 1970-01-01 00:00:00 +0000 | |||
1314 | @@ -1,34 +0,0 @@ | |||
1315 | 1 | #!/bin/bash | ||
1316 | 2 | #group_by_sample /tmp/aspersa | ||
1317 | 3 | |||
1318 | 4 | cat <<EOF > $1 | ||
1319 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1320 | 6 | 1.0 sda3 1406.0 32.0 21.9 1% 0.6 0.4 46.3 61.1 1.4 67% 0.0 0.3 41% 0 | ||
1321 | 7 | 2.0 sda3 1580.1 31.9 24.6 1% 0.6 0.4 163.7 62.2 5.0 36% 0.1 0.3 46% 1 | ||
1322 | 8 | 3.0 sda3 1296.7 32.0 20.2 1% 0.5 0.4 51.3 50.5 1.3 62% 0.0 0.3 42% 1 | ||
1323 | 9 | 4.1 sda3 1429.7 32.0 22.3 1% 0.5 0.3 73.9 61.0 2.2 57% 0.0 0.3 40% 0 | ||
1324 | 10 | 5.1 sda3 1258.1 32.0 19.6 1% 0.4 0.3 158.7 68.8 5.3 36% 0.1 0.4 37% 0 | ||
1325 | 11 | EOF | ||
1326 | 12 | |||
1327 | 13 | cat > $2 <<EOF | ||
1328 | 14 | 8 3 sda3 4257315954 34043324 136169413346 1922644483 492348396 547079617 32764474048 248191881 0 1348454960 2169768832 | ||
1329 | 15 | TS 1298130003.073935000 | ||
1330 | 16 | 8 3 sda3 4257317380 34043342 136169458914 1922645044 492348443 547079711 32764476920 248191896 0 1348455373 2169769408 | ||
1331 | 17 | TS 1298130004.088149000 | ||
1332 | 18 | 8 3 sda3 4257318982 34043364 136169510082 1922645662 492348609 547079803 32764487248 248191947 1 1348455841 2169770075 | ||
1333 | 19 | TS 1298130005.102035000 | ||
1334 | 20 | 8 3 sda3 4257320297 34043384 136169552098 1922646173 492348661 547079889 32764489872 248191964 1 1348456262 2169770603 | ||
1335 | 21 | TS 1298130006.116158000 | ||
1336 | 22 | 8 3 sda3 4257321748 34043394 136169598530 1922646672 492348736 547079990 32764494448 248191983 0 1348456671 2169771121 | ||
1337 | 23 | TS 1298130007.131062000 | ||
1338 | 24 | 8 3 sda3 4257323024 34043406 136169639330 1922647105 492348897 547080080 32764505520 248192043 0 1348457045 2169771613 | ||
1339 | 25 | TS 1298130008.145277000 | ||
1340 | 26 | EOF | ||
1341 | 27 | |||
1342 | 28 | # The below is incremental samples of the data and timestamps: | ||
1343 | 29 | # TS_diff reads reads_mrg read_sectors ms_reading writes write_mrg wrt_sectors ms_wrting i ms_ding_io ms_weightd | ||
1344 | 30 | # 1.14214000 1426 18 45568 561 47 94 2872 15 0 413 576 | ||
1345 | 31 | # 1.13886000 1602 22 51168 618 166 92 10328 51 1 468 667 | ||
1346 | 32 | # 1.14123000 1315 20 42016 511 52 86 2624 17 1 421 528 | ||
1347 | 33 | # 1.14904000 1451 10 46432 499 75 101 4576 19 0 409 518 | ||
1348 | 34 | # 1.14215000 1276 12 40800 433 161 90 11072 60 0 374 492 | ||
1349 | 35 | 0 | ||
1350 | === removed file 't/pt-diskstats/group-by-sample-03' | |||
1351 | --- t/pt-diskstats/group-by-sample-03 2011-07-01 16:29:50 +0000 | |||
1352 | +++ t/pt-diskstats/group-by-sample-03 1970-01-01 00:00:00 +0000 | |||
1353 | @@ -1,11 +0,0 @@ | |||
1354 | 1 | #!/bin/bash | ||
1355 | 2 | #group_by_sample samples/diskstats-005.txt | ||
1356 | 3 | |||
1357 | 4 | cat <<EOF > $1 | ||
1358 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1359 | 6 | 1.0 {2} 2812.0 32.0 43.9 1% 0.6 0.4 92.7 61.1 2.8 67% 0.0 0.3 41% 0 | ||
1360 | 7 | 2.0 {2} 3160.1 31.9 49.3 1% 0.6 0.4 327.5 62.2 9.9 36% 0.1 0.3 46% 2 | ||
1361 | 8 | 3.0 {2} 2593.4 32.0 40.5 1% 0.5 0.4 102.6 50.5 2.5 62% 0.0 0.3 42% 2 | ||
1362 | 9 | 4.1 {2} 2859.4 32.0 44.7 1% 0.5 0.3 147.8 61.0 4.4 57% 0.0 0.3 40% 0 | ||
1363 | 10 | 5.1 {2} 2516.2 32.0 39.3 1% 0.4 0.3 317.5 68.8 10.7 36% 0.1 0.4 37% 0 | ||
1364 | 11 | EOF | ||
1365 | 12 | 0 | ||
1366 | === removed file 't/pt-diskstats/group-by-sample-04' | |||
1367 | --- t/pt-diskstats/group-by-sample-04 2011-07-01 16:29:50 +0000 | |||
1368 | +++ t/pt-diskstats/group-by-sample-04 1970-01-01 00:00:00 +0000 | |||
1369 | @@ -1,16 +0,0 @@ | |||
1370 | 1 | #!/bin/bash | ||
1371 | 2 | #group_by_sample /tmp/aspersa | ||
1372 | 3 | |||
1373 | 4 | cat <<EOF > $1 | ||
1374 | 5 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1375 | 6 | 1.0 {2} 2812.0 32.0 43.9 1% 0.6 0.4 92.7 61.1 2.8 67% 0.0 0.3 41% 0 | ||
1376 | 7 | 2.0 {2} 3160.1 31.9 49.3 1% 0.6 0.4 327.5 62.2 9.9 36% 0.1 0.3 46% 2 | ||
1377 | 8 | 3.0 {2} 2593.4 32.0 40.5 1% 0.5 0.4 102.6 50.5 2.5 62% 0.0 0.3 42% 2 | ||
1378 | 9 | 4.1 {2} 2859.4 32.0 44.7 1% 0.5 0.3 147.8 61.0 4.4 57% 0.0 0.3 40% 0 | ||
1379 | 10 | 5.1 {2} 2516.2 32.0 39.3 1% 0.4 0.3 317.5 68.8 10.7 36% 0.1 0.4 37% 0 | ||
1380 | 11 | EOF | ||
1381 | 12 | |||
1382 | 13 | cat > $2 <<EOF | ||
1383 | 14 | TS 1298130002.073935000 | ||
1384 | 15 | EOF | ||
1385 | 16 | cat >>$2 samples/diskstats-005.txt | ||
1386 | 17 | 0 | ||
1387 | === added file 't/pt-diskstats/group_by_all.sh' | |||
1388 | --- t/pt-diskstats/group_by_all.sh 1970-01-01 00:00:00 +0000 | |||
1389 | +++ t/pt-diskstats/group_by_all.sh 2011-08-19 17:39:24 +0000 | |||
1390 | @@ -0,0 +1,47 @@ | |||
1391 | 1 | #!/bin/bash | ||
1392 | 2 | |||
1393 | 3 | # This test file must be ran by util/test-bash-functions. | ||
1394 | 4 | |||
1395 | 5 | TESTS=1 | ||
1396 | 6 | |||
1397 | 7 | cat <<EOF > $TMPDIR/expected | ||
1398 | 8 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1399 | 9 | 2.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1400 | 10 | 2.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 23.0 53.2 0.6 85% 0.0 0.9 0% 0 | ||
1401 | 11 | 2.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1402 | 12 | 2.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 23.0 53.2 0.6 85% 0.0 0.9 0% 0 | ||
1403 | 13 | 2.0 cciss/c0d1 466.5 44.6 10.2 0% 11.2 23.9 985.0 47.5 22.8 0% 0.1 0.1 92% 18 | ||
1404 | 14 | 2.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1405 | 15 | 2.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 153.0 8.0 0.6 0% 0.1 0.8 0% 0 | ||
1406 | 16 | 2.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1407 | 17 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1408 | 18 | 4.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1409 | 19 | 4.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 16.0 35.5 0.3 77% 0.0 0.4 0% 0 | ||
1410 | 20 | 4.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1411 | 21 | 4.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 16.0 35.5 0.3 77% 0.0 0.4 0% 0 | ||
1412 | 22 | 4.0 cciss/c0d1 373.0 47.2 8.6 0% 10.2 27.4 560.0 46.2 12.6 0% 0.1 0.1 91% 17 | ||
1413 | 23 | 4.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1414 | 24 | 4.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1415 | 25 | 4.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1416 | 26 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1417 | 27 | 5.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1418 | 28 | 5.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 4.0 62.0 0.1 87% 0.0 0.0 0% 0 | ||
1419 | 29 | 5.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1420 | 30 | 5.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 4.0 62.0 0.1 87% 0.0 0.0 0% 0 | ||
1421 | 31 | 5.0 cciss/c0d1 848.0 42.6 17.7 0% 21.6 25.5 1979.0 49.7 48.0 0% 0.2 0.1 178% 9 | ||
1422 | 32 | 5.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1423 | 33 | 5.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1424 | 34 | 5.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1425 | 35 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1426 | 36 | 7.0 ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1427 | 37 | 7.0 cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 21.0 74.7 0.8 89% 0.0 0.5 0% 0 | ||
1428 | 38 | 7.0 cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1429 | 39 | 7.0 cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 21.0 74.7 0.8 89% 0.0 0.5 0% 0 | ||
1430 | 40 | 7.0 cciss/c0d1 340.0 36.6 6.1 0% 8.1 23.8 913.0 49.4 22.0 0% 0.1 0.1 86% 5 | ||
1431 | 41 | 7.0 cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1432 | 42 | 7.0 dm-0 0.0 0.0 0.0 0% 0.0 0.0 194.5 8.0 0.8 0% 0.1 0.6 0% 0 | ||
1433 | 43 | 7.0 md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1434 | 44 | EOF | ||
1435 | 45 | |||
1436 | 46 | group_by_all "samples/diskstats-001.txt" > $TMPDIR/got | ||
1437 | 47 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1438 | 0 | 48 | ||
1439 | === added file 't/pt-diskstats/group_by_disk.sh' | |||
1440 | --- t/pt-diskstats/group_by_disk.sh 1970-01-01 00:00:00 +0000 | |||
1441 | +++ t/pt-diskstats/group_by_disk.sh 2011-08-19 17:39:24 +0000 | |||
1442 | @@ -0,0 +1,74 @@ | |||
1443 | 1 | #!/bin/bash | ||
1444 | 2 | |||
1445 | 3 | # This test file must be ran by util/test-bash-functions. | ||
1446 | 4 | |||
1447 | 5 | TESTS=5 | ||
1448 | 6 | |||
1449 | 7 | TEST_NAME="diskstats-001.txt" | ||
1450 | 8 | cat <<EOF > $TMPDIR/expected | ||
1451 | 9 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1452 | 10 | {4} ram0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1453 | 11 | {4} cciss/c0d0 0.0 0.0 0.0 0% 0.0 0.0 17.7 56.2 0.5 86% 0.0 0.6 0% 0 | ||
1454 | 12 | {4} cciss/c0d0p1 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1455 | 13 | {4} cciss/c0d0p2 0.0 0.0 0.0 0% 0.0 0.0 17.7 56.2 0.5 86% 0.0 0.6 0% 0 | ||
1456 | 14 | {4} cciss/c0d1 458.1 43.0 9.6 0% 11.5 25.1 985.0 48.4 23.3 0% 0.1 0.1 102% 0 | ||
1457 | 15 | {4} cciss/c1d0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1458 | 16 | {4} dm-0 0.0 0.0 0.0 0% 0.0 0.0 99.3 8.0 0.4 0% 0.1 0.7 0% 0 | ||
1459 | 17 | {4} md0 0.0 0.0 0.0 0% 0.0 0.0 0.0 0.0 0.0 0% 0.0 0.0 0% 0 | ||
1460 | 18 | EOF | ||
1461 | 19 | group_by_disk samples/diskstats-001.txt > $TMPDIR/got | ||
1462 | 20 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1463 | 21 | |||
1464 | 22 | |||
1465 | 23 | TEST_NAME="diskstats-005.txt" | ||
1466 | 24 | cat <<EOF > $TMPDIR/expected | ||
1467 | 25 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1468 | 26 | {5} sda3 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1469 | 27 | {5} sda4 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1470 | 28 | EOF | ||
1471 | 29 | group_by_disk samples/diskstats-005.txt > $TMPDIR/got | ||
1472 | 30 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1473 | 31 | |||
1474 | 32 | |||
1475 | 33 | TEST_NAME="diskstats-005.txt with TS" | ||
1476 | 34 | cat <<EOF > $TMPDIR/expected | ||
1477 | 35 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1478 | 36 | {5} sda3 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1479 | 37 | {5} sda4 1394.1 32.0 21.8 1% 0.5 0.4 98.8 62.8 3.0 48% 0.0 0.3 41% 0 | ||
1480 | 38 | EOF | ||
1481 | 39 | |||
1482 | 40 | cat > $TMPDIR/in <<EOF | ||
1483 | 41 | TS 1298130002.073935000 | ||
1484 | 42 | EOF | ||
1485 | 43 | cat samples/diskstats-005.txt >> $TMPDIR/in | ||
1486 | 44 | group_by_disk $TMPDIR/in > $TMPDIR/got | ||
1487 | 45 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1488 | 46 | |||
1489 | 47 | |||
1490 | 48 | TEST_NAME="no output" | ||
1491 | 49 | cat <<EOF > $TMPDIR/expected | ||
1492 | 50 | EOF | ||
1493 | 51 | |||
1494 | 52 | cat <<EOF > $TMPDIR/in | ||
1495 | 53 | TS 1297205887.156653000 | ||
1496 | 54 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 | ||
1497 | 55 | TS 1297205888.161613000 | ||
1498 | 56 | EOF | ||
1499 | 57 | group_by_disk $TMPDIR/in > $TMPDIR/got | ||
1500 | 58 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1501 | 59 | |||
1502 | 60 | |||
1503 | 61 | TEST_NAME="timestamps" | ||
1504 | 62 | cat <<EOF > $TMPDIR/expected | ||
1505 | 63 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1506 | 64 | {1} ram0 1.0 1.0 0.0 50% 0.0 1.0 1.0 1.0 0.0 50% 0.0 1.0 0% 0 | ||
1507 | 65 | EOF | ||
1508 | 66 | |||
1509 | 67 | cat <<EOF > $TMPDIR/in | ||
1510 | 68 | 1 0 ram0 0 0 0 0 0 0 0 0 0 0 0 | ||
1511 | 69 | TS 1297205887.156653000 | ||
1512 | 70 | 1 0 ram0 1 1 1 1 1 1 1 1 1 1 1 | ||
1513 | 71 | TS 1297205888.161613000 | ||
1514 | 72 | EOF | ||
1515 | 73 | group_by_disk $TMPDIR/in > $TMPDIR/got | ||
1516 | 74 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1517 | 0 | 75 | ||
1518 | === added file 't/pt-diskstats/group_by_sample.sh' | |||
1519 | --- t/pt-diskstats/group_by_sample.sh 1970-01-01 00:00:00 +0000 | |||
1520 | +++ t/pt-diskstats/group_by_sample.sh 2011-08-19 17:39:24 +0000 | |||
1521 | @@ -0,0 +1,84 @@ | |||
1522 | 1 | #!/usr/bin/env bash | ||
1523 | 2 | |||
1524 | 3 | # This test file must be ran by util/test-bash-functions. | ||
1525 | 4 | |||
1526 | 5 | TESTS=4 | ||
1527 | 6 | |||
1528 | 7 | TEST_NAME="diskstats-001.txt" | ||
1529 | 8 | cat <<EOF > $TMPDIR/expected | ||
1530 | 9 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1531 | 10 | 2.0 {8} 466.5 44.6 10.2 0% 1.4 23.9 1184.0 42.6 24.6 18% 0.0 0.2 12% 18 | ||
1532 | 11 | 4.0 {8} 373.0 47.2 8.6 0% 1.3 27.4 592.0 45.6 13.2 16% 0.0 0.1 11% 17 | ||
1533 | 12 | 5.0 {8} 848.0 42.6 17.7 0% 2.7 25.5 1987.0 49.8 48.3 3% 0.0 0.1 22% 9 | ||
1534 | 13 | 7.0 {8} 340.0 36.6 6.1 0% 1.0 23.8 1149.5 43.4 24.3 23% 0.0 0.2 11% 5 | ||
1535 | 14 | EOF | ||
1536 | 15 | group_by_sample samples/diskstats-001.txt > $TMPDIR/got | ||
1537 | 16 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1538 | 17 | |||
1539 | 18 | |||
1540 | 19 | TEST_NAME="input 1" | ||
1541 | 20 | cat <<EOF > $TMPDIR/expected | ||
1542 | 21 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1543 | 22 | 1.0 sda3 1406.0 32.0 21.9 1% 0.6 0.4 46.3 61.1 1.4 67% 0.0 0.3 41% 0 | ||
1544 | 23 | 2.0 sda3 1580.1 31.9 24.6 1% 0.6 0.4 163.7 62.2 5.0 36% 0.1 0.3 46% 1 | ||
1545 | 24 | 3.0 sda3 1296.7 32.0 20.2 1% 0.5 0.4 51.3 50.5 1.3 62% 0.0 0.3 42% 1 | ||
1546 | 25 | 4.1 sda3 1429.7 32.0 22.3 1% 0.5 0.3 73.9 61.0 2.2 57% 0.0 0.3 40% 0 | ||
1547 | 26 | 5.1 sda3 1258.1 32.0 19.6 1% 0.4 0.3 158.7 68.8 5.3 36% 0.1 0.4 37% 0 | ||
1548 | 27 | EOF | ||
1549 | 28 | |||
1550 | 29 | cat > $TMPDIR/in <<EOF | ||
1551 | 30 | 8 3 sda3 4257315954 34043324 136169413346 1922644483 492348396 547079617 32764474048 248191881 0 1348454960 2169768832 | ||
1552 | 31 | TS 1298130003.073935000 | ||
1553 | 32 | 8 3 sda3 4257317380 34043342 136169458914 1922645044 492348443 547079711 32764476920 248191896 0 1348455373 2169769408 | ||
1554 | 33 | TS 1298130004.088149000 | ||
1555 | 34 | 8 3 sda3 4257318982 34043364 136169510082 1922645662 492348609 547079803 32764487248 248191947 1 1348455841 2169770075 | ||
1556 | 35 | TS 1298130005.102035000 | ||
1557 | 36 | 8 3 sda3 4257320297 34043384 136169552098 1922646173 492348661 547079889 32764489872 248191964 1 1348456262 2169770603 | ||
1558 | 37 | TS 1298130006.116158000 | ||
1559 | 38 | 8 3 sda3 4257321748 34043394 136169598530 1922646672 492348736 547079990 32764494448 248191983 0 1348456671 2169771121 | ||
1560 | 39 | TS 1298130007.131062000 | ||
1561 | 40 | 8 3 sda3 4257323024 34043406 136169639330 1922647105 492348897 547080080 32764505520 248192043 0 1348457045 2169771613 | ||
1562 | 41 | TS 1298130008.145277000 | ||
1563 | 42 | EOF | ||
1564 | 43 | group_by_sample $TMPDIR/in > $TMPDIR/got | ||
1565 | 44 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1566 | 45 | |||
1567 | 46 | |||
1568 | 47 | # The below is incremental samples of the data and timestamps: | ||
1569 | 48 | # TS_diff reads reads_mrg read_sectors ms_reading writes write_mrg wrt_sectors ms_wrting i ms_ding_io ms_weightd | ||
1570 | 49 | # 1.14214000 1426 18 45568 561 47 94 2872 15 0 413 576 | ||
1571 | 50 | # 1.13886000 1602 22 51168 618 166 92 10328 51 1 468 667 | ||
1572 | 51 | # 1.14123000 1315 20 42016 511 52 86 2624 17 1 421 528 | ||
1573 | 52 | # 1.14904000 1451 10 46432 499 75 101 4576 19 0 409 518 | ||
1574 | 53 | # 1.14215000 1276 12 40800 433 161 90 11072 60 0 374 492 | ||
1575 | 54 | |||
1576 | 55 | |||
1577 | 56 | TEST_NAME="diskstats-005.txt" | ||
1578 | 57 | cat <<EOF > $TMPDIR/expected | ||
1579 | 58 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1580 | 59 | 1.0 {2} 2812.0 32.0 43.9 1% 0.6 0.4 92.7 61.1 2.8 67% 0.0 0.3 41% 0 | ||
1581 | 60 | 2.0 {2} 3160.1 31.9 49.3 1% 0.6 0.4 327.5 62.2 9.9 36% 0.1 0.3 46% 2 | ||
1582 | 61 | 3.0 {2} 2593.4 32.0 40.5 1% 0.5 0.4 102.6 50.5 2.5 62% 0.0 0.3 42% 2 | ||
1583 | 62 | 4.1 {2} 2859.4 32.0 44.7 1% 0.5 0.3 147.8 61.0 4.4 57% 0.0 0.3 40% 0 | ||
1584 | 63 | 5.1 {2} 2516.2 32.0 39.3 1% 0.4 0.3 317.5 68.8 10.7 36% 0.1 0.4 37% 0 | ||
1585 | 64 | EOF | ||
1586 | 65 | group_by_sample samples/diskstats-005.txt > $TMPDIR/got | ||
1587 | 66 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1588 | 67 | |||
1589 | 68 | |||
1590 | 69 | TEST_NAME="ts line" | ||
1591 | 70 | cat <<EOF > $TMPDIR/expected | ||
1592 | 71 | #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg | ||
1593 | 72 | 1.0 {2} 2812.0 32.0 43.9 1% 0.6 0.4 92.7 61.1 2.8 67% 0.0 0.3 41% 0 | ||
1594 | 73 | 2.0 {2} 3160.1 31.9 49.3 1% 0.6 0.4 327.5 62.2 9.9 36% 0.1 0.3 46% 2 | ||
1595 | 74 | 3.0 {2} 2593.4 32.0 40.5 1% 0.5 0.4 102.6 50.5 2.5 62% 0.0 0.3 42% 2 | ||
1596 | 75 | 4.1 {2} 2859.4 32.0 44.7 1% 0.5 0.3 147.8 61.0 4.4 57% 0.0 0.3 40% 0 | ||
1597 | 76 | 5.1 {2} 2516.2 32.0 39.3 1% 0.4 0.3 317.5 68.8 10.7 36% 0.1 0.4 37% 0 | ||
1598 | 77 | EOF | ||
1599 | 78 | |||
1600 | 79 | cat > $TMPDIR/in <<EOF | ||
1601 | 80 | TS 1298130002.073935000 | ||
1602 | 81 | EOF | ||
1603 | 82 | cat samples/diskstats-005.txt >> $TMPDIR/in | ||
1604 | 83 | group_by_sample $TMPDIR/in > $TMPDIR/got | ||
1605 | 84 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1606 | 0 | 85 | ||
1607 | === modified file 't/pt-diskstats/pt-diskstats.t' | |||
1608 | --- t/pt-diskstats/pt-diskstats.t 2011-07-12 22:56:55 +0000 | |||
1609 | +++ t/pt-diskstats/pt-diskstats.t 2011-08-19 17:39:24 +0000 | |||
1610 | @@ -1,4 +1,4 @@ | |||
1612 | 1 | #!/usr/bin/evn perl | 1 | #!/usr/bin/env perl |
1613 | 2 | 2 | ||
1614 | 3 | BEGIN { | 3 | BEGIN { |
1615 | 4 | die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" | 4 | die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" |
1616 | @@ -12,6 +12,8 @@ | |||
1617 | 12 | 12 | ||
1618 | 13 | use PerconaTest; | 13 | use PerconaTest; |
1619 | 14 | 14 | ||
1621 | 15 | system("$trunk/util/test-bash-tool pt-diskstats @ARGV"); | 15 | my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/; |
1622 | 16 | push @ARGV, "$trunk/t/$tool/*.sh" unless @ARGV; | ||
1623 | 17 | system("$trunk/util/test-bash-functions $trunk/bin/$tool @ARGV"); | ||
1624 | 16 | 18 | ||
1625 | 17 | exit; | 19 | exit; |
1626 | 18 | 20 | ||
1627 | === removed file 't/pt-mysql-summary/find-my-cnf-file-01' | |||
1628 | --- t/pt-mysql-summary/find-my-cnf-file-01 2011-08-02 21:14:06 +0000 | |||
1629 | +++ t/pt-mysql-summary/find-my-cnf-file-01 1970-01-01 00:00:00 +0000 | |||
1630 | @@ -1,6 +0,0 @@ | |||
1631 | 1 | #!/bin/bash | ||
1632 | 2 | #find_my_cnf_file 12346 | ||
1633 | 3 | |||
1634 | 4 | echo /tmp/12346/my.sandbox.cnf > $1 | ||
1635 | 5 | |||
1636 | 6 | cp samples/ps-mysqld-001.txt /tmp/percona-toolkit | ||
1637 | 7 | 0 | ||
1638 | === removed file 't/pt-mysql-summary/find-my-cnf-file-02' | |||
1639 | --- t/pt-mysql-summary/find-my-cnf-file-02 2011-08-02 21:14:06 +0000 | |||
1640 | +++ t/pt-mysql-summary/find-my-cnf-file-02 1970-01-01 00:00:00 +0000 | |||
1641 | @@ -1,6 +0,0 @@ | |||
1642 | 1 | #!/bin/bash | ||
1643 | 2 | #find_my_cnf_file 12345 | ||
1644 | 3 | |||
1645 | 4 | echo /var/lib/mysql/my.cnf > $1 | ||
1646 | 5 | |||
1647 | 6 | cp samples/ps-mysqld-004.txt /tmp/percona-toolkit | ||
1648 | 7 | 0 | ||
1649 | === removed file 't/pt-mysql-summary/find-my-cnf-file-03' | |||
1650 | --- t/pt-mysql-summary/find-my-cnf-file-03 2011-08-02 21:14:06 +0000 | |||
1651 | +++ t/pt-mysql-summary/find-my-cnf-file-03 1970-01-01 00:00:00 +0000 | |||
1652 | @@ -1,6 +0,0 @@ | |||
1653 | 1 | #!/bin/bash | ||
1654 | 2 | #find_my_cnf_file | ||
1655 | 3 | |||
1656 | 4 | echo /var/lib/mysql/my.cnf > $1 | ||
1657 | 5 | |||
1658 | 6 | cp samples/ps-mysqld-004.txt /tmp/percona-toolkit | ||
1659 | 7 | 0 | ||
1660 | === removed file 't/pt-mysql-summary/find-my-cnf-file-04' | |||
1661 | --- t/pt-mysql-summary/find-my-cnf-file-04 2011-08-02 21:14:06 +0000 | |||
1662 | +++ t/pt-mysql-summary/find-my-cnf-file-04 1970-01-01 00:00:00 +0000 | |||
1663 | @@ -1,6 +0,0 @@ | |||
1664 | 1 | #!/bin/bash | ||
1665 | 2 | #find_my_cnf_file | ||
1666 | 3 | |||
1667 | 4 | echo /tmp/12345/my.sandbox.cnf > $1 | ||
1668 | 5 | |||
1669 | 6 | cp samples/ps-mysqld-001.txt /tmp/percona-toolkit | ||
1670 | 7 | 0 | ||
1671 | === added file 't/pt-mysql-summary/find_my_cnf_file.sh' | |||
1672 | --- t/pt-mysql-summary/find_my_cnf_file.sh 1970-01-01 00:00:00 +0000 | |||
1673 | +++ t/pt-mysql-summary/find_my_cnf_file.sh 2011-08-19 17:39:24 +0000 | |||
1674 | @@ -0,0 +1,19 @@ | |||
1675 | 1 | #!/usr/bin/env bash | ||
1676 | 2 | |||
1677 | 3 | TESTS=4 | ||
1678 | 4 | |||
1679 | 5 | TEST_NAME="ps-mysqld-001.txt" | ||
1680 | 6 | res=$(find_my_cnf_file samples/ps-mysqld-001.txt) | ||
1681 | 7 | is "$res" "/tmp/12345/my.sandbox.cnf" | ||
1682 | 8 | |||
1683 | 9 | TEST_NAME="ps-mysqld-001.txt with port" | ||
1684 | 10 | res=$(find_my_cnf_file samples/ps-mysqld-001.txt 12346) | ||
1685 | 11 | is "$res" "/tmp/12346/my.sandbox.cnf" | ||
1686 | 12 | |||
1687 | 13 | TEST_NAME="ps-mysqld-004.txt" | ||
1688 | 14 | res=$(find_my_cnf_file samples/ps-mysqld-004.txt) | ||
1689 | 15 | is "$res" "/var/lib/mysql/my.cnf" | ||
1690 | 16 | |||
1691 | 17 | TEST_NAME="ps-mysqld-004.txt with port" | ||
1692 | 18 | res=$(find_my_cnf_file samples/ps-mysqld-004.txt 12345) | ||
1693 | 19 | is "$res" "/var/lib/mysql/my.cnf" | ||
1694 | 0 | 20 | ||
1695 | === removed file 't/pt-mysql-summary/format-innodb-status-01' | |||
1696 | --- t/pt-mysql-summary/format-innodb-status-01 2011-08-02 21:14:06 +0000 | |||
1697 | +++ t/pt-mysql-summary/format-innodb-status-01 1970-01-01 00:00:00 +0000 | |||
1698 | @@ -1,52 +0,0 @@ | |||
1699 | 1 | #!/bin/bash | ||
1700 | 2 | #format_innodb_status /tmp/percona-toolkit-innodb-status | ||
1701 | 3 | |||
1702 | 4 | cat <<EOF > $1 | ||
1703 | 5 | Checkpoint Age | 619k | ||
1704 | 6 | InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue | ||
1705 | 7 | Oldest Transaction | 3 Seconds | ||
1706 | 8 | History List Len | 255 | ||
1707 | 9 | Read Views | 23 | ||
1708 | 10 | Undo Log Entries | 0 transactions, 0 total undo, 0 max undo | ||
1709 | 11 | Pending I/O Reads | 14 buf pool reads, 6 normal AIO, 0 ibuf AIO, 23 preads | ||
1710 | 12 | Pending I/O Writes | 63 buf pool (63 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (1 log, 0 chkp); 0 pwrites | ||
1711 | 13 | Pending I/O Flushes | 0 buf pool, 1 log | ||
1712 | 14 | Transaction States | 1xACTIVE | ||
1713 | 15 | Semaphore Waits | ||
1714 | 16 | 69 btr/btr0cur.c line 457 | ||
1715 | 17 | 47 btr/btr0cur.c line 523 | ||
1716 | 18 | 17 trx/trx0trx.c line 1621 | ||
1717 | 19 | 12 row/row0sel.c line 3549 | ||
1718 | 20 | 4 lock/lock0lock.c line 4944 | ||
1719 | 21 | 3 lock/lock0lock.c line 5316 | ||
1720 | 22 | 2 lock/lock0lock.c line 3224 | ||
1721 | 23 | 2 btr/btr0sea.c line 1032 | ||
1722 | 24 | 1 trx/trx0trx.c line 738 | ||
1723 | 25 | 1 row/row0sel.c line 4574 | ||
1724 | 26 | 1 lock/lock0lock.c line 5163 | ||
1725 | 27 | 1 lock/lock0lock.c line 3249 | ||
1726 | 28 | 1 ./include/btr0btr.ic line 53 | ||
1727 | 29 | 1 fsp/fsp0fsp.c line 3395 | ||
1728 | 30 | 1 btr/btr0cur.c line 672 | ||
1729 | 31 | 1 btr/btr0cur.c line 450 | ||
1730 | 32 | Semaphore Holders | ||
1731 | 33 | 66 thread id 139960165583184 | ||
1732 | 34 | 45 thread id 139960567171408 | ||
1733 | 35 | 4 thread id 139960404199760 | ||
1734 | 36 | 1 thread id 139961215367504 | ||
1735 | 37 | 1 thread id 139960969292112 | ||
1736 | 38 | 1 thread id 139960676096336 | ||
1737 | 39 | Mutexes/Locks Waited For | ||
1738 | 40 | 65 lock on RW-latch at 0x905d33d0 '&new_index->lock' | ||
1739 | 41 | 45 lock on RW-latch at 0x7f4bedbf8810 '&block->lock' | ||
1740 | 42 | 30 Mutex at 0xf89ab0 '&kernel_mutex' | ||
1741 | 43 | 15 lock on RW-latch at 0x90075530 '&btr_search_latch' | ||
1742 | 44 | 4 lock on RW-latch at 0x90a42ca0 '&new_index->lock' | ||
1743 | 45 | 1 lock on RW-latch at 0x90fe1c80 '&new_index->lock' | ||
1744 | 46 | 1 lock on RW-latch at 0x90078f10 '&space->latch' | ||
1745 | 47 | 1 lock on RW-latch at 0x7f4c0d3abba8 '&block->lock' | ||
1746 | 48 | 1 lock on RW-latch at 0x7f4bfc558040 '&block->lock' | ||
1747 | 49 | 1 lock on RW-latch at 0x7f4bd0a8c8d0 '&block->lock' | ||
1748 | 50 | EOF | ||
1749 | 51 | |||
1750 | 52 | cp samples/innodb-status.001.txt /tmp/percona-toolkit-innodb-status | ||
1751 | 53 | 0 | ||
1752 | === removed file 't/pt-mysql-summary/format-innodb-status-02' | |||
1753 | --- t/pt-mysql-summary/format-innodb-status-02 2011-08-02 21:14:06 +0000 | |||
1754 | +++ t/pt-mysql-summary/format-innodb-status-02 1970-01-01 00:00:00 +0000 | |||
1755 | @@ -1,35 +0,0 @@ | |||
1756 | 1 | #!/bin/bash | ||
1757 | 2 | #format_innodb_status /tmp/percona-toolkit-innodb-status | ||
1758 | 3 | |||
1759 | 4 | cat <<'EOF' > $1 | ||
1760 | 5 | Checkpoint Age | 348M | ||
1761 | 6 | InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue | ||
1762 | 7 | Oldest Transaction | 4 Seconds | ||
1763 | 8 | History List Len | 426 | ||
1764 | 9 | Read Views | 583 | ||
1765 | 10 | Undo Log Entries | 71 transactions, 247 total undo, 46 max undo | ||
1766 | 11 | Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads | ||
1767 | 12 | Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites | ||
1768 | 13 | Pending I/O Flushes | 0 buf pool, 0 log | ||
1769 | 14 | Transaction States | 1xACTIVE, 70xACTIVE (PREPARED) | ||
1770 | 15 | Tables Locked | ||
1771 | 16 | 62 `citydb`.`player_buildings` | ||
1772 | 17 | 46 `citydb`.`players` | ||
1773 | 18 | 22 `citydb`.`city_grid` | ||
1774 | 19 | 17 `citydb`.`player_stats` | ||
1775 | 20 | 6 `citydb`.`player_contracts` | ||
1776 | 21 | 1 `citydb`.`player_achievements` | ||
1777 | 22 | Semaphore Waits | ||
1778 | 23 | 23 trx/trx0undo.c line 1796 | ||
1779 | 24 | 10 trx/trx0trx.c line 1888 | ||
1780 | 25 | 8 trx/trx0trx.c line 1033 | ||
1781 | 26 | 7 trx/trx0trx.c line 738 | ||
1782 | 27 | 1 lock/lock0lock.c line 3770 | ||
1783 | 28 | 1 ./include/log0log.ic line 322 | ||
1784 | 29 | Mutexes/Locks Waited For | ||
1785 | 30 | 33 Mutex at 0x2abf68b76a18 '&rseg->mutex' | ||
1786 | 31 | 16 Mutex at 0x48ace40 '&kernel_mutex' | ||
1787 | 32 | 1 Mutex at 0x2abf68b6c0d0 '&log_sys->mutex' | ||
1788 | 33 | EOF | ||
1789 | 34 | |||
1790 | 35 | cp samples/innodb-status.002.txt /tmp/percona-toolkit-innodb-status | ||
1791 | 36 | 0 | ||
1792 | === removed file 't/pt-mysql-summary/format-innodb-status-03' | |||
1793 | --- t/pt-mysql-summary/format-innodb-status-03 2011-08-02 21:14:06 +0000 | |||
1794 | +++ t/pt-mysql-summary/format-innodb-status-03 1970-01-01 00:00:00 +0000 | |||
1795 | @@ -1,19 +0,0 @@ | |||
1796 | 1 | #!/bin/bash | ||
1797 | 2 | #format_innodb_status /tmp/percona-toolkit-innodb-status | ||
1798 | 3 | |||
1799 | 4 | cat <<'EOF' > $1 | ||
1800 | 5 | Checkpoint Age | 0k | ||
1801 | 6 | InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue | ||
1802 | 7 | Oldest Transaction | 35 Seconds | ||
1803 | 8 | History List Len | 11 | ||
1804 | 9 | Read Views | 1 | ||
1805 | 10 | Undo Log Entries | 0 transactions, 0 total undo, 0 max undo | ||
1806 | 11 | Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads | ||
1807 | 12 | Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites | ||
1808 | 13 | Pending I/O Flushes | 0 buf pool, 0 log | ||
1809 | 14 | Transaction States | 1xACTIVE, 1xnot started | ||
1810 | 15 | Tables Locked | ||
1811 | 16 | 1 `test`.`t` | ||
1812 | 17 | EOF | ||
1813 | 18 | |||
1814 | 19 | cp samples/innodb-status.003.txt /tmp/percona-toolkit-innodb-status | ||
1815 | 20 | 0 | ||
1816 | === removed file 't/pt-mysql-summary/format-innodb-status-04' | |||
1817 | --- t/pt-mysql-summary/format-innodb-status-04 2011-08-02 21:14:06 +0000 | |||
1818 | +++ t/pt-mysql-summary/format-innodb-status-04 1970-01-01 00:00:00 +0000 | |||
1819 | @@ -1,29 +0,0 @@ | |||
1820 | 1 | #!/bin/bash | ||
1821 | 2 | #format_innodb_status /tmp/percona-toolkit-innodb-status | ||
1822 | 3 | |||
1823 | 4 | cat <<'EOF' > $1 | ||
1824 | 5 | Checkpoint Age | 93M | ||
1825 | 6 | InnoDB Queue | 9 queries inside InnoDB, 0 queries in queue | ||
1826 | 7 | Oldest Transaction | 263 Seconds | ||
1827 | 8 | History List Len | 1282 | ||
1828 | 9 | Read Views | 10 | ||
1829 | 10 | Undo Log Entries | 3 transactions, 276797 total undo, 153341 max undo | ||
1830 | 11 | Pending I/O Reads | 50 buf pool reads, 48 normal AIO, 0 ibuf AIO, 2 preads | ||
1831 | 12 | Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites | ||
1832 | 13 | Pending I/O Flushes | 0 buf pool, 0 log | ||
1833 | 14 | Transaction States | 9xACTIVE, 57xnot started | ||
1834 | 15 | Semaphore Waits | ||
1835 | 16 | 3 row/row0sel.c line 3495 | ||
1836 | 17 | 2 btr/btr0sea.c line 1024 | ||
1837 | 18 | 1 btr/btr0sea.c line 1170 | ||
1838 | 19 | 1 btr/btr0cur.c line 443 | ||
1839 | 20 | 1 btr/btr0cur.c line 1501 | ||
1840 | 21 | Semaphore Holders | ||
1841 | 22 | 7 thread id 1220999488 | ||
1842 | 23 | 1 thread id 1229429056 | ||
1843 | 24 | Mutexes/Locks Waited For | ||
1844 | 25 | 7 lock on RW-latch at 0x2aaab42120b8 created in file btr/btr0sea.c line 139 | ||
1845 | 26 | 1 lock on RW-latch at 0x2ab2c679a550 created in file buf/buf0buf.c line 550 | ||
1846 | 27 | EOF | ||
1847 | 28 | |||
1848 | 29 | cp samples/innodb-status.004.txt /tmp/percona-toolkit-innodb-status | ||
1849 | 30 | 0 | ||
1850 | === added file 't/pt-mysql-summary/format_binlog_filters.sh' | |||
1851 | --- t/pt-mysql-summary/format_binlog_filters.sh 1970-01-01 00:00:00 +0000 | |||
1852 | +++ t/pt-mysql-summary/format_binlog_filters.sh 2011-08-19 17:39:24 +0000 | |||
1853 | @@ -0,0 +1,11 @@ | |||
1854 | 1 | #!/bin/bash | ||
1855 | 2 | |||
1856 | 3 | TEST=1 | ||
1857 | 4 | |||
1858 | 5 | cat <<EOF > $TMPDIR/expected | ||
1859 | 6 | binlog_do_db | foo | ||
1860 | 7 | binlog_ignore_db | mysql,test | ||
1861 | 8 | EOF | ||
1862 | 9 | |||
1863 | 10 | format_binlog_filters samples/mysql-show-master-status-001.txt > $TMPDIR/got | ||
1864 | 11 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1865 | 0 | 12 | ||
1866 | === added file 't/pt-mysql-summary/format_innodb_status.sh' | |||
1867 | --- t/pt-mysql-summary/format_innodb_status.sh 1970-01-01 00:00:00 +0000 | |||
1868 | +++ t/pt-mysql-summary/format_innodb_status.sh 2011-08-19 17:39:24 +0000 | |||
1869 | @@ -0,0 +1,146 @@ | |||
1870 | 1 | #!/usr/bin/env bash | ||
1871 | 2 | |||
1872 | 3 | TESTS=4 | ||
1873 | 4 | |||
1874 | 5 | # ############################################################################ | ||
1875 | 6 | TEST_NAME="innodb-status.001.txt" | ||
1876 | 7 | # ############################################################################ | ||
1877 | 8 | cat <<EOF > $TMPDIR/expected | ||
1878 | 9 | Checkpoint Age | 619k | ||
1879 | 10 | InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue | ||
1880 | 11 | Oldest Transaction | 3 Seconds | ||
1881 | 12 | History List Len | 255 | ||
1882 | 13 | Read Views | 23 | ||
1883 | 14 | Undo Log Entries | 0 transactions, 0 total undo, 0 max undo | ||
1884 | 15 | Pending I/O Reads | 14 buf pool reads, 6 normal AIO, 0 ibuf AIO, 23 preads | ||
1885 | 16 | Pending I/O Writes | 63 buf pool (63 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (1 log, 0 chkp); 0 pwrites | ||
1886 | 17 | Pending I/O Flushes | 0 buf pool, 1 log | ||
1887 | 18 | Transaction States | 1xACTIVE | ||
1888 | 19 | Semaphore Waits | ||
1889 | 20 | 69 btr/btr0cur.c line 457 | ||
1890 | 21 | 47 btr/btr0cur.c line 523 | ||
1891 | 22 | 17 trx/trx0trx.c line 1621 | ||
1892 | 23 | 12 row/row0sel.c line 3549 | ||
1893 | 24 | 4 lock/lock0lock.c line 4944 | ||
1894 | 25 | 3 lock/lock0lock.c line 5316 | ||
1895 | 26 | 2 lock/lock0lock.c line 3224 | ||
1896 | 27 | 2 btr/btr0sea.c line 1032 | ||
1897 | 28 | 1 trx/trx0trx.c line 738 | ||
1898 | 29 | 1 row/row0sel.c line 4574 | ||
1899 | 30 | 1 lock/lock0lock.c line 5163 | ||
1900 | 31 | 1 lock/lock0lock.c line 3249 | ||
1901 | 32 | 1 ./include/btr0btr.ic line 53 | ||
1902 | 33 | 1 fsp/fsp0fsp.c line 3395 | ||
1903 | 34 | 1 btr/btr0cur.c line 672 | ||
1904 | 35 | 1 btr/btr0cur.c line 450 | ||
1905 | 36 | Semaphore Holders | ||
1906 | 37 | 66 thread id 139960165583184 | ||
1907 | 38 | 45 thread id 139960567171408 | ||
1908 | 39 | 4 thread id 139960404199760 | ||
1909 | 40 | 1 thread id 139961215367504 | ||
1910 | 41 | 1 thread id 139960969292112 | ||
1911 | 42 | 1 thread id 139960676096336 | ||
1912 | 43 | Mutexes/Locks Waited For | ||
1913 | 44 | 65 lock on RW-latch at 0x905d33d0 '&new_index->lock' | ||
1914 | 45 | 45 lock on RW-latch at 0x7f4bedbf8810 '&block->lock' | ||
1915 | 46 | 30 Mutex at 0xf89ab0 '&kernel_mutex' | ||
1916 | 47 | 15 lock on RW-latch at 0x90075530 '&btr_search_latch' | ||
1917 | 48 | 4 lock on RW-latch at 0x90a42ca0 '&new_index->lock' | ||
1918 | 49 | 1 lock on RW-latch at 0x90fe1c80 '&new_index->lock' | ||
1919 | 50 | 1 lock on RW-latch at 0x90078f10 '&space->latch' | ||
1920 | 51 | 1 lock on RW-latch at 0x7f4c0d3abba8 '&block->lock' | ||
1921 | 52 | 1 lock on RW-latch at 0x7f4bfc558040 '&block->lock' | ||
1922 | 53 | 1 lock on RW-latch at 0x7f4bd0a8c8d0 '&block->lock' | ||
1923 | 54 | EOF | ||
1924 | 55 | |||
1925 | 56 | format_innodb_status samples/innodb-status.001.txt > $TMPDIR/got | ||
1926 | 57 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1927 | 58 | |||
1928 | 59 | # ############################################################################ | ||
1929 | 60 | TEST_NAME="innodb-status.002.txt" | ||
1930 | 61 | # ############################################################################ | ||
1931 | 62 | cat <<'EOF' > $TMPDIR/expected | ||
1932 | 63 | Checkpoint Age | 348M | ||
1933 | 64 | InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue | ||
1934 | 65 | Oldest Transaction | 4 Seconds | ||
1935 | 66 | History List Len | 426 | ||
1936 | 67 | Read Views | 583 | ||
1937 | 68 | Undo Log Entries | 71 transactions, 247 total undo, 46 max undo | ||
1938 | 69 | Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads | ||
1939 | 70 | Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites | ||
1940 | 71 | Pending I/O Flushes | 0 buf pool, 0 log | ||
1941 | 72 | Transaction States | 1xACTIVE, 70xACTIVE (PREPARED) | ||
1942 | 73 | Tables Locked | ||
1943 | 74 | 62 `citydb`.`player_buildings` | ||
1944 | 75 | 46 `citydb`.`players` | ||
1945 | 76 | 22 `citydb`.`city_grid` | ||
1946 | 77 | 17 `citydb`.`player_stats` | ||
1947 | 78 | 6 `citydb`.`player_contracts` | ||
1948 | 79 | 1 `citydb`.`player_achievements` | ||
1949 | 80 | Semaphore Waits | ||
1950 | 81 | 23 trx/trx0undo.c line 1796 | ||
1951 | 82 | 10 trx/trx0trx.c line 1888 | ||
1952 | 83 | 8 trx/trx0trx.c line 1033 | ||
1953 | 84 | 7 trx/trx0trx.c line 738 | ||
1954 | 85 | 1 lock/lock0lock.c line 3770 | ||
1955 | 86 | 1 ./include/log0log.ic line 322 | ||
1956 | 87 | Mutexes/Locks Waited For | ||
1957 | 88 | 33 Mutex at 0x2abf68b76a18 '&rseg->mutex' | ||
1958 | 89 | 16 Mutex at 0x48ace40 '&kernel_mutex' | ||
1959 | 90 | 1 Mutex at 0x2abf68b6c0d0 '&log_sys->mutex' | ||
1960 | 91 | EOF | ||
1961 | 92 | |||
1962 | 93 | format_innodb_status samples/innodb-status.002.txt > $TMPDIR/got | ||
1963 | 94 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1964 | 95 | |||
1965 | 96 | # ############################################################################ | ||
1966 | 97 | TEST_NAME="innodb-status.003.txt" | ||
1967 | 98 | # ############################################################################ | ||
1968 | 99 | cat <<'EOF' > $TMPDIR/expected | ||
1969 | 100 | Checkpoint Age | 0k | ||
1970 | 101 | InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue | ||
1971 | 102 | Oldest Transaction | 35 Seconds | ||
1972 | 103 | History List Len | 11 | ||
1973 | 104 | Read Views | 1 | ||
1974 | 105 | Undo Log Entries | 0 transactions, 0 total undo, 0 max undo | ||
1975 | 106 | Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads | ||
1976 | 107 | Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites | ||
1977 | 108 | Pending I/O Flushes | 0 buf pool, 0 log | ||
1978 | 109 | Transaction States | 1xACTIVE, 1xnot started | ||
1979 | 110 | Tables Locked | ||
1980 | 111 | 1 `test`.`t` | ||
1981 | 112 | EOF | ||
1982 | 113 | |||
1983 | 114 | format_innodb_status samples/innodb-status.003.txt > $TMPDIR/got | ||
1984 | 115 | no_diff $TMPDIR/got $TMPDIR/expected | ||
1985 | 116 | |||
1986 | 117 | # ############################################################################ | ||
1987 | 118 | TEST_NAME="innodb-status.004.txt" | ||
1988 | 119 | # ############################################################################ | ||
1989 | 120 | cat <<'EOF' > $TMPDIR/expected | ||
1990 | 121 | Checkpoint Age | 93M | ||
1991 | 122 | InnoDB Queue | 9 queries inside InnoDB, 0 queries in queue | ||
1992 | 123 | Oldest Transaction | 263 Seconds | ||
1993 | 124 | History List Len | 1282 | ||
1994 | 125 | Read Views | 10 | ||
1995 | 126 | Undo Log Entries | 3 transactions, 276797 total undo, 153341 max undo | ||
1996 | 127 | Pending I/O Reads | 50 buf pool reads, 48 normal AIO, 0 ibuf AIO, 2 preads | ||
1997 | 128 | Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp); 0 pwrites | ||
1998 | 129 | Pending I/O Flushes | 0 buf pool, 0 log | ||
1999 | 130 | Transaction States | 9xACTIVE, 57xnot started | ||
2000 | 131 | Semaphore Waits | ||
2001 | 132 | 3 row/row0sel.c line 3495 | ||
2002 | 133 | 2 btr/btr0sea.c line 1024 | ||
2003 | 134 | 1 btr/btr0sea.c line 1170 | ||
2004 | 135 | 1 btr/btr0cur.c line 443 | ||
2005 | 136 | 1 btr/btr0cur.c line 1501 | ||
2006 | 137 | Semaphore Holders | ||
2007 | 138 | 7 thread id 1220999488 | ||
2008 | 139 | 1 thread id 1229429056 | ||
2009 | 140 | Mutexes/Locks Waited For | ||
2010 | 141 | 7 lock on RW-latch at 0x2aaab42120b8 created in file btr/btr0sea.c line 139 | ||
2011 | 142 | 1 lock on RW-latch at 0x2ab2c679a550 created in file buf/buf0buf.c line 550 | ||
2012 | 143 | EOF | ||
2013 | 144 | |||
2014 | 145 | format_innodb_status samples/innodb-status.004.txt > $TMPDIR/got | ||
2015 | 146 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2016 | 0 | 147 | ||
2017 | === added file 't/pt-mysql-summary/format_overall_db_stats.sh' | |||
2018 | --- t/pt-mysql-summary/format_overall_db_stats.sh 1970-01-01 00:00:00 +0000 | |||
2019 | +++ t/pt-mysql-summary/format_overall_db_stats.sh 2011-08-19 17:39:24 +0000 | |||
2020 | @@ -0,0 +1,60 @@ | |||
2021 | 1 | #!/bin/bash | ||
2022 | 2 | |||
2023 | 3 | TESTS=2 | ||
2024 | 4 | |||
2025 | 5 | cat <<EOF > $TMPDIR/expected | ||
2026 | 6 | |||
2027 | 7 | Database Tables Views SPs Trigs Funcs FKs Partn | ||
2028 | 8 | mysql 17 | ||
2029 | 9 | sakila 17 7 3 6 3 22 1 | ||
2030 | 10 | |||
2031 | 11 | Database MyISAM InnoDB | ||
2032 | 12 | mysql 17 | ||
2033 | 13 | sakila 2 15 | ||
2034 | 14 | |||
2035 | 15 | Database BTREE FULLTEXT | ||
2036 | 16 | mysql 24 | ||
2037 | 17 | sakila 63 1 | ||
2038 | 18 | |||
2039 | 19 | c t s e t s i t b l b v d y d m | ||
2040 | 20 | h i e n i m n e l o i a a e e e | ||
2041 | 21 | a m t u n a t x o n g r t a c d | ||
2042 | 22 | r e m y l t b g i c e r i i | ||
2043 | 23 | s i l b n h t m u | ||
2044 | 24 | t n i l t a i a m | ||
2045 | 25 | a t n o r m l i | ||
2046 | 26 | m t b e n | ||
2047 | 27 | p t | ||
2048 | 28 | Database === === === === === === === === === === === === === === === === | ||
2049 | 29 | mysql 38 5 5 69 2 3 16 2 4 1 2 | ||
2050 | 30 | sakila 1 15 1 3 19 26 3 4 1 45 4 1 7 2 | ||
2051 | 31 | |||
2052 | 32 | EOF | ||
2053 | 33 | format_overall_db_stats samples/mysql-schema-001.txt > $TMPDIR/got | ||
2054 | 34 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2055 | 35 | |||
2056 | 36 | |||
2057 | 37 | cat <<EOF > $TMPDIR/expected | ||
2058 | 38 | |||
2059 | 39 | Database Tables Views SPs Trigs Funcs FKs Partn | ||
2060 | 40 | {chosen} 1 | ||
2061 | 41 | |||
2062 | 42 | Database InnoDB | ||
2063 | 43 | {chosen} 1 | ||
2064 | 44 | |||
2065 | 45 | Database BTREE | ||
2066 | 46 | {chosen} 2 | ||
2067 | 47 | |||
2068 | 48 | t v | ||
2069 | 49 | i a | ||
2070 | 50 | n r | ||
2071 | 51 | y c | ||
2072 | 52 | i h | ||
2073 | 53 | n a | ||
2074 | 54 | t r | ||
2075 | 55 | Database === === | ||
2076 | 56 | {chosen} 1 1 | ||
2077 | 57 | |||
2078 | 58 | EOF | ||
2079 | 59 | format_overall_db_stats samples/mysql-schema-002.txt > $TMPDIR/got | ||
2080 | 60 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2081 | 0 | 61 | ||
2082 | === removed file 't/pt-mysql-summary/format_status_variables-01' | |||
2083 | --- t/pt-mysql-summary/format_status_variables-01 2011-08-02 21:14:06 +0000 | |||
2084 | +++ t/pt-mysql-summary/format_status_variables-01 1970-01-01 00:00:00 +0000 | |||
2085 | @@ -1,93 +0,0 @@ | |||
2086 | 1 | #!/bin/bash | ||
2087 | 2 | #format_status_variables | ||
2088 | 3 | |||
2089 | 4 | cat <<EOF > $1 | ||
2090 | 5 | Variable Per day Per second 5 secs | ||
2091 | 6 | Bytes_received 8000000 100 | ||
2092 | 7 | Bytes_sent 35000000 400 | ||
2093 | 8 | Com_admin_commands 20 | ||
2094 | 9 | Com_change_db 1000 | ||
2095 | 10 | Com_delete 8000 | ||
2096 | 11 | Com_insert 8000 | ||
2097 | 12 | Com_lock_tables 200 | ||
2098 | 13 | Com_replace 1250 | ||
2099 | 14 | Com_select 22500 | ||
2100 | 15 | Com_set_option 22500 | ||
2101 | 16 | Com_show_binlogs 10 | ||
2102 | 17 | Com_show_create_db 400 | ||
2103 | 18 | Com_show_create_table 7000 | ||
2104 | 19 | Com_show_databases 125 | ||
2105 | 20 | Com_show_fields 7000 | ||
2106 | 21 | Com_show_innodb_status 300 | ||
2107 | 22 | Com_show_open_tables 10 | ||
2108 | 23 | Com_show_processlist 300 | ||
2109 | 24 | Com_show_slave_status 300 | ||
2110 | 25 | Com_show_status 350 | ||
2111 | 26 | Com_show_storage_engines 10 | ||
2112 | 27 | Com_show_tables 400 | ||
2113 | 28 | Com_show_triggers 7000 | ||
2114 | 29 | Com_show_variables 450 | ||
2115 | 30 | Com_truncate 300 | ||
2116 | 31 | Com_unlock_tables 250 | ||
2117 | 32 | Com_update 900 | ||
2118 | 33 | Connections 2500 | ||
2119 | 34 | Created_tmp_disk_tables 15000 | ||
2120 | 35 | Created_tmp_files 60 | ||
2121 | 36 | Created_tmp_tables 22500 | ||
2122 | 37 | Flush_commands 10 | ||
2123 | 38 | Handler_delete 8000 | ||
2124 | 39 | Handler_read_first 2250 | ||
2125 | 40 | Handler_read_key 30000 | ||
2126 | 41 | Handler_read_next 15000 | ||
2127 | 42 | Handler_read_rnd 9000 | ||
2128 | 43 | Handler_read_rnd_next 300000 3 | ||
2129 | 44 | Handler_update 17500 | ||
2130 | 45 | Handler_write 250000 2 | ||
2131 | 46 | Innodb_buffer_pool_pages_data 225 | ||
2132 | 47 | Innodb_buffer_pool_pages_free 5000 | ||
2133 | 48 | Innodb_buffer_pool_pages_total 6000 | ||
2134 | 49 | Innodb_buffer_pool_read_ahead_rnd 10 | ||
2135 | 50 | Innodb_buffer_pool_read_requests 2250 | ||
2136 | 51 | Innodb_buffer_pool_reads 150 | ||
2137 | 52 | Innodb_data_fsyncs 35 | ||
2138 | 53 | Innodb_data_read 30000000 350 | ||
2139 | 54 | Innodb_data_reads 300 | ||
2140 | 55 | Innodb_data_writes 35 | ||
2141 | 56 | Innodb_data_written 17500 | ||
2142 | 57 | Innodb_log_writes 10 | ||
2143 | 58 | Innodb_os_log_fsyncs 35 | ||
2144 | 59 | Innodb_os_log_written 6000 | ||
2145 | 60 | Innodb_page_size 175000 2 | ||
2146 | 61 | Innodb_pages_read 225 | ||
2147 | 62 | Key_blocks_unused 150000 1 | ||
2148 | 63 | Key_blocks_used 175 | ||
2149 | 64 | Key_read_requests 100000 1 | ||
2150 | 65 | Key_reads 600 | ||
2151 | 66 | Key_write_requests 70000 | ||
2152 | 67 | Key_writes 17500 | ||
2153 | 68 | Max_used_connections 45 | ||
2154 | 69 | Open_files 1500 | ||
2155 | 70 | Open_tables 700 | ||
2156 | 71 | Opened_tables 15000 | ||
2157 | 72 | Qcache_free_blocks 80 | ||
2158 | 73 | Qcache_free_memory 175000000 2250 | ||
2159 | 74 | Qcache_hits 8000 | ||
2160 | 75 | Qcache_inserts 20000 | ||
2161 | 76 | Qcache_not_cached 10000 | ||
2162 | 77 | Qcache_queries_in_cache 225 | ||
2163 | 78 | Qcache_total_blocks 600 | ||
2164 | 79 | Questions 100000 1 | ||
2165 | 80 | Select_scan 25000 | ||
2166 | 81 | Sort_rows 8000 | ||
2167 | 82 | Sort_scan 300 | ||
2168 | 83 | Table_locks_immediate 50000 17500 | ||
2169 | 84 | Table_locks_waited 10 1 | ||
2170 | 85 | Threads_cached 35 | ||
2171 | 86 | Threads_connected 10 | ||
2172 | 87 | Threads_created 45 | ||
2173 | 88 | Threads_running 10 | ||
2174 | 89 | Uptime 90000 1 1 | ||
2175 | 90 | Uptime_since_flush_status 90000 1 | ||
2176 | 91 | EOF | ||
2177 | 92 | |||
2178 | 93 | join samples/mysql-status-00{1,2}.txt > /tmp/percona-toolkit | ||
2179 | 94 | 0 | ||
2180 | === added file 't/pt-mysql-summary/format_status_variables.sh' | |||
2181 | --- t/pt-mysql-summary/format_status_variables.sh 1970-01-01 00:00:00 +0000 | |||
2182 | +++ t/pt-mysql-summary/format_status_variables.sh 2011-08-19 17:39:24 +0000 | |||
2183 | @@ -0,0 +1,96 @@ | |||
2184 | 1 | #!/bin/bash | ||
2185 | 2 | |||
2186 | 3 | TESTS=1 | ||
2187 | 4 | |||
2188 | 5 | cat <<EOF > $TMPDIR/expected | ||
2189 | 6 | Variable Per day Per second 5 secs | ||
2190 | 7 | Bytes_received 8000000 100 | ||
2191 | 8 | Bytes_sent 35000000 400 | ||
2192 | 9 | Com_admin_commands 20 | ||
2193 | 10 | Com_change_db 1000 | ||
2194 | 11 | Com_delete 8000 | ||
2195 | 12 | Com_insert 8000 | ||
2196 | 13 | Com_lock_tables 200 | ||
2197 | 14 | Com_replace 1250 | ||
2198 | 15 | Com_select 22500 | ||
2199 | 16 | Com_set_option 22500 | ||
2200 | 17 | Com_show_binlogs 10 | ||
2201 | 18 | Com_show_create_db 400 | ||
2202 | 19 | Com_show_create_table 7000 | ||
2203 | 20 | Com_show_databases 125 | ||
2204 | 21 | Com_show_fields 7000 | ||
2205 | 22 | Com_show_innodb_status 300 | ||
2206 | 23 | Com_show_open_tables 10 | ||
2207 | 24 | Com_show_processlist 300 | ||
2208 | 25 | Com_show_slave_status 300 | ||
2209 | 26 | Com_show_status 350 | ||
2210 | 27 | Com_show_storage_engines 10 | ||
2211 | 28 | Com_show_tables 400 | ||
2212 | 29 | Com_show_triggers 7000 | ||
2213 | 30 | Com_show_variables 450 | ||
2214 | 31 | Com_truncate 300 | ||
2215 | 32 | Com_unlock_tables 250 | ||
2216 | 33 | Com_update 900 | ||
2217 | 34 | Connections 2500 | ||
2218 | 35 | Created_tmp_disk_tables 15000 | ||
2219 | 36 | Created_tmp_files 60 | ||
2220 | 37 | Created_tmp_tables 22500 | ||
2221 | 38 | Flush_commands 10 | ||
2222 | 39 | Handler_delete 8000 | ||
2223 | 40 | Handler_read_first 2250 | ||
2224 | 41 | Handler_read_key 30000 | ||
2225 | 42 | Handler_read_next 15000 | ||
2226 | 43 | Handler_read_rnd 9000 | ||
2227 | 44 | Handler_read_rnd_next 300000 3 | ||
2228 | 45 | Handler_update 17500 | ||
2229 | 46 | Handler_write 250000 2 | ||
2230 | 47 | Innodb_buffer_pool_pages_data 225 | ||
2231 | 48 | Innodb_buffer_pool_pages_free 5000 | ||
2232 | 49 | Innodb_buffer_pool_pages_total 6000 | ||
2233 | 50 | Innodb_buffer_pool_read_ahead_rnd 10 | ||
2234 | 51 | Innodb_buffer_pool_read_requests 2250 | ||
2235 | 52 | Innodb_buffer_pool_reads 150 | ||
2236 | 53 | Innodb_data_fsyncs 35 | ||
2237 | 54 | Innodb_data_read 30000000 350 | ||
2238 | 55 | Innodb_data_reads 300 | ||
2239 | 56 | Innodb_data_writes 35 | ||
2240 | 57 | Innodb_data_written 17500 | ||
2241 | 58 | Innodb_log_writes 10 | ||
2242 | 59 | Innodb_os_log_fsyncs 35 | ||
2243 | 60 | Innodb_os_log_written 6000 | ||
2244 | 61 | Innodb_page_size 175000 2 | ||
2245 | 62 | Innodb_pages_read 225 | ||
2246 | 63 | Key_blocks_unused 150000 1 | ||
2247 | 64 | Key_blocks_used 175 | ||
2248 | 65 | Key_read_requests 100000 1 | ||
2249 | 66 | Key_reads 600 | ||
2250 | 67 | Key_write_requests 70000 | ||
2251 | 68 | Key_writes 17500 | ||
2252 | 69 | Max_used_connections 45 | ||
2253 | 70 | Open_files 1500 | ||
2254 | 71 | Open_tables 700 | ||
2255 | 72 | Opened_tables 15000 | ||
2256 | 73 | Qcache_free_blocks 80 | ||
2257 | 74 | Qcache_free_memory 175000000 2250 | ||
2258 | 75 | Qcache_hits 8000 | ||
2259 | 76 | Qcache_inserts 20000 | ||
2260 | 77 | Qcache_not_cached 10000 | ||
2261 | 78 | Qcache_queries_in_cache 225 | ||
2262 | 79 | Qcache_total_blocks 600 | ||
2263 | 80 | Questions 100000 1 | ||
2264 | 81 | Select_scan 25000 | ||
2265 | 82 | Sort_rows 8000 | ||
2266 | 83 | Sort_scan 300 | ||
2267 | 84 | Table_locks_immediate 50000 17500 | ||
2268 | 85 | Table_locks_waited 10 1 | ||
2269 | 86 | Threads_cached 35 | ||
2270 | 87 | Threads_connected 10 | ||
2271 | 88 | Threads_created 45 | ||
2272 | 89 | Threads_running 10 | ||
2273 | 90 | Uptime 90000 1 1 | ||
2274 | 91 | Uptime_since_flush_status 90000 1 | ||
2275 | 92 | EOF | ||
2276 | 93 | |||
2277 | 94 | join samples/mysql-status-00{1,2}.txt > $TMPDIR/in | ||
2278 | 95 | format_status_variables $TMPDIR/in > $TMPDIR/got | ||
2279 | 96 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2280 | 0 | 97 | ||
2281 | === removed file 't/pt-mysql-summary/fuzz-01' | |||
2282 | --- t/pt-mysql-summary/fuzz-01 2011-07-01 16:29:50 +0000 | |||
2283 | +++ t/pt-mysql-summary/fuzz-01 1970-01-01 00:00:00 +0000 | |||
2284 | @@ -1,6 +0,0 @@ | |||
2285 | 1 | #!/bin/bash | ||
2286 | 2 | #fuzz 49 | ||
2287 | 3 | |||
2288 | 4 | cat <<EOF > $1 | ||
2289 | 5 | 50 | ||
2290 | 6 | EOF | ||
2291 | 7 | 0 | ||
2292 | === added file 't/pt-mysql-summary/fuzz.sh' | |||
2293 | --- t/pt-mysql-summary/fuzz.sh 1970-01-01 00:00:00 +0000 | |||
2294 | +++ t/pt-mysql-summary/fuzz.sh 2011-08-19 17:39:24 +0000 | |||
2295 | @@ -0,0 +1,6 @@ | |||
2296 | 1 | #!/bin/bash | ||
2297 | 2 | |||
2298 | 3 | TESTS=1 | ||
2299 | 4 | |||
2300 | 5 | TEST_NAME="fuzz 49" | ||
2301 | 6 | is $(fuzz 49) "50" | ||
2302 | 0 | 7 | ||
2303 | === removed file 't/pt-mysql-summary/get-mysql-tz' | |||
2304 | --- t/pt-mysql-summary/get-mysql-tz 2011-08-02 21:14:06 +0000 | |||
2305 | +++ t/pt-mysql-summary/get-mysql-tz 1970-01-01 00:00:00 +0000 | |||
2306 | @@ -1,6 +0,0 @@ | |||
2307 | 1 | #!/bin/bash | ||
2308 | 2 | #get_mysql_timezone | ||
2309 | 3 | |||
2310 | 4 | echo EDT > $1 | ||
2311 | 5 | |||
2312 | 6 | cp samples/mysql-variables-001.txt /tmp/percona-toolkit-mysql-variables | ||
2313 | 7 | 0 | ||
2314 | === removed file 't/pt-mysql-summary/get-mysql-uptime' | |||
2315 | --- t/pt-mysql-summary/get-mysql-uptime 2011-08-02 21:14:06 +0000 | |||
2316 | +++ t/pt-mysql-summary/get-mysql-uptime 1970-01-01 00:00:00 +0000 | |||
2317 | @@ -1,9 +0,0 @@ | |||
2318 | 1 | #!/bin/bash | ||
2319 | 2 | #get_mysql_uptime | ||
2320 | 3 | |||
2321 | 4 | cat <<EOF > $1 | ||
2322 | 5 | 2010-05-27 11:38 (up 0+02:08:52) | ||
2323 | 6 | EOF | ||
2324 | 7 | |||
2325 | 8 | cp samples/mysql-status-001.txt /tmp/percona-toolkit-mysql-status | ||
2326 | 9 | echo "2010-05-27 11:38" > /tmp/percona-toolkit | ||
2327 | 10 | 0 | ||
2328 | === removed file 't/pt-mysql-summary/get-mysql-version' | |||
2329 | --- t/pt-mysql-summary/get-mysql-version 2011-08-02 21:14:06 +0000 | |||
2330 | +++ t/pt-mysql-summary/get-mysql-version 1970-01-01 00:00:00 +0000 | |||
2331 | @@ -1,9 +0,0 @@ | |||
2332 | 1 | #!/bin/bash | ||
2333 | 2 | #get_mysql_version | ||
2334 | 3 | |||
2335 | 4 | cat <<EOF > $1 | ||
2336 | 5 | Version | 5.0.51a-24+lenny2 (Debian) | ||
2337 | 6 | Built On | debian-linux-gnu i486 | ||
2338 | 7 | EOF | ||
2339 | 8 | |||
2340 | 9 | cp samples/mysql-variables-001.txt /tmp/percona-toolkit-mysql-variables | ||
2341 | 10 | 0 | ||
2342 | === added file 't/pt-mysql-summary/get_mysql_info.sh' | |||
2343 | --- t/pt-mysql-summary/get_mysql_info.sh 1970-01-01 00:00:00 +0000 | |||
2344 | +++ t/pt-mysql-summary/get_mysql_info.sh 2011-08-19 17:39:24 +0000 | |||
2345 | @@ -0,0 +1,25 @@ | |||
2346 | 1 | #!/bin/bash | ||
2347 | 2 | |||
2348 | 3 | TESTS=3 | ||
2349 | 4 | |||
2350 | 5 | TEST_NAME="get_mysql_timezone" | ||
2351 | 6 | cp samples/mysql-variables-001.txt /tmp/percona-toolkit-mysql-variables | ||
2352 | 7 | is $(get_mysql_timezone) "EDT" | ||
2353 | 8 | |||
2354 | 9 | TEST_NAME="get_mysql_uptime" | ||
2355 | 10 | cat <<EOF > $TMPDIR/expected | ||
2356 | 11 | 2010-05-27 11:38 (up 0+02:08:52) | ||
2357 | 12 | EOF | ||
2358 | 13 | cp samples/mysql-status-001.txt /tmp/percona-toolkit-mysql-status | ||
2359 | 14 | echo "2010-05-27 11:38" > $TMPDIR/in | ||
2360 | 15 | get_mysql_uptime $TMPDIR/in > $TMPDIR/got | ||
2361 | 16 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2362 | 17 | |||
2363 | 18 | TEST_NAME="get_mysql_version" | ||
2364 | 19 | cat <<EOF > $TMPDIR/expected | ||
2365 | 20 | Version | 5.0.51a-24+lenny2 (Debian) | ||
2366 | 21 | Built On | debian-linux-gnu i486 | ||
2367 | 22 | EOF | ||
2368 | 23 | cp samples/mysql-variables-001.txt /tmp/percona-toolkit-mysql-variables | ||
2369 | 24 | get_mysql_version > $TMPDIR/got | ||
2370 | 25 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2371 | 0 | 26 | ||
2372 | === removed file 't/pt-mysql-summary/overall_db_stats-01' | |||
2373 | --- t/pt-mysql-summary/overall_db_stats-01 2011-08-02 21:14:06 +0000 | |||
2374 | +++ t/pt-mysql-summary/overall_db_stats-01 1970-01-01 00:00:00 +0000 | |||
2375 | @@ -1,33 +0,0 @@ | |||
2376 | 1 | #!/bin/bash | ||
2377 | 2 | #format_overall_db_stats | ||
2378 | 3 | |||
2379 | 4 | cat <<EOF > $1 | ||
2380 | 5 | |||
2381 | 6 | Database Tables Views SPs Trigs Funcs FKs Partn | ||
2382 | 7 | mysql 17 | ||
2383 | 8 | sakila 17 7 3 6 3 22 1 | ||
2384 | 9 | |||
2385 | 10 | Database MyISAM InnoDB | ||
2386 | 11 | mysql 17 | ||
2387 | 12 | sakila 2 15 | ||
2388 | 13 | |||
2389 | 14 | Database BTREE FULLTEXT | ||
2390 | 15 | mysql 24 | ||
2391 | 16 | sakila 63 1 | ||
2392 | 17 | |||
2393 | 18 | c t s e t s i t b l b v d y d m | ||
2394 | 19 | h i e n i m n e l o i a a e e e | ||
2395 | 20 | a m t u n a t x o n g r t a c d | ||
2396 | 21 | r e m y l t b g i c e r i i | ||
2397 | 22 | s i l b n h t m u | ||
2398 | 23 | t n i l t a i a m | ||
2399 | 24 | a t n o r m l i | ||
2400 | 25 | m t b e n | ||
2401 | 26 | p t | ||
2402 | 27 | Database === === === === === === === === === === === === === === === === | ||
2403 | 28 | mysql 38 5 5 69 2 3 16 2 4 1 2 | ||
2404 | 29 | sakila 1 15 1 3 19 26 3 4 1 45 4 1 7 2 | ||
2405 | 30 | |||
2406 | 31 | EOF | ||
2407 | 32 | |||
2408 | 33 | cp samples/mysql-schema-001.txt /tmp/percona-toolkit-mysqldump | ||
2409 | 34 | 0 | ||
2410 | === removed file 't/pt-mysql-summary/overall_db_stats-02' | |||
2411 | --- t/pt-mysql-summary/overall_db_stats-02 2011-08-02 21:14:06 +0000 | |||
2412 | +++ t/pt-mysql-summary/overall_db_stats-02 1970-01-01 00:00:00 +0000 | |||
2413 | @@ -1,27 +0,0 @@ | |||
2414 | 1 | #!/bin/bash | ||
2415 | 2 | #format_overall_db_stats | ||
2416 | 3 | |||
2417 | 4 | cat <<EOF > $1 | ||
2418 | 5 | |||
2419 | 6 | Database Tables Views SPs Trigs Funcs FKs Partn | ||
2420 | 7 | {chosen} 1 | ||
2421 | 8 | |||
2422 | 9 | Database InnoDB | ||
2423 | 10 | {chosen} 1 | ||
2424 | 11 | |||
2425 | 12 | Database BTREE | ||
2426 | 13 | {chosen} 2 | ||
2427 | 14 | |||
2428 | 15 | t v | ||
2429 | 16 | i a | ||
2430 | 17 | n r | ||
2431 | 18 | y c | ||
2432 | 19 | i h | ||
2433 | 20 | n a | ||
2434 | 21 | t r | ||
2435 | 22 | Database === === | ||
2436 | 23 | {chosen} 1 1 | ||
2437 | 24 | |||
2438 | 25 | EOF | ||
2439 | 26 | |||
2440 | 27 | cp samples/mysql-schema-002.txt /tmp/percona-toolkit-mysqldump | ||
2441 | 28 | 0 | ||
2442 | === removed file 't/pt-mysql-summary/parse-master-status-01' | |||
2443 | --- t/pt-mysql-summary/parse-master-status-01 2011-08-02 21:14:06 +0000 | |||
2444 | +++ t/pt-mysql-summary/parse-master-status-01 1970-01-01 00:00:00 +0000 | |||
2445 | @@ -1,9 +0,0 @@ | |||
2446 | 1 | #!/bin/bash | ||
2447 | 2 | #format_binlog_filters | ||
2448 | 3 | |||
2449 | 4 | cat <<EOF > $1 | ||
2450 | 5 | binlog_do_db | foo | ||
2451 | 6 | binlog_ignore_db | mysql,test | ||
2452 | 7 | EOF | ||
2453 | 8 | |||
2454 | 9 | cp samples/mysql-show-master-status-001.txt /tmp/percona-toolkit | ||
2455 | 10 | 0 | ||
2456 | === removed file 't/pt-mysql-summary/parse-mysqld-instances-01' | |||
2457 | --- t/pt-mysql-summary/parse-mysqld-instances-01 2011-08-02 21:14:06 +0000 | |||
2458 | +++ t/pt-mysql-summary/parse-mysqld-instances-01 1970-01-01 00:00:00 +0000 | |||
2459 | @@ -1,12 +0,0 @@ | |||
2460 | 1 | #!/bin/bash | ||
2461 | 2 | #parse_mysqld_instances | ||
2462 | 3 | |||
2463 | 4 | cat <<EOF > $1 | ||
2464 | 5 | Port Data Directory Socket | ||
2465 | 6 | ===== ========================== ====== | ||
2466 | 7 | 3306 /var/lib/mysql /var/run/mysqld/mysqld.sock | ||
2467 | 8 | 12345 /tmp/12345/data /tmp/12345/mysql_sandbox12345.sock | ||
2468 | 9 | 12346 /tmp/12346/data /tmp/12346/mysql_sandbox12346.sock | ||
2469 | 10 | EOF | ||
2470 | 11 | |||
2471 | 12 | cp samples/ps-mysqld-001.txt /tmp/percona-toolkit | ||
2472 | 13 | 0 | ||
2473 | === removed file 't/pt-mysql-summary/parse-mysqld-instances-02' | |||
2474 | --- t/pt-mysql-summary/parse-mysqld-instances-02 2011-08-02 21:14:06 +0000 | |||
2475 | +++ t/pt-mysql-summary/parse-mysqld-instances-02 1970-01-01 00:00:00 +0000 | |||
2476 | @@ -1,10 +0,0 @@ | |||
2477 | 1 | #!/bin/bash | ||
2478 | 2 | #parse_mysqld_instances | ||
2479 | 3 | |||
2480 | 4 | cat <<EOF > $1 | ||
2481 | 5 | Port Data Directory Socket | ||
2482 | 6 | ===== ========================== ====== | ||
2483 | 7 | /var/lib/mysql /var/lib/mysql/mysql.sock | ||
2484 | 8 | EOF | ||
2485 | 9 | |||
2486 | 10 | cp samples/ps-mysqld-002.txt /tmp/percona-toolkit | ||
2487 | 11 | 0 | ||
2488 | === removed file 't/pt-mysql-summary/parse-mysqld-instances-03' | |||
2489 | --- t/pt-mysql-summary/parse-mysqld-instances-03 2011-08-02 21:14:06 +0000 | |||
2490 | +++ t/pt-mysql-summary/parse-mysqld-instances-03 1970-01-01 00:00:00 +0000 | |||
2491 | @@ -1,10 +0,0 @@ | |||
2492 | 1 | #!/bin/bash | ||
2493 | 2 | #parse_mysqld_instances | ||
2494 | 3 | |||
2495 | 4 | cat <<EOF > $1 | ||
2496 | 5 | Port Data Directory Socket | ||
2497 | 6 | ===== ========================== ====== | ||
2498 | 7 | 3306 /mnt/data-store/mysql/data /tmp/mysql.sock | ||
2499 | 8 | EOF | ||
2500 | 9 | |||
2501 | 10 | cp samples/ps-mysqld-003.txt /tmp/percona-toolkit | ||
2502 | 11 | 0 | ||
2503 | === removed file 't/pt-mysql-summary/parse-mysqld-instances-04' | |||
2504 | --- t/pt-mysql-summary/parse-mysqld-instances-04 2011-07-01 16:29:50 +0000 | |||
2505 | +++ t/pt-mysql-summary/parse-mysqld-instances-04 1970-01-01 00:00:00 +0000 | |||
2506 | @@ -1,13 +0,0 @@ | |||
2507 | 1 | #!/bin/bash | ||
2508 | 2 | #parse_mysqld_instances | ||
2509 | 3 | |||
2510 | 4 | cat <<EOF > $1 | ||
2511 | 5 | Port Data Directory Socket | ||
2512 | 6 | ===== ========================== ====== | ||
2513 | 7 | /var/db/mysql | ||
2514 | 8 | EOF | ||
2515 | 9 | |||
2516 | 10 | cat <<EOF > $2 | ||
2517 | 11 | mysql 767 0.0 0.9 3492 1100 v0 I 3:01PM 0:00.07 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/freebsd.hsd1.va.comcast.net..pid | ||
2518 | 12 | mysql 818 0.0 17.4 45292 20584 v0 I 3:01PM 0:02.28 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --user=mysql --log-error=/var/db/mysql/freebsd.hsd1.va.comcast.net..err --pid-file=/var/db/mysql/freebsd.hsd1.va.comcast.net..pid | ||
2519 | 13 | EOF | ||
2520 | 14 | 0 | ||
2521 | === removed file 't/pt-mysql-summary/parse-processlist-01' | |||
2522 | --- t/pt-mysql-summary/parse-processlist-01 2011-08-02 21:14:06 +0000 | |||
2523 | +++ t/pt-mysql-summary/parse-processlist-01 1970-01-01 00:00:00 +0000 | |||
2524 | @@ -1,61 +0,0 @@ | |||
2525 | 1 | #!/bin/bash | ||
2526 | 2 | #summarize_processlist | ||
2527 | 3 | |||
2528 | 4 | cat <<EOF > $1 | ||
2529 | 5 | |||
2530 | 6 | Command COUNT(*) Working SUM(Time) MAX(Time) | ||
2531 | 7 | ------------------------------ -------- ------- --------- --------- | ||
2532 | 8 | Binlog Dump 1 1 9000000 9000000 | ||
2533 | 9 | Connect 2 2 6000000 5000000 | ||
2534 | 10 | Query 2 2 0 0 | ||
2535 | 11 | Sleep 150 0 150000 20000 | ||
2536 | 12 | |||
2537 | 13 | User COUNT(*) Working SUM(Time) MAX(Time) | ||
2538 | 14 | ------------------------------ -------- ------- --------- --------- | ||
2539 | 15 | acjcxx 4 0 0 0 | ||
2540 | 16 | aecac 1 0 0 0 | ||
2541 | 17 | babeecc 20 0 0 0 | ||
2542 | 18 | centous 2 0 0 0 | ||
2543 | 19 | crcpcpc 2 0 0 0 | ||
2544 | 20 | crgcp4c 3 0 0 0 | ||
2545 | 21 | eanecj 30 1 0 0 | ||
2546 | 22 | ebace 10 0 0 0 | ||
2547 | 23 | etace 80 0 0 0 | ||
2548 | 24 | goate 8 0 0 0 | ||
2549 | 25 | qjveec 1 0 0 0 | ||
2550 | 26 | repl 1 1 9000000 9000000 | ||
2551 | 27 | root 1 1 0 0 | ||
2552 | 28 | system user 2 2 6000000 5000000 | ||
2553 | 29 | |||
2554 | 30 | Host COUNT(*) Working SUM(Time) MAX(Time) | ||
2555 | 31 | ------------------------------ -------- ------- --------- --------- | ||
2556 | 32 | 10.14.82.196 6 0 0 0 | ||
2557 | 33 | 10.14.82.202 20 0 0 0 | ||
2558 | 34 | 10.17.85.100 9 0 0 0 | ||
2559 | 35 | 10.17.85.74 1 1 9000000 9000000 | ||
2560 | 36 | 10.17.85.86 35 0 0 0 | ||
2561 | 37 | 10.17.85.88 5 0 0 0 | ||
2562 | 38 | 10.17.85.90 10 0 0 0 | ||
2563 | 39 | 10.36.34.66 35 1 0 0 | ||
2564 | 40 | 2 2 6000000 5000000 | ||
2565 | 41 | localhost 1 1 0 0 | ||
2566 | 42 | someserver.woozle.com11 1 0 0 0 | ||
2567 | 43 | someserver.woozle.com14 1 0 0 0 | ||
2568 | 44 | someserver.woozle.com 40 0 0 0 | ||
2569 | 45 | |||
2570 | 46 | db COUNT(*) Working SUM(Time) MAX(Time) | ||
2571 | 47 | ------------------------------ -------- ------- --------- --------- | ||
2572 | 48 | aetecjc 175 1 0 0 | ||
2573 | 49 | NULL 4 4 15000000 9000000 | ||
2574 | 50 | |||
2575 | 51 | State COUNT(*) Working SUM(Time) MAX(Time) | ||
2576 | 52 | ------------------------------ -------- ------- --------- --------- | ||
2577 | 53 | 150 0 0 0 | ||
2578 | 54 | Has read all relay log; waitin 1 1 300000 300000 | ||
2579 | 55 | Has sent all binlog to slave; 1 1 9000000 9000000 | ||
2580 | 56 | NULL 2 2 0 0 | ||
2581 | 57 | Waiting for master to send eve 1 1 5000000 5000000 | ||
2582 | 58 | |||
2583 | 59 | EOF | ||
2584 | 60 | |||
2585 | 61 | cp samples/processlist-001.txt /tmp/percona-toolkit-mysql-processlist | ||
2586 | 62 | 0 | ||
2587 | === added file 't/pt-mysql-summary/parse_mysqld_instances.sh' | |||
2588 | --- t/pt-mysql-summary/parse_mysqld_instances.sh 1970-01-01 00:00:00 +0000 | |||
2589 | +++ t/pt-mysql-summary/parse_mysqld_instances.sh 2011-08-19 17:39:24 +0000 | |||
2590 | @@ -0,0 +1,46 @@ | |||
2591 | 1 | #!/bin/bash | ||
2592 | 2 | |||
2593 | 3 | TESTS=4 | ||
2594 | 4 | |||
2595 | 5 | TEST_NAME="ps-mysqld-001.txt" | ||
2596 | 6 | cat <<EOF > $TMPDIR/expected | ||
2597 | 7 | Port Data Directory Socket | ||
2598 | 8 | ===== ========================== ====== | ||
2599 | 9 | 3306 /var/lib/mysql /var/run/mysqld/mysqld.sock | ||
2600 | 10 | 12345 /tmp/12345/data /tmp/12345/mysql_sandbox12345.sock | ||
2601 | 11 | 12346 /tmp/12346/data /tmp/12346/mysql_sandbox12346.sock | ||
2602 | 12 | EOF | ||
2603 | 13 | parse_mysqld_instances samples/ps-mysqld-001.txt > $TMPDIR/got | ||
2604 | 14 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2605 | 15 | |||
2606 | 16 | TEST_NAME="ps-mysqld-002.txt" | ||
2607 | 17 | cat <<EOF > $TMPDIR/expected | ||
2608 | 18 | Port Data Directory Socket | ||
2609 | 19 | ===== ========================== ====== | ||
2610 | 20 | /var/lib/mysql /var/lib/mysql/mysql.sock | ||
2611 | 21 | EOF | ||
2612 | 22 | parse_mysqld_instances samples/ps-mysqld-002.txt > $TMPDIR/got | ||
2613 | 23 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2614 | 24 | |||
2615 | 25 | TEST_NAME="ps-mysqld-003.txt" | ||
2616 | 26 | #parse_mysqld_instances | ||
2617 | 27 | cat <<EOF > $TMPDIR/expected | ||
2618 | 28 | Port Data Directory Socket | ||
2619 | 29 | ===== ========================== ====== | ||
2620 | 30 | 3306 /mnt/data-store/mysql/data /tmp/mysql.sock | ||
2621 | 31 | EOF | ||
2622 | 32 | parse_mysqld_instances samples/ps-mysqld-003.txt > $TMPDIR/got | ||
2623 | 33 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2624 | 34 | |||
2625 | 35 | cat <<EOF > $TMPDIR/expected | ||
2626 | 36 | Port Data Directory Socket | ||
2627 | 37 | ===== ========================== ====== | ||
2628 | 38 | /var/db/mysql | ||
2629 | 39 | EOF | ||
2630 | 40 | |||
2631 | 41 | cat <<EOF > $TMPDIR/in | ||
2632 | 42 | mysql 767 0.0 0.9 3492 1100 v0 I 3:01PM 0:00.07 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadir=/var/db/mysql --pid-file=/var/db/mysql/freebsd.hsd1.va.comcast.net..pid | ||
2633 | 43 | mysql 818 0.0 17.4 45292 20584 v0 I 3:01PM 0:02.28 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir=/var/db/mysql --user=mysql --log-error=/var/db/mysql/freebsd.hsd1.va.comcast.net..err --pid-file=/var/db/mysql/freebsd.hsd1.va.comcast.net..pid | ||
2634 | 44 | EOF | ||
2635 | 45 | parse_mysqld_instances $TMPDIR/in > $TMPDIR/got | ||
2636 | 46 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2637 | 0 | 47 | ||
2638 | === removed file 't/pt-mysql-summary/pretty-print-my-cnf-01' | |||
2639 | --- t/pt-mysql-summary/pretty-print-my-cnf-01 2011-08-02 21:14:06 +0000 | |||
2640 | +++ t/pt-mysql-summary/pretty-print-my-cnf-01 1970-01-01 00:00:00 +0000 | |||
2641 | @@ -1,37 +0,0 @@ | |||
2642 | 1 | #!/bin/bash | ||
2643 | 2 | #pretty_print_cnf_file | ||
2644 | 3 | |||
2645 | 4 | cat <<EOF > $1 | ||
2646 | 5 | |||
2647 | 6 | [mysqld] | ||
2648 | 7 | datadir = /mnt/data/mysql | ||
2649 | 8 | socket = /mnt/data/mysql/mysql.sock | ||
2650 | 9 | old_passwords = 1 | ||
2651 | 10 | ssl-key = /opt/mysql.pdns/.cert/server-key.pem | ||
2652 | 11 | ssl-cert = /opt/mysql.pdns/.cert/server-cert.pem | ||
2653 | 12 | ssl-ca = /opt/mysql.pdns/.cert/ca-cert.pem | ||
2654 | 13 | innodb_buffer_pool_size = 16M | ||
2655 | 14 | innodb_flush_method = O_DIRECT | ||
2656 | 15 | innodb_log_file_size = 64M | ||
2657 | 16 | innodb_log_buffer_size = 1M | ||
2658 | 17 | innodb_flush_log_at_trx_commit = 2 | ||
2659 | 18 | innodb_file_per_table = 1 | ||
2660 | 19 | ssl = 1 | ||
2661 | 20 | server-id = 1 | ||
2662 | 21 | log-bin = sl1-bin | ||
2663 | 22 | |||
2664 | 23 | [mysql.server] | ||
2665 | 24 | user = mysql | ||
2666 | 25 | basedir = /mnt/data | ||
2667 | 26 | |||
2668 | 27 | [mysqld_safe] | ||
2669 | 28 | log-error = /var/log/mysqld.log | ||
2670 | 29 | pid-file = /var/run/mysqld/mysqld.pid | ||
2671 | 30 | |||
2672 | 31 | [mysql] | ||
2673 | 32 | |||
2674 | 33 | [xtrabackup] | ||
2675 | 34 | target-dir = /data/backup | ||
2676 | 35 | EOF | ||
2677 | 36 | |||
2678 | 37 | cp samples/my.cnf-001.txt /tmp/percona-toolkit | ||
2679 | 38 | 0 | ||
2680 | === added file 't/pt-mysql-summary/pretty_print_cnf_file.sh' | |||
2681 | --- t/pt-mysql-summary/pretty_print_cnf_file.sh 1970-01-01 00:00:00 +0000 | |||
2682 | +++ t/pt-mysql-summary/pretty_print_cnf_file.sh 2011-08-19 17:39:24 +0000 | |||
2683 | @@ -0,0 +1,39 @@ | |||
2684 | 1 | #!/bin/bash | ||
2685 | 2 | |||
2686 | 3 | TESTS=1 | ||
2687 | 4 | |||
2688 | 5 | cat <<EOF > $TMPDIR/expected | ||
2689 | 6 | |||
2690 | 7 | [mysqld] | ||
2691 | 8 | datadir = /mnt/data/mysql | ||
2692 | 9 | socket = /mnt/data/mysql/mysql.sock | ||
2693 | 10 | old_passwords = 1 | ||
2694 | 11 | ssl-key = /opt/mysql.pdns/.cert/server-key.pem | ||
2695 | 12 | ssl-cert = /opt/mysql.pdns/.cert/server-cert.pem | ||
2696 | 13 | ssl-ca = /opt/mysql.pdns/.cert/ca-cert.pem | ||
2697 | 14 | innodb_buffer_pool_size = 16M | ||
2698 | 15 | innodb_flush_method = O_DIRECT | ||
2699 | 16 | innodb_log_file_size = 64M | ||
2700 | 17 | innodb_log_buffer_size = 1M | ||
2701 | 18 | innodb_flush_log_at_trx_commit = 2 | ||
2702 | 19 | innodb_file_per_table = 1 | ||
2703 | 20 | ssl = 1 | ||
2704 | 21 | server-id = 1 | ||
2705 | 22 | log-bin = sl1-bin | ||
2706 | 23 | |||
2707 | 24 | [mysql.server] | ||
2708 | 25 | user = mysql | ||
2709 | 26 | basedir = /mnt/data | ||
2710 | 27 | |||
2711 | 28 | [mysqld_safe] | ||
2712 | 29 | log-error = /var/log/mysqld.log | ||
2713 | 30 | pid-file = /var/run/mysqld/mysqld.pid | ||
2714 | 31 | |||
2715 | 32 | [mysql] | ||
2716 | 33 | |||
2717 | 34 | [xtrabackup] | ||
2718 | 35 | target-dir = /data/backup | ||
2719 | 36 | EOF | ||
2720 | 37 | |||
2721 | 38 | pretty_print_cnf_file samples/my.cnf-001.txt > $TMPDIR/got | ||
2722 | 39 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2723 | 0 | 40 | ||
2724 | === modified file 't/pt-mysql-summary/pt-mysql-summary.t' | |||
2725 | --- t/pt-mysql-summary/pt-mysql-summary.t 2011-07-12 22:56:55 +0000 | |||
2726 | +++ t/pt-mysql-summary/pt-mysql-summary.t 2011-08-19 17:39:24 +0000 | |||
2727 | @@ -1,4 +1,4 @@ | |||
2729 | 1 | #!/usr/bin/evn perl | 1 | #!/usr/bin/env perl |
2730 | 2 | 2 | ||
2731 | 3 | BEGIN { | 3 | BEGIN { |
2732 | 4 | die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" | 4 | die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" |
2733 | @@ -12,6 +12,8 @@ | |||
2734 | 12 | 12 | ||
2735 | 13 | use PerconaTest; | 13 | use PerconaTest; |
2736 | 14 | 14 | ||
2738 | 15 | system("$trunk/util/test-bash-tool pt-mysql-summary @ARGV"); | 15 | my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/; |
2739 | 16 | push @ARGV, "$trunk/t/$tool/*.sh" unless @ARGV; | ||
2740 | 17 | system("$trunk/util/test-bash-functions $trunk/bin/$tool @ARGV"); | ||
2741 | 16 | 18 | ||
2742 | 17 | exit; | 19 | exit; |
2743 | 18 | 20 | ||
2744 | === removed file 't/pt-mysql-summary/summarize-binlogs-01' | |||
2745 | --- t/pt-mysql-summary/summarize-binlogs-01 2011-08-02 21:14:06 +0000 | |||
2746 | +++ t/pt-mysql-summary/summarize-binlogs-01 1970-01-01 00:00:00 +0000 | |||
2747 | @@ -1,10 +0,0 @@ | |||
2748 | 1 | #!/bin/bash | ||
2749 | 2 | #summarize_binlogs | ||
2750 | 3 | |||
2751 | 4 | cat <<EOF > $1 | ||
2752 | 5 | Binlogs | 20 | ||
2753 | 6 | Zero-Sized | 3 | ||
2754 | 7 | Total Size | 6.5G | ||
2755 | 8 | EOF | ||
2756 | 9 | |||
2757 | 10 | cp samples/mysql-master-logs-001.txt /tmp/percona-toolkit | ||
2758 | 11 | 0 | ||
2759 | === added file 't/pt-mysql-summary/summarize_binlogs.sh' | |||
2760 | --- t/pt-mysql-summary/summarize_binlogs.sh 1970-01-01 00:00:00 +0000 | |||
2761 | +++ t/pt-mysql-summary/summarize_binlogs.sh 2011-08-19 17:39:24 +0000 | |||
2762 | @@ -0,0 +1,12 @@ | |||
2763 | 1 | #!/bin/bash | ||
2764 | 2 | |||
2765 | 3 | TESTS=1 | ||
2766 | 4 | |||
2767 | 5 | cat <<EOF > $TMPDIR/expected | ||
2768 | 6 | Binlogs | 20 | ||
2769 | 7 | Zero-Sized | 3 | ||
2770 | 8 | Total Size | 6.5G | ||
2771 | 9 | EOF | ||
2772 | 10 | |||
2773 | 11 | summarize_binlogs samples/mysql-master-logs-001.txt > $TMPDIR/got | ||
2774 | 12 | no_diff $TMPDIR/expected $TMPDIR/got | ||
2775 | 0 | 13 | ||
2776 | === added file 't/pt-mysql-summary/summarize_processlist.sh' | |||
2777 | --- t/pt-mysql-summary/summarize_processlist.sh 1970-01-01 00:00:00 +0000 | |||
2778 | +++ t/pt-mysql-summary/summarize_processlist.sh 2011-08-19 17:39:24 +0000 | |||
2779 | @@ -0,0 +1,63 @@ | |||
2780 | 1 | #!/bin/bash | ||
2781 | 2 | |||
2782 | 3 | TESTS=1 | ||
2783 | 4 | |||
2784 | 5 | cat <<EOF > $TMPDIR/expected | ||
2785 | 6 | |||
2786 | 7 | Command COUNT(*) Working SUM(Time) MAX(Time) | ||
2787 | 8 | ------------------------------ -------- ------- --------- --------- | ||
2788 | 9 | Binlog Dump 1 1 9000000 9000000 | ||
2789 | 10 | Connect 2 2 6000000 5000000 | ||
2790 | 11 | Query 2 2 0 0 | ||
2791 | 12 | Sleep 150 0 150000 20000 | ||
2792 | 13 | |||
2793 | 14 | User COUNT(*) Working SUM(Time) MAX(Time) | ||
2794 | 15 | ------------------------------ -------- ------- --------- --------- | ||
2795 | 16 | acjcxx 4 0 0 0 | ||
2796 | 17 | aecac 1 0 0 0 | ||
2797 | 18 | babeecc 20 0 0 0 | ||
2798 | 19 | centous 2 0 0 0 | ||
2799 | 20 | crcpcpc 2 0 0 0 | ||
2800 | 21 | crgcp4c 3 0 0 0 | ||
2801 | 22 | eanecj 30 1 0 0 | ||
2802 | 23 | ebace 10 0 0 0 | ||
2803 | 24 | etace 80 0 0 0 | ||
2804 | 25 | goate 8 0 0 0 | ||
2805 | 26 | qjveec 1 0 0 0 | ||
2806 | 27 | repl 1 1 9000000 9000000 | ||
2807 | 28 | root 1 1 0 0 | ||
2808 | 29 | system user 2 2 6000000 5000000 | ||
2809 | 30 | |||
2810 | 31 | Host COUNT(*) Working SUM(Time) MAX(Time) | ||
2811 | 32 | ------------------------------ -------- ------- --------- --------- | ||
2812 | 33 | 10.14.82.196 6 0 0 0 | ||
2813 | 34 | 10.14.82.202 20 0 0 0 | ||
2814 | 35 | 10.17.85.100 9 0 0 0 | ||
2815 | 36 | 10.17.85.74 1 1 9000000 9000000 | ||
2816 | 37 | 10.17.85.86 35 0 0 0 | ||
2817 | 38 | 10.17.85.88 5 0 0 0 | ||
2818 | 39 | 10.17.85.90 10 0 0 0 | ||
2819 | 40 | 10.36.34.66 35 1 0 0 | ||
2820 | 41 | 2 2 6000000 5000000 | ||
2821 | 42 | localhost 1 1 0 0 | ||
2822 | 43 | someserver.woozle.com11 1 0 0 0 | ||
2823 | 44 | someserver.woozle.com14 1 0 0 0 | ||
2824 | 45 | someserver.woozle.com 40 0 0 0 | ||
2825 | 46 | |||
2826 | 47 | db COUNT(*) Working SUM(Time) MAX(Time) | ||
2827 | 48 | ------------------------------ -------- ------- --------- --------- | ||
2828 | 49 | aetecjc 175 1 0 0 | ||
2829 | 50 | NULL 4 4 15000000 9000000 | ||
2830 | 51 | |||
2831 | 52 | State COUNT(*) Working SUM(Time) MAX(Time) | ||
2832 | 53 | ------------------------------ -------- ------- --------- --------- | ||
2833 | 54 | 150 0 0 0 | ||
2834 | 55 | Has read all relay log; waitin 1 1 300000 300000 | ||
2835 | 56 | Has sent all binlog to slave; 1 1 9000000 9000000 | ||
2836 | 57 | NULL 2 2 0 0 | ||
2837 | 58 | Waiting for master to send eve 1 1 5000000 5000000 | ||
2838 | 59 | |||
2839 | 60 | EOF | ||
2840 | 61 | |||
2841 | 62 | summarize_processlist samples/processlist-001.txt > $TMPDIR/got | ||
2842 | 63 | no_diff $TMPDIR/got $TMPDIR/expected | ||
2843 | 0 | 64 | ||
2844 | === removed file 't/pt-pmp/aggregate-stacktrace-01' | |||
2845 | --- t/pt-pmp/aggregate-stacktrace-01 2011-08-02 21:14:06 +0000 | |||
2846 | +++ t/pt-pmp/aggregate-stacktrace-01 1970-01-01 00:00:00 +0000 | |||
2847 | @@ -1,27 +0,0 @@ | |||
2848 | 1 | #!/bin/bash | ||
2849 | 2 | #aggregate_stacktrace 0 /tmp/percona-toolkit | ||
2850 | 3 | |||
2851 | 4 | cat > $1 <<EOF | ||
2852 | 5 | 187 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,open_table,open_tables,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2853 | 6 | 62 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,close_thread_tables,dispatch_command,handle_one_connection,start_thread,clone | ||
2854 | 7 | 39 read,vio_read,my_real_read,my_net_read,handle_one_connection,start_thread,clone | ||
2855 | 8 | 18 pthread_cond_wait,safe_cond_wait,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone | ||
2856 | 9 | 15 pthread_cond_wait,safe_cond_wait,end_thread,handle_one_connection,start_thread,clone | ||
2857 | 10 | 15 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,open_table,open_tables,mysql_update,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2858 | 11 | 12 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,open_table,open_tables,open_and_lock_tables,mysql_insert,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2859 | 12 | 2 __lll_mutex_lock_wait,_L_mutex_lock_107,pthread_mutex_lock,safe_mutex_lock,Log_event::read_log_event,mysql_binlog_send,dispatch_command,handle_one_connection,start_thread,clone | ||
2860 | 13 | 1 select,os_thread_sleep,srv_master_thread,start_thread,clone | ||
2861 | 14 | 1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone | ||
2862 | 15 | 1 select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone | ||
2863 | 16 | 1 select,handle_connections_sockets,main | ||
2864 | 17 | 1 _sanity,_myfree,st_join_table::cleanup,JOIN::cleanup,JOIN::join_free,do_select,JOIN::exec,mysql_select,handle_select,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2865 | 18 | 1 pread64,_os_file_pread,_os_file_read,_fil_io,buf_read_page_low,buf_read_page,buf_page_get_gen,btr_cur_search_to_nth_level,btr_estimate_n_rows_in_range,ha_innobase::records_in_range,check_quick_keys,check_quick_select,get_key_scans_params,SQL_SELECT::test_quick_select,mysql_update,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2866 | 19 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_sanity,_myrealloc,String::realloc,String::append,Log_event::read_log_event,mysql_binlog_send,dispatch_command,handle_one_connection,start_thread,clone | ||
2867 | 20 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_sanity,_mymalloc,_myrealloc,mi_alloc_rec_buff,mi_open,ha_myisam::open,handler::ha_open,open_tmp_table,create_tmp_table,select_union::create_result_table,mysql_derived_prepare,mysql_handle_derived,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2868 | 21 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_sanity,_mymalloc,init_dynamic_array,QUICK_RANGE_SELECT,get_quick_select,TRP_RANGE::make_quick,SQL_SELECT::test_quick_select,make_join_statistics,JOIN::optimize,mysql_select,mysql_derived_filling,mysql_handle_derived,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2869 | 22 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_mymalloc,alloc_root,MYSQLparse,mysql_make_view,open_unireg_entry,open_table,open_tables,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2870 | 23 | 1 __lll_mutex_lock_wait,_L_mutex_lock_107,pthread_mutex_lock,safe_mutex_lock,mi_open,ha_myisam::open,handler::ha_open,open_tmp_table,create_tmp_table,select_union::create_result_table,mysql_derived_prepare,mysql_handle_derived,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2871 | 24 | 1 do_sigwait,sigwait,signal_hand,start_thread,clone | ||
2872 | 25 | EOF | ||
2873 | 26 | |||
2874 | 27 | cp samples/stacktrace-001.txt $2 | ||
2875 | 28 | 0 | ||
2876 | === removed file 't/pt-pmp/aggregate-stacktrace-02' | |||
2877 | --- t/pt-pmp/aggregate-stacktrace-02 2011-08-02 21:14:06 +0000 | |||
2878 | +++ t/pt-pmp/aggregate-stacktrace-02 1970-01-01 00:00:00 +0000 | |||
2879 | @@ -1,19 +0,0 @@ | |||
2880 | 1 | #!/bin/bash | ||
2881 | 2 | #aggregate_stacktrace 0 /tmp/percona-toolkit | ||
2882 | 3 | |||
2883 | 4 | cat > $1 <<EOF | ||
2884 | 5 | 2387 pthread_cond_wait,open_table,open_tables,open_and_lock_tables_derived,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
2885 | 6 | 5 pthread_cond_wait,open_table,open_tables,open_and_lock_tables_derived,mysql_insert,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
2886 | 7 | 4 pthread_cond_wait,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone | ||
2887 | 8 | 4 pthread_cond_wait,open_table,open_tables,open_and_lock_tables_derived,mysql_delete,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
2888 | 9 | 1 select,os_thread_sleep,srv_master_thread,start_thread,clone | ||
2889 | 10 | 1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone | ||
2890 | 11 | 1 select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone | ||
2891 | 12 | 1 select,handle_connections_sockets,main,select | ||
2892 | 13 | 1 read,my_real_read,my_net_read,do_command,handle_one_connection,start_thread,clone | ||
2893 | 14 | 1 pthread_cond_wait,cache_thread,one_thread_per_connection_end,handle_one_connection,start_thread,clone | ||
2894 | 15 | 1 free,ut_free,page_cur_insert_rec_low,btr_cur_optimistic_insert,row_ins_index_entry_low,row_ins_index_entry,row_ins,row_ins_step,row_insert_for_mysql,ha_innobase::write_row,handler::ha_write_row,ha_partition::copy_partitions,ha_partition::change_partitions,handler::ha_change_partitions,mysql_change_partitions,fast_alter_partition_table,mysql_alter_table,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
2895 | 16 | 1 do_sigwait,sigwait,signal_hand,start_thread,clone | ||
2896 | 17 | EOF | ||
2897 | 18 | |||
2898 | 19 | cp samples/stacktrace-002.txt $2 | ||
2899 | 20 | 0 | ||
2900 | === removed file 't/pt-pmp/aggregate-stacktrace-03' | |||
2901 | --- t/pt-pmp/aggregate-stacktrace-03 2011-08-02 21:14:06 +0000 | |||
2902 | +++ t/pt-pmp/aggregate-stacktrace-03 1970-01-01 00:00:00 +0000 | |||
2903 | @@ -1,18 +0,0 @@ | |||
2904 | 1 | #!/bin/bash | ||
2905 | 2 | #aggregate_stacktrace 0 /tmp/percona-toolkit | ||
2906 | 3 | |||
2907 | 4 | cat > $1 <<EOF | ||
2908 | 5 | 35 pthread_cond_wait,end_thread,handle_one_connection,start_thread,clone | ||
2909 | 6 | 20 read,read,vio_read,my_real_read,my_net_read,handle_one_connection,start_thread,clone | ||
2910 | 7 | 18 pthread_cond_wait,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone | ||
2911 | 8 | 3 pthread_cond_wait,MYSQL_LOG::wait_for_update,mysql_binlog_send,dispatch_command,handle_one_connection,start_thread,clone | ||
2912 | 9 | 1 select,os_thread_sleep,srv_master_thread,start_thread,clone | ||
2913 | 10 | 1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone | ||
2914 | 11 | 1 select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone | ||
2915 | 12 | 1 select,handle_connections_sockets,main | ||
2916 | 13 | 1 do_sigwait,sigwait,signal_hand,start_thread,clone | ||
2917 | 14 | 1 btr_search_guess_on_hash,btr_cur_search_to_nth_level,btr_pcur_open_with_no_init,row_search_for_mysql,ha_innobase::index_read,join_read_always_key,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,do_select,JOIN::exec,mysql_select,handle_select,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2918 | 15 | 1 btr_cur_search_to_nth_level,btr_estimate_n_rows_in_range,ha_innobase::records_in_range,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_select,get_key_scans_params,SQL_SELECT::test_quick_select,get_quick_record_count,make_join_statistics,JOIN::optimize,mysql_select,handle_select,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2919 | 16 | EOF | ||
2920 | 17 | |||
2921 | 18 | cp samples/stacktrace-003.txt $2 | ||
2922 | 19 | 0 | ||
2923 | === removed file 't/pt-pmp/aggregate-stacktrace-03-b' | |||
2924 | --- t/pt-pmp/aggregate-stacktrace-03-b 2011-08-02 21:14:06 +0000 | |||
2925 | +++ t/pt-pmp/aggregate-stacktrace-03-b 1970-01-01 00:00:00 +0000 | |||
2926 | @@ -1,16 +0,0 @@ | |||
2927 | 1 | #!/bin/bash | ||
2928 | 2 | #aggregate_stacktrace 2 /tmp/percona-toolkit | ||
2929 | 3 | |||
2930 | 4 | cat > $1 <<EOF | ||
2931 | 5 | 35 pthread_cond_wait,end_thread | ||
2932 | 6 | 20 read,read | ||
2933 | 7 | 18 pthread_cond_wait,os_event_wait_low | ||
2934 | 8 | 3 select,os_thread_sleep | ||
2935 | 9 | 3 pthread_cond_wait,MYSQL_LOG::wait_for_update | ||
2936 | 10 | 1 select,handle_connections_sockets | ||
2937 | 11 | 1 do_sigwait,sigwait | ||
2938 | 12 | 1 btr_search_guess_on_hash,btr_cur_search_to_nth_level | ||
2939 | 13 | 1 btr_cur_search_to_nth_level,btr_estimate_n_rows_in_range | ||
2940 | 14 | EOF | ||
2941 | 15 | |||
2942 | 16 | cp samples/stacktrace-003.txt $2 | ||
2943 | 17 | 0 | ||
2944 | === removed file 't/pt-pmp/aggregate-stacktrace-04' | |||
2945 | --- t/pt-pmp/aggregate-stacktrace-04 2011-08-02 21:14:06 +0000 | |||
2946 | +++ t/pt-pmp/aggregate-stacktrace-04 1970-01-01 00:00:00 +0000 | |||
2947 | @@ -1,12 +0,0 @@ | |||
2948 | 1 | #!/bin/bash | ||
2949 | 2 | #aggregate_stacktrace 0 /tmp/percona-toolkit | ||
2950 | 3 | |||
2951 | 4 | cat > $1 <<EOF | ||
2952 | 5 | 33 pthread_cond_wait,boost::condition_variable::wait,Queue::pop,Worker::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
2953 | 6 | 1 StringBuilder::length,Parser::add,Parser::try_parse_query,Parser::parse_block,Parser::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
2954 | 7 | 1 pthread_cond_wait,boost::thread::join,LogReader::wait,Replay::wait,main | ||
2955 | 8 | 1 pthread_cond_wait,boost::condition_variable::wait,Queue::push,LogReader::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
2956 | 9 | 1 pthread_cond_wait,boost::condition_variable::wait,Queue::pop,Reporter::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
2957 | 10 | EOF | ||
2958 | 11 | |||
2959 | 12 | cp samples/stacktrace-004.txt $2 | ||
2960 | 13 | 0 | ||
2961 | === removed file 't/pt-pmp/aggregate-stacktrace-05' | |||
2962 | --- t/pt-pmp/aggregate-stacktrace-05 2011-08-02 21:14:06 +0000 | |||
2963 | +++ t/pt-pmp/aggregate-stacktrace-05 1970-01-01 00:00:00 +0000 | |||
2964 | @@ -1,13 +0,0 @@ | |||
2965 | 1 | #!/bin/bash | ||
2966 | 2 | #aggregate_stacktrace 0 /tmp/percona-toolkit | ||
2967 | 3 | |||
2968 | 4 | cat > $1 <<EOF | ||
2969 | 5 | 32 read,vio_read_buff,libmysqlclient::??,my_net_read,cli_safe_read,libmysqlclient::??,mysql_real_query,Connection::run,Worker::work,thread_proxy,start_thread,clone,?? | ||
2970 | 6 | 1 pthread_cond_wait,LogReader::work,thread_proxy,start_thread,clone,?? | ||
2971 | 7 | 1 pthread_cond_wait,boost::thread::join,main | ||
2972 | 8 | 1 pthread_cond_wait,boost::condition_variable::wait,Worker::work,thread_proxy,start_thread,clone,?? | ||
2973 | 9 | 1 pthread_cond_wait,boost::condition_variable::wait,Reporter::work,thread_proxy,start_thread,clone,?? | ||
2974 | 10 | 1 pthread_cond_wait,boost::condition_variable::wait,Queue::push,Parser::work,thread_proxy,start_thread,clone,?? | ||
2975 | 11 | EOF | ||
2976 | 12 | |||
2977 | 13 | cp samples/stacktrace-005.txt $2 | ||
2978 | 14 | 0 | ||
2979 | === added file 't/pt-pmp/aggregate_stacktrace.sh' | |||
2980 | --- t/pt-pmp/aggregate_stacktrace.sh 1970-01-01 00:00:00 +0000 | |||
2981 | +++ t/pt-pmp/aggregate_stacktrace.sh 2011-08-19 17:39:24 +0000 | |||
2982 | @@ -0,0 +1,122 @@ | |||
2983 | 1 | #!/usr/bin/env bash | ||
2984 | 2 | |||
2985 | 3 | # This test file must be ran by util/test-bash-functions. | ||
2986 | 4 | |||
2987 | 5 | TESTS=6 | ||
2988 | 6 | |||
2989 | 7 | # ############################################################################ | ||
2990 | 8 | TEST_NAME="stacktrace-001.txt" | ||
2991 | 9 | # ############################################################################ | ||
2992 | 10 | cat > $TMPDIR/expected <<EOF | ||
2993 | 11 | 187 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,open_table,open_tables,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2994 | 12 | 62 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,close_thread_tables,dispatch_command,handle_one_connection,start_thread,clone | ||
2995 | 13 | 39 read,vio_read,my_real_read,my_net_read,handle_one_connection,start_thread,clone | ||
2996 | 14 | 18 pthread_cond_wait,safe_cond_wait,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone | ||
2997 | 15 | 15 pthread_cond_wait,safe_cond_wait,end_thread,handle_one_connection,start_thread,clone | ||
2998 | 16 | 15 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,open_table,open_tables,mysql_update,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
2999 | 17 | 12 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,open_table,open_tables,open_and_lock_tables,mysql_insert,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3000 | 18 | 2 __lll_mutex_lock_wait,_L_mutex_lock_107,pthread_mutex_lock,safe_mutex_lock,Log_event::read_log_event,mysql_binlog_send,dispatch_command,handle_one_connection,start_thread,clone | ||
3001 | 19 | 1 select,os_thread_sleep,srv_master_thread,start_thread,clone | ||
3002 | 20 | 1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone | ||
3003 | 21 | 1 select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone | ||
3004 | 22 | 1 select,handle_connections_sockets,main | ||
3005 | 23 | 1 _sanity,_myfree,st_join_table::cleanup,JOIN::cleanup,JOIN::join_free,do_select,JOIN::exec,mysql_select,handle_select,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3006 | 24 | 1 pread64,_os_file_pread,_os_file_read,_fil_io,buf_read_page_low,buf_read_page,buf_page_get_gen,btr_cur_search_to_nth_level,btr_estimate_n_rows_in_range,ha_innobase::records_in_range,check_quick_keys,check_quick_select,get_key_scans_params,SQL_SELECT::test_quick_select,mysql_update,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3007 | 25 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_sanity,_myrealloc,String::realloc,String::append,Log_event::read_log_event,mysql_binlog_send,dispatch_command,handle_one_connection,start_thread,clone | ||
3008 | 26 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_sanity,_mymalloc,_myrealloc,mi_alloc_rec_buff,mi_open,ha_myisam::open,handler::ha_open,open_tmp_table,create_tmp_table,select_union::create_result_table,mysql_derived_prepare,mysql_handle_derived,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3009 | 27 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_sanity,_mymalloc,init_dynamic_array,QUICK_RANGE_SELECT,get_quick_select,TRP_RANGE::make_quick,SQL_SELECT::test_quick_select,make_join_statistics,JOIN::optimize,mysql_select,mysql_derived_filling,mysql_handle_derived,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3010 | 28 | 1 __lll_mutex_lock_wait,_L_mutex_lock_1133,pthread_mutex_lock,safe_mutex_lock,_mymalloc,alloc_root,MYSQLparse,mysql_make_view,open_unireg_entry,open_table,open_tables,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3011 | 29 | 1 __lll_mutex_lock_wait,_L_mutex_lock_107,pthread_mutex_lock,safe_mutex_lock,mi_open,ha_myisam::open,handler::ha_open,open_tmp_table,create_tmp_table,select_union::create_result_table,mysql_derived_prepare,mysql_handle_derived,open_and_lock_tables,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3012 | 30 | 1 do_sigwait,sigwait,signal_hand,start_thread,clone | ||
3013 | 31 | EOF | ||
3014 | 32 | |||
3015 | 33 | aggregate_stacktrace 0 samples/stacktrace-001.txt > $TMPDIR/got | ||
3016 | 34 | no_diff $TMPDIR/got $TMPDIR/expected | ||
3017 | 35 | |||
3018 | 36 | # ############################################################################ | ||
3019 | 37 | TEST_NAME="stacktrace-002.txt" | ||
3020 | 38 | # ############################################################################ | ||
3021 | 39 | cat > $TMPDIR/expected <<EOF | ||
3022 | 40 | 2387 pthread_cond_wait,open_table,open_tables,open_and_lock_tables_derived,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
3023 | 41 | 5 pthread_cond_wait,open_table,open_tables,open_and_lock_tables_derived,mysql_insert,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
3024 | 42 | 4 pthread_cond_wait,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone | ||
3025 | 43 | 4 pthread_cond_wait,open_table,open_tables,open_and_lock_tables_derived,mysql_delete,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
3026 | 44 | 1 select,os_thread_sleep,srv_master_thread,start_thread,clone | ||
3027 | 45 | 1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone | ||
3028 | 46 | 1 select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone | ||
3029 | 47 | 1 select,handle_connections_sockets,main,select | ||
3030 | 48 | 1 read,my_real_read,my_net_read,do_command,handle_one_connection,start_thread,clone | ||
3031 | 49 | 1 pthread_cond_wait,cache_thread,one_thread_per_connection_end,handle_one_connection,start_thread,clone | ||
3032 | 50 | 1 free,ut_free,page_cur_insert_rec_low,btr_cur_optimistic_insert,row_ins_index_entry_low,row_ins_index_entry,row_ins,row_ins_step,row_insert_for_mysql,ha_innobase::write_row,handler::ha_write_row,ha_partition::copy_partitions,ha_partition::change_partitions,handler::ha_change_partitions,mysql_change_partitions,fast_alter_partition_table,mysql_alter_table,mysql_execute_command,mysql_parse,dispatch_command,do_command,handle_one_connection,start_thread,clone | ||
3033 | 51 | 1 do_sigwait,sigwait,signal_hand,start_thread,clone | ||
3034 | 52 | EOF | ||
3035 | 53 | |||
3036 | 54 | aggregate_stacktrace 0 samples/stacktrace-002.txt > $TMPDIR/got | ||
3037 | 55 | no_diff $TMPDIR/got $TMPDIR/expected | ||
3038 | 56 | |||
3039 | 57 | # ############################################################################ | ||
3040 | 58 | TEST_NAME="stacktrace-003.txt" | ||
3041 | 59 | # ############################################################################ | ||
3042 | 60 | cat > $TMPDIR/expected <<EOF | ||
3043 | 61 | 35 pthread_cond_wait,end_thread,handle_one_connection,start_thread,clone | ||
3044 | 62 | 20 read,read,vio_read,my_real_read,my_net_read,handle_one_connection,start_thread,clone | ||
3045 | 63 | 18 pthread_cond_wait,os_event_wait_low,os_aio_simulated_handle,fil_aio_wait,io_handler_thread,start_thread,clone | ||
3046 | 64 | 3 pthread_cond_wait,MYSQL_LOG::wait_for_update,mysql_binlog_send,dispatch_command,handle_one_connection,start_thread,clone | ||
3047 | 65 | 1 select,os_thread_sleep,srv_master_thread,start_thread,clone | ||
3048 | 66 | 1 select,os_thread_sleep,srv_lock_timeout_and_monitor_thread,start_thread,clone | ||
3049 | 67 | 1 select,os_thread_sleep,srv_error_monitor_thread,start_thread,clone | ||
3050 | 68 | 1 select,handle_connections_sockets,main | ||
3051 | 69 | 1 do_sigwait,sigwait,signal_hand,start_thread,clone | ||
3052 | 70 | 1 btr_search_guess_on_hash,btr_cur_search_to_nth_level,btr_pcur_open_with_no_init,row_search_for_mysql,ha_innobase::index_read,join_read_always_key,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,evaluate_join_record,sub_select,do_select,JOIN::exec,mysql_select,handle_select,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3053 | 71 | 1 btr_cur_search_to_nth_level,btr_estimate_n_rows_in_range,ha_innobase::records_in_range,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_keys,check_quick_select,get_key_scans_params,SQL_SELECT::test_quick_select,get_quick_record_count,make_join_statistics,JOIN::optimize,mysql_select,handle_select,mysql_execute_command,mysql_parse,dispatch_command,handle_one_connection,start_thread,clone | ||
3054 | 72 | EOF | ||
3055 | 73 | |||
3056 | 74 | aggregate_stacktrace 0 samples/stacktrace-003.txt > $TMPDIR/got | ||
3057 | 75 | no_diff $TMPDIR/got $TMPDIR/expected | ||
3058 | 76 | |||
3059 | 77 | # ############################################################################ | ||
3060 | 78 | TEST_NAME="stacktrace-003-b.txt" | ||
3061 | 79 | # ############################################################################ | ||
3062 | 80 | cat > $TMPDIR/expected <<EOF | ||
3063 | 81 | 35 pthread_cond_wait,end_thread | ||
3064 | 82 | 20 read,read | ||
3065 | 83 | 18 pthread_cond_wait,os_event_wait_low | ||
3066 | 84 | 3 select,os_thread_sleep | ||
3067 | 85 | 3 pthread_cond_wait,MYSQL_LOG::wait_for_update | ||
3068 | 86 | 1 select,handle_connections_sockets | ||
3069 | 87 | 1 do_sigwait,sigwait | ||
3070 | 88 | 1 btr_search_guess_on_hash,btr_cur_search_to_nth_level | ||
3071 | 89 | 1 btr_cur_search_to_nth_level,btr_estimate_n_rows_in_range | ||
3072 | 90 | EOF | ||
3073 | 91 | |||
3074 | 92 | aggregate_stacktrace 2 samples/stacktrace-003.txt > $TMPDIR/got | ||
3075 | 93 | no_diff $TMPDIR/got $TMPDIR/expected | ||
3076 | 94 | |||
3077 | 95 | # ############################################################################ | ||
3078 | 96 | TEST_NAME="stacktrace-004.txt" | ||
3079 | 97 | # ############################################################################ | ||
3080 | 98 | cat > $TMPDIR/expected <<EOF | ||
3081 | 99 | 33 pthread_cond_wait,boost::condition_variable::wait,Queue::pop,Worker::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
3082 | 100 | 1 StringBuilder::length,Parser::add,Parser::try_parse_query,Parser::parse_block,Parser::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
3083 | 101 | 1 pthread_cond_wait,boost::thread::join,LogReader::wait,Replay::wait,main | ||
3084 | 102 | 1 pthread_cond_wait,boost::condition_variable::wait,Queue::push,LogReader::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
3085 | 103 | 1 pthread_cond_wait,boost::condition_variable::wait,Queue::pop,Reporter::work,boost::_mfi::mf0::operator,boost::_bi::list1::operator,boost::_bi::bind_t::operator,boost::detail::thread_data::run,thread_proxy,start_thread,clone,?? | ||
3086 | 104 | EOF | ||
3087 | 105 | |||
3088 | 106 | aggregate_stacktrace 0 samples/stacktrace-004.txt > $TMPDIR/got | ||
3089 | 107 | no_diff $TMPDIR/got $TMPDIR/expected | ||
3090 | 108 | |||
3091 | 109 | # ############################################################################ | ||
3092 | 110 | TEST_NAME="stacktrace-005.txt" | ||
3093 | 111 | # ############################################################################ | ||
3094 | 112 | cat > $TMPDIR/expected <<EOF | ||
3095 | 113 | 32 read,vio_read_buff,libmysqlclient::??,my_net_read,cli_safe_read,libmysqlclient::??,mysql_real_query,Connection::run,Worker::work,thread_proxy,start_thread,clone,?? | ||
3096 | 114 | 1 pthread_cond_wait,LogReader::work,thread_proxy,start_thread,clone,?? | ||
3097 | 115 | 1 pthread_cond_wait,boost::thread::join,main | ||
3098 | 116 | 1 pthread_cond_wait,boost::condition_variable::wait,Worker::work,thread_proxy,start_thread,clone,?? | ||
3099 | 117 | 1 pthread_cond_wait,boost::condition_variable::wait,Reporter::work,thread_proxy,start_thread,clone,?? | ||
3100 | 118 | 1 pthread_cond_wait,boost::condition_variable::wait,Queue::push,Parser::work,thread_proxy,start_thread,clone,?? | ||
3101 | 119 | EOF | ||
3102 | 120 | |||
3103 | 121 | aggregate_stacktrace 0 samples/stacktrace-005.txt > $TMPDIR/got | ||
3104 | 122 | no_diff $TMPDIR/got $TMPDIR/expected | ||
3105 | 0 | 123 | ||
3106 | === modified file 't/pt-pmp/pt-pmp.t' | |||
3107 | --- t/pt-pmp/pt-pmp.t 2011-07-12 22:56:55 +0000 | |||
3108 | +++ t/pt-pmp/pt-pmp.t 2011-08-19 17:39:24 +0000 | |||
3109 | @@ -1,4 +1,4 @@ | |||
3111 | 1 | #!/usr/bin/evn perl | 1 | #!/usr/bin/env perl |
3112 | 2 | 2 | ||
3113 | 3 | BEGIN { | 3 | BEGIN { |
3114 | 4 | die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" | 4 | die "The PERCONA_TOOLKIT_BRANCH environment variable is not set.\n" |
3115 | @@ -12,6 +12,8 @@ | |||
3116 | 12 | 12 | ||
3117 | 13 | use PerconaTest; | 13 | use PerconaTest; |
3118 | 14 | 14 | ||
3120 | 15 | system("$trunk/util/test-bash-tool pt-pmp @ARGV"); | 15 | my ($tool) = $PROGRAM_NAME =~ m/([\w-]+)\.t$/; |
3121 | 16 | push @ARGV, "$trunk/t/$tool/*.sh" unless @ARGV; | ||
3122 | 17 | system("$trunk/util/test-bash-functions $trunk/bin/$tool @ARGV"); | ||
3123 | 16 | 18 | ||
3124 | 17 | exit; | 19 | exit; |
3125 | 18 | 20 | ||
3126 | === removed file 't/pt-summary/format-filesystems-01' | |||
3127 | --- t/pt-summary/format-filesystems-01 2011-07-01 16:29:50 +0000 | |||
3128 | +++ t/pt-summary/format-filesystems-01 1970-01-01 00:00:00 +0000 | |||
3129 | @@ -1,9 +0,0 @@ | |||
3130 | 1 | #!/bin/bash | ||
3131 | 2 | #parse_filesystems samples/df-mount-001.txt Linux | ||
3132 | 3 | |||
3133 | 4 | cat <<EOF > $1 | ||
3134 | 5 | Filesystem Size Used Type Opts Mountpoint | ||
3135 | 6 | /dev/mapper/vg_ginger-lv_root 454G 6% ext4 rw / | ||
3136 | 7 | /dev/sda1 194M 31% ext4 rw /boot | ||
3137 | 8 | tmpfs 2.0G 1% tmpfs rw /dev/shm | ||
3138 | 9 | EOF | ||
3139 | 10 | 0 | ||
3140 | === removed file 't/pt-summary/format-filesystems-02' | |||
3141 | --- t/pt-summary/format-filesystems-02 2011-07-01 16:29:50 +0000 | |||
3142 | +++ t/pt-summary/format-filesystems-02 1970-01-01 00:00:00 +0000 | |||
3143 | @@ -1,10 +0,0 @@ | |||
3144 | 1 | #!/bin/bash | ||
3145 | 2 | #parse_filesystems samples/df-mount-002.txt Linux | ||
3146 | 3 | |||
3147 | 4 | cat <<EOF > $1 | ||
3148 | 5 | Filesystem Size Used Type Opts Mountpoint | ||
3149 | 6 | /dev/mapper/VolGroup00-LogVol00 62G 56% ext3 rw / | ||
3150 | 7 | /dev/mapper/VolGroup01-MySQLData00 67G 20% ext3 rw /var/lib/mysql | ||
3151 | 8 | /dev/sda3 190M 11% ext3 rw /boot | ||
3152 | 9 | tmpfs 7.9G 0% tmpfs rw /dev/shm | ||
3153 | 10 | EOF | ||
3154 | 11 | 0 | ||
3155 | === removed file 't/pt-summary/format-filesystems-03' | |||
3156 | --- t/pt-summary/format-filesystems-03 2011-07-01 16:29:50 +0000 | |||
3157 | +++ t/pt-summary/format-filesystems-03 1970-01-01 00:00:00 +0000 | |||
3158 | @@ -1,9 +0,0 @@ | |||
3159 | 1 | #!/bin/bash | ||
3160 | 2 | #parse_filesystems samples/df-mount-003.txt Linux | ||
3161 | 3 | |||
3162 | 4 | cat <<EOF > $1 | ||
3163 | 5 | Filesystem Size Used Type Opts Mountpoint | ||
3164 | 6 | /dev/sda1 99M 13% ext3 rw /boot | ||
3165 | 7 | /dev/sda2 540G 89% ext3 rw / | ||
3166 | 8 | tmpfs 48G 0% tmpfs rw /dev/shm | ||
3167 | 9 | EOF | ||
3168 | 10 | 0 | ||
3169 | === removed file 't/pt-summary/format-filesystems-04' | |||
3170 | --- t/pt-summary/format-filesystems-04 2011-07-01 16:29:50 +0000 | |||
3171 | +++ t/pt-summary/format-filesystems-04 1970-01-01 00:00:00 +0000 | |||
3172 | @@ -1,13 +0,0 @@ | |||
3173 | 1 | #!/bin/bash | ||
3174 | 2 | #parse_filesystems samples/df-mount-004.txt Linux | ||
3175 | 3 | |||
3176 | 4 | cat <<EOF > $1 | ||
3177 | 5 | Filesystem Size Used Type Opts Mountpoint | ||
3178 | 6 | /dev/sda1 9.9G 34% ext3 rw / | ||
3179 | 7 | /dev/sdb 414G 1% ext3 rw /mnt | ||
3180 | 8 | none 7.6G 0% devpts rw,gid=5,mode=620 /dev/shm | ||
3181 | 9 | none 7.6G 0% tmpfs rw /dev/shm | ||
3182 | 10 | none 7.6G 0% binfmt_misc rw /dev/shm | ||
3183 | 11 | none 7.6G 0% proc rw /dev/shm | ||
3184 | 12 | none 7.6G 0% sysfs rw /dev/shm | ||
3185 | 13 | EOF | ||
3186 | 14 | 0 | ||
3187 | === removed file 't/pt-summary/format-filesystems-05' | |||
3188 | --- t/pt-summary/format-filesystems-05 2011-07-01 16:29:50 +0000 | |||
3189 | +++ t/pt-summary/format-filesystems-05 1970-01-01 00:00:00 +0000 | |||
3190 | @@ -1,11 +0,0 @@ | |||
3191 | 1 | #!/bin/bash | ||
3192 | 2 | #parse_filesystems samples/df-mount-005.txt Linux | ||
3193 | 3 | |||
3194 | 4 | cat <<EOF > $1 | ||
3195 | 5 | Filesystem Size Used Type Opts Mountpoint | ||
3196 | 6 | /dev/cciss/c0d0p1 99M 24% ext3 rw /boot | ||
3197 | 7 | /dev/mapper/VolGroup00-LogVol00 194G 58% ext3 rw / | ||
3198 | 8 | /dev/mapper/VolGroup00-mysql_log 191G 4% ext3 rw /data/mysql-log | ||
3199 | 9 | /dev/mapper/VolGroup01-mysql_data 1008G 44% ext3 rw,noatime /data/mysql-data | ||
3200 | 10 | tmpfs 48G 0% tmpfs rw /dev/shm | ||
3201 | 11 | EOF | ||
3202 | 12 | 0 | ||
3203 | === removed file 't/pt-summary/format-filesystems-06' | |||
3204 | --- t/pt-summary/format-filesystems-06 2011-07-01 16:29:50 +0000 | |||
3205 | +++ t/pt-summary/format-filesystems-06 1970-01-01 00:00:00 +0000 | |||
3206 | @@ -1,13 +0,0 @@ | |||
3207 | 1 | #!/bin/bash | ||
3208 | 2 | #parse_filesystems samples/df-mount-006.txt FreeBSD | ||
3209 | 3 | |||
3210 | 4 | # This one is from FreeBSD. | ||
3211 | 5 | |||
3212 | 6 | cat <<EOF > $1 | ||
3213 | 7 | Filesystem Size Used Type Opts Mountpoint | ||
3214 | 8 | /dev/ad0s1a 496M 32% ufs local / | ||
3215 | 9 | /dev/ad0s1d 1.1G 1% ufs local, soft-updates /var | ||
3216 | 10 | /dev/ad0s1e 496M 0% ufs local, soft-updates /tmp | ||
3217 | 11 | /dev/ad0s1f 17G 9% ufs local, soft-updates /usr | ||
3218 | 12 | devfs 1.0K 100% devfs local /dev | ||
3219 | 13 | EOF | ||
3220 | 14 | 0 | ||
3221 | === renamed file 't/pt-summary/vmstat-simplify' => 't/pt-summary/format_vmstat.sh' (properties changed: +x to -x) | |||
3222 | --- t/pt-summary/vmstat-simplify 2011-07-01 16:29:50 +0000 | |||
3223 | +++ t/pt-summary/format_vmstat.sh 2011-08-19 17:39:24 +0000 | |||
3224 | @@ -1,7 +1,21 @@ | |||
3225 | 1 | #!/bin/bash | 1 | #!/bin/bash |
3229 | 2 | #format_vmstat | 2 | |
3230 | 3 | 3 | cat <<EOF > $TMPDIR/in | |
3231 | 4 | cat <<EOF > $1 | 4 | procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ |
3232 | 5 | r b swpd free buff cache si so bi bo in cs us sy id wa st | ||
3233 | 6 | 0 0 68 288220 372588 13534140 0 0 24 138 1 1 4 1 94 1 0 | ||
3234 | 7 | 1 0 68 288080 372588 13534184 0 0 0 187 721 943 3 0 96 0 0 | ||
3235 | 8 | 0 0 68 287708 372588 13534276 0 0 0 1058 747 992 8 3 89 0 0 | ||
3236 | 9 | 1 0 68 287468 372588 13534340 0 0 0 1058 552 856 15 2 84 0 0 | ||
3237 | 10 | 1 0 68 287460 372588 13534388 0 0 0 322 859 1014 10 3 87 0 0 | ||
3238 | 11 | 0 0 68 287460 372588 13534444 0 0 0 214 612 729 10 3 88 0 0 | ||
3239 | 12 | 0 0 68 287460 372588 13534484 0 0 0 309 553 741 0 0 99 0 0 | ||
3240 | 13 | 1 0 68 287460 372588 13534532 0 0 2 197 605 727 2 1 97 0 0 | ||
3241 | 14 | 0 0 68 287344 372588 13534596 0 0 0 1037 485 626 0 0 99 0 0 | ||
3242 | 15 | 0 0 68 287220 372588 13534656 0 0 0 235 875 1004 0 0 99 0 0 | ||
3243 | 16 | EOF | ||
3244 | 17 | |||
3245 | 18 | cat <<EOF > $TMPDIR/expected | ||
3246 | 5 | procs ---swap-- -----io---- ---system---- --------cpu-------- | 19 | procs ---swap-- -----io---- ---system---- --------cpu-------- |
3247 | 6 | r b si so bi bo ir cs us sy il wa st | 20 | r b si so bi bo ir cs us sy il wa st |
3248 | 7 | 0 0 0 0 25 150 1 1 4 1 94 1 0 | 21 | 0 0 0 0 25 150 1 1 4 1 94 1 0 |
3249 | @@ -16,17 +30,5 @@ | |||
3250 | 16 | 0 0 0 0 0 225 900 1000 0 0 99 0 0 | 30 | 0 0 0 0 0 225 900 1000 0 0 99 0 0 |
3251 | 17 | EOF | 31 | EOF |
3252 | 18 | 32 | ||
3267 | 19 | cat <<EOF > $2 | 33 | format_vmstat $TMPDIR/in > $TMPDIR/got |
3268 | 20 | procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------ | 34 | no_diff $TMPDIR/got $TMPDIR/expected |
3255 | 21 | r b swpd free buff cache si so bi bo in cs us sy id wa st | ||
3256 | 22 | 0 0 68 288220 372588 13534140 0 0 24 138 1 1 4 1 94 1 0 | ||
3257 | 23 | 1 0 68 288080 372588 13534184 0 0 0 187 721 943 3 0 96 0 0 | ||
3258 | 24 | 0 0 68 287708 372588 13534276 0 0 0 1058 747 992 8 3 89 0 0 | ||
3259 | 25 | 1 0 68 287468 372588 13534340 0 0 0 1058 552 856 15 2 84 0 0 | ||
3260 | 26 | 1 0 68 287460 372588 13534388 0 0 0 322 859 1014 10 3 87 0 0 | ||
3261 | 27 | 0 0 68 287460 372588 13534444 0 0 0 214 612 729 10 3 88 0 0 | ||
3262 | 28 | 0 0 68 287460 372588 13534484 0 0 0 309 553 741 0 0 99 0 0 | ||
3263 | 29 | 1 0 68 287460 372588 13534532 0 0 2 197 605 727 2 1 97 0 0 | ||
3264 | 30 | 0 0 68 287344 372588 13534596 0 0 0 1037 485 626 0 0 99 0 0 | ||
3265 | 31 | 0 0 68 287220 372588 13534656 0 0 0 235 875 1004 0 0 99 0 0 | ||
3266 | 32 | EOF | ||
3269 | 33 | 35 | ||
3270 | === removed file 't/pt-summary/fusionmpt-01' | |||
3271 | --- t/pt-summary/fusionmpt-01 2011-07-01 16:29:50 +0000 | |||
3272 | +++ t/pt-summary/fusionmpt-01 1970-01-01 00:00:00 +0000 | |||
3273 | @@ -1,19 +0,0 @@ | |||
3274 | 1 | #!/bin/bash | ||
3275 | 2 | #parse_fusionmpt_lsiutil | ||
3276 | 3 | |||
3277 | 4 | cat <<EOF > $1 | ||
3278 | 5 | |||
3279 | 6 | /proc/mpt/ioc0 LSI Logic SAS1068E B3 MPT 105 Firmware 00192f00 IOC 0 | ||
3280 | 7 | B___T___L Type Vendor Product Rev SASAddress PhyNum | ||
3281 | 8 | 0 0 0 Disk Dell VIRTUAL DISK 1028 | ||
3282 | 9 | 0 2 0 Disk Dell VIRTUAL DISK 1028 | ||
3283 | 10 | 0 8 0 EnclServ DP BACKPLANE 1.05 510240805f4feb00 8 | ||
3284 | 11 | Hidden RAID Devices: | ||
3285 | 12 | B___T Device Vendor Product Rev SASAddress PhyNum | ||
3286 | 13 | 0 1 PhysDisk 0 SEAGATE ST373455SS S52A 5000c50012a8ac61 1 | ||
3287 | 14 | 0 9 PhysDisk 1 SEAGATE ST373455SS S52A 5000c50012a8a24d 0 | ||
3288 | 15 | 0 3 PhysDisk 2 SEAGATE ST3146855SS S52A 5000c500130fcaed 3 | ||
3289 | 16 | 0 10 PhysDisk 3 SEAGATE ST3146855SS S52A 5000c500131093f5 2 | ||
3290 | 17 | EOF | ||
3291 | 18 | |||
3292 | 19 | cat samples/lsiutil-001.txt > $2 | ||
3293 | 20 | 0 | ||
3294 | === removed file 't/pt-summary/fusionmpt-02' | |||
3295 | --- t/pt-summary/fusionmpt-02 2011-07-01 16:29:50 +0000 | |||
3296 | +++ t/pt-summary/fusionmpt-02 1970-01-01 00:00:00 +0000 | |||
3297 | @@ -1,15 +0,0 @@ | |||
3298 | 1 | #!/bin/bash | ||
3299 | 2 | #parse_fusionmpt_lsiutil | ||
3300 | 3 | |||
3301 | 4 | cat <<EOF > $1 | ||
3302 | 5 | |||
3303 | 6 | /proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0 | ||
3304 | 7 | B___T___L Type Vendor Product Rev SASAddress PhyNum | ||
3305 | 8 | 0 1 0 Disk LSILOGIC Logical Volume 3000 | ||
3306 | 9 | Hidden RAID Devices: | ||
3307 | 10 | B___T Device Vendor Product Rev SASAddress PhyNum | ||
3308 | 11 | 0 2 PhysDisk 0 IBM-ESXS ST9300603SS F B536 5000c5001d784329 1 | ||
3309 | 12 | 0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17152 0 | ||
3310 | 13 | EOF | ||
3311 | 14 | |||
3312 | 15 | cat samples/lsiutil-002.txt > $2 | ||
3313 | 16 | 0 | ||
3314 | === removed file 't/pt-summary/fusionmpt-03' | |||
3315 | --- t/pt-summary/fusionmpt-03 2011-07-01 16:29:50 +0000 | |||
3316 | +++ t/pt-summary/fusionmpt-03 1970-01-01 00:00:00 +0000 | |||
3317 | @@ -1,15 +0,0 @@ | |||
3318 | 1 | #!/bin/bash | ||
3319 | 2 | #parse_fusionmpt_lsiutil | ||
3320 | 3 | |||
3321 | 4 | cat <<EOF > $1 | ||
3322 | 5 | |||
3323 | 6 | /proc/mpt/ioc0 LSI Logic SAS1064E B3 MPT 105 Firmware 011e0000 IOC 0 | ||
3324 | 7 | B___T___L Type Vendor Product Rev SASAddress PhyNum | ||
3325 | 8 | 0 1 0 Disk LSILOGIC Logical Volume 3000 | ||
3326 | 9 | Hidden RAID Devices: | ||
3327 | 10 | B___T Device Vendor Product Rev SASAddress PhyNum | ||
3328 | 11 | 0 2 PhysDisk 0 IBM-ESXS MBD2300RC SB17 500000e113c00ed2 1 | ||
3329 | 12 | 0 3 PhysDisk 1 IBM-ESXS MBD2300RC SB17 500000e113c17ee2 0 | ||
3330 | 13 | EOF | ||
3331 | 14 | |||
3332 | 15 | cat samples/lsiutil-003.txt > $2 | ||
3333 | 16 | 0 | ||
3334 | === removed file 't/pt-summary/lsi-megaraid-bbu-status' | |||
3335 | --- t/pt-summary/lsi-megaraid-bbu-status 2011-07-01 16:29:50 +0000 | |||
3336 | +++ t/pt-summary/lsi-megaraid-bbu-status 1970-01-01 00:00:00 +0000 | |||
3337 | @@ -1,38 +0,0 @@ | |||
3338 | 1 | #!/bin/bash | ||
3339 | 2 | #parse_lsi_megaraid_bbu_status | ||
3340 | 3 | |||
3341 | 4 | cat <<EOF > $1 | ||
3342 | 5 | BBU | 100% Charged, Temperature 18C, isSOHGood=Yes | ||
3343 | 6 | EOF | ||
3344 | 7 | |||
3345 | 8 | cat <<EOF > $2 | ||
3346 | 9 | BBU status for Adapter: 0 | ||
3347 | 10 | |||
3348 | 11 | BatteryType: BBU | ||
3349 | 12 | Voltage: 4072 mV | ||
3350 | 13 | Current: 0 mA | ||
3351 | 14 | Temperature: 18 C | ||
3352 | 15 | Firmware Status: 00000000 | ||
3353 | 16 | |||
3354 | 17 | Battery state: | ||
3355 | 18 | |||
3356 | 19 | GasGuageStatus: | ||
3357 | 20 | Fully Discharged : No | ||
3358 | 21 | Fully Charged : Yes | ||
3359 | 22 | Discharging : Yes | ||
3360 | 23 | Initialized : Yes | ||
3361 | 24 | Remaining Time Alarm : No | ||
3362 | 25 | Remaining Capacity Alarm: No | ||
3363 | 26 | Discharge Terminated : No | ||
3364 | 27 | Over Temperature : No | ||
3365 | 28 | Charging Terminated : No | ||
3366 | 29 | Over Charged : No | ||
3367 | 30 | |||
3368 | 31 | Relative State of Charge: 100 % | ||
3369 | 32 | Charger Status: Complete | ||
3370 | 33 | Remaining Capacity: 867 mAh | ||
3371 | 34 | Full Charge Capacity: 867 mAh | ||
3372 | 35 | isSOHGood: Yes | ||
3373 | 36 | |||
3374 | 37 | Exit Code: 0x00 | ||
3375 | 38 | EOF | ||
3376 | 39 | 0 | ||
3377 | === removed file 't/pt-summary/lsi-megaraid-devices-0' | |||
3378 | --- t/pt-summary/lsi-megaraid-devices-0 2011-07-01 16:29:50 +0000 | |||
3379 | +++ t/pt-summary/lsi-megaraid-devices-0 1970-01-01 00:00:00 +0000 | |||
3380 | @@ -1,100 +0,0 @@ | |||
3381 | 1 | #!/bin/bash | ||
3382 | 2 | #parse_lsi_megaraid_devices | ||
3383 | 3 | |||
3384 | 4 | cat <<EOF > $1 | ||
3385 | 5 | |||
3386 | 6 | PhysiclDev Type State Errors Vendor Model Size | ||
3387 | 7 | ========== ==== ======= ====== ======= ============ =========== | ||
3388 | 8 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3389 | 9 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3390 | 10 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3391 | 11 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3392 | 12 | EOF | ||
3393 | 13 | |||
3394 | 14 | cat <<EOF > $2 | ||
3395 | 15 | |||
3396 | 16 | Adapter #0 | ||
3397 | 17 | |||
3398 | 18 | Enclosure Device ID: 32 | ||
3399 | 19 | Slot Number: 0 | ||
3400 | 20 | Device Id: 0 | ||
3401 | 21 | Sequence Number: 2 | ||
3402 | 22 | Media Error Count: 0 | ||
3403 | 23 | Other Error Count: 0 | ||
3404 | 24 | Predictive Failure Count: 0 | ||
3405 | 25 | Last Predictive Failure Event Seq Number: 0 | ||
3406 | 26 | PD Type: SAS | ||
3407 | 27 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3408 | 28 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3409 | 29 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3410 | 30 | Firmware state: Online | ||
3411 | 31 | SAS Address(0): 0x5000c500079f8cf9 | ||
3412 | 32 | SAS Address(1): 0x0 | ||
3413 | 33 | Connected Port Number: 0(path0) | ||
3414 | 34 | Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33 | ||
3415 | 35 | Foreign State: None | ||
3416 | 36 | Media Type: Hard Disk Device | ||
3417 | 37 | |||
3418 | 38 | Enclosure Device ID: 32 | ||
3419 | 39 | Slot Number: 1 | ||
3420 | 40 | Device Id: 1 | ||
3421 | 41 | Sequence Number: 2 | ||
3422 | 42 | Media Error Count: 0 | ||
3423 | 43 | Other Error Count: 0 | ||
3424 | 44 | Predictive Failure Count: 0 | ||
3425 | 45 | Last Predictive Failure Event Seq Number: 0 | ||
3426 | 46 | PD Type: SAS | ||
3427 | 47 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3428 | 48 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3429 | 49 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3430 | 50 | Firmware state: Online | ||
3431 | 51 | SAS Address(0): 0x5000c500079f5c35 | ||
3432 | 52 | SAS Address(1): 0x0 | ||
3433 | 53 | Connected Port Number: 1(path0) | ||
3434 | 54 | Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH | ||
3435 | 55 | Foreign State: None | ||
3436 | 56 | Media Type: Hard Disk Device | ||
3437 | 57 | |||
3438 | 58 | Enclosure Device ID: 32 | ||
3439 | 59 | Slot Number: 2 | ||
3440 | 60 | Device Id: 2 | ||
3441 | 61 | Sequence Number: 2 | ||
3442 | 62 | Media Error Count: 0 | ||
3443 | 63 | Other Error Count: 0 | ||
3444 | 64 | Predictive Failure Count: 0 | ||
3445 | 65 | Last Predictive Failure Event Seq Number: 0 | ||
3446 | 66 | PD Type: SAS | ||
3447 | 67 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3448 | 68 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3449 | 69 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3450 | 70 | Firmware state: Online | ||
3451 | 71 | SAS Address(0): 0x5000c500079fc0c9 | ||
3452 | 72 | SAS Address(1): 0x0 | ||
3453 | 73 | Connected Port Number: 2(path0) | ||
3454 | 74 | Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST | ||
3455 | 75 | Foreign State: None | ||
3456 | 76 | Media Type: Hard Disk Device | ||
3457 | 77 | |||
3458 | 78 | Enclosure Device ID: 32 | ||
3459 | 79 | Slot Number: 3 | ||
3460 | 80 | Device Id: 3 | ||
3461 | 81 | Sequence Number: 2 | ||
3462 | 82 | Media Error Count: 0 | ||
3463 | 83 | Other Error Count: 0 | ||
3464 | 84 | Predictive Failure Count: 0 | ||
3465 | 85 | Last Predictive Failure Event Seq Number: 0 | ||
3466 | 86 | PD Type: SAS | ||
3467 | 87 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3468 | 88 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3469 | 89 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3470 | 90 | Firmware state: Online | ||
3471 | 91 | SAS Address(0): 0x5000c500079dc339 | ||
3472 | 92 | SAS Address(1): 0x0 | ||
3473 | 93 | Connected Port Number: 3(path0) | ||
3474 | 94 | Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5 | ||
3475 | 95 | Foreign State: None | ||
3476 | 96 | Media Type: Hard Disk Device | ||
3477 | 97 | |||
3478 | 98 | |||
3479 | 99 | Exit Code: 0x00 | ||
3480 | 100 | EOF | ||
3481 | 101 | 0 | ||
3482 | === removed file 't/pt-summary/lsi-megaraid-devices-1' | |||
3483 | --- t/pt-summary/lsi-megaraid-devices-1 2011-07-01 16:29:50 +0000 | |||
3484 | +++ t/pt-summary/lsi-megaraid-devices-1 1970-01-01 00:00:00 +0000 | |||
3485 | @@ -1,134 +0,0 @@ | |||
3486 | 1 | #!/bin/bash | ||
3487 | 2 | #parse_lsi_megaraid_devices | ||
3488 | 3 | |||
3489 | 4 | cat <<EOF > $1 | ||
3490 | 5 | |||
3491 | 6 | PhysiclDev Type State Errors Vendor Model Size | ||
3492 | 7 | ========== ==== ======= ====== ======= ============ =========== | ||
3493 | 8 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3494 | 9 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3495 | 10 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3496 | 11 | Hard Disk SAS Online 0/0/0 SEAGATE ST373455SS 70007MB | ||
3497 | 12 | EOF | ||
3498 | 13 | |||
3499 | 14 | cat <<EOF > $2 | ||
3500 | 15 | [root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL | ||
3501 | 16 | |||
3502 | 17 | Adapter #0 | ||
3503 | 18 | |||
3504 | 19 | Number of Virtual Disks: 2 | ||
3505 | 20 | Virtual Disk: 0 (Target Id: 0) | ||
3506 | 21 | Name: | ||
3507 | 22 | RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
3508 | 23 | Size:69376MB | ||
3509 | 24 | State: Optimal | ||
3510 | 25 | Stripe Size: 64kB | ||
3511 | 26 | Number Of Drives:2 | ||
3512 | 27 | Span Depth:1 | ||
3513 | 28 | Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3514 | 29 | Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3515 | 30 | Access Policy: Read/Write | ||
3516 | 31 | Disk Cache Policy: Disk's Default | ||
3517 | 32 | Number of Spans: 1 | ||
3518 | 33 | Span: 0 - Number of PDs: 2 | ||
3519 | 34 | PD: 0 Information | ||
3520 | 35 | Enclosure Device ID: 32 | ||
3521 | 36 | Slot Number: 0 | ||
3522 | 37 | Device Id: 0 | ||
3523 | 38 | Sequence Number: 2 | ||
3524 | 39 | Media Error Count: 0 | ||
3525 | 40 | Other Error Count: 0 | ||
3526 | 41 | Predictive Failure Count: 0 | ||
3527 | 42 | Last Predictive Failure Event Seq Number: 0 | ||
3528 | 43 | PD Type: SAS | ||
3529 | 44 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3530 | 45 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3531 | 46 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3532 | 47 | Firmware state: Online | ||
3533 | 48 | SAS Address(0): 0x5000c500079f8cf9 | ||
3534 | 49 | SAS Address(1): 0x0 | ||
3535 | 50 | Connected Port Number: 0(path0) | ||
3536 | 51 | Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33 | ||
3537 | 52 | Foreign State: None | ||
3538 | 53 | Media Type: Hard Disk Device | ||
3539 | 54 | |||
3540 | 55 | PD: 1 Information | ||
3541 | 56 | Enclosure Device ID: 32 | ||
3542 | 57 | Slot Number: 1 | ||
3543 | 58 | Device Id: 1 | ||
3544 | 59 | Sequence Number: 2 | ||
3545 | 60 | Media Error Count: 0 | ||
3546 | 61 | Other Error Count: 0 | ||
3547 | 62 | Predictive Failure Count: 0 | ||
3548 | 63 | Last Predictive Failure Event Seq Number: 0 | ||
3549 | 64 | PD Type: SAS | ||
3550 | 65 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3551 | 66 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3552 | 67 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3553 | 68 | Firmware state: Online | ||
3554 | 69 | SAS Address(0): 0x5000c500079f5c35 | ||
3555 | 70 | SAS Address(1): 0x0 | ||
3556 | 71 | Connected Port Number: 1(path0) | ||
3557 | 72 | Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH | ||
3558 | 73 | Foreign State: None | ||
3559 | 74 | Media Type: Hard Disk Device | ||
3560 | 75 | |||
3561 | 76 | Virtual Disk: 1 (Target Id: 1) | ||
3562 | 77 | Name: | ||
3563 | 78 | RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
3564 | 79 | Size:69376MB | ||
3565 | 80 | State: Optimal | ||
3566 | 81 | Stripe Size: 64kB | ||
3567 | 82 | Number Of Drives:2 | ||
3568 | 83 | Span Depth:1 | ||
3569 | 84 | Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3570 | 85 | Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3571 | 86 | Access Policy: Read/Write | ||
3572 | 87 | Disk Cache Policy: Disk's Default | ||
3573 | 88 | Number of Spans: 1 | ||
3574 | 89 | Span: 0 - Number of PDs: 2 | ||
3575 | 90 | PD: 0 Information | ||
3576 | 91 | Enclosure Device ID: 32 | ||
3577 | 92 | Slot Number: 2 | ||
3578 | 93 | Device Id: 2 | ||
3579 | 94 | Sequence Number: 2 | ||
3580 | 95 | Media Error Count: 0 | ||
3581 | 96 | Other Error Count: 0 | ||
3582 | 97 | Predictive Failure Count: 0 | ||
3583 | 98 | Last Predictive Failure Event Seq Number: 0 | ||
3584 | 99 | PD Type: SAS | ||
3585 | 100 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3586 | 101 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3587 | 102 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3588 | 103 | Firmware state: Online | ||
3589 | 104 | SAS Address(0): 0x5000c500079fc0c9 | ||
3590 | 105 | SAS Address(1): 0x0 | ||
3591 | 106 | Connected Port Number: 2(path0) | ||
3592 | 107 | Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST | ||
3593 | 108 | Foreign State: None | ||
3594 | 109 | Media Type: Hard Disk Device | ||
3595 | 110 | |||
3596 | 111 | PD: 1 Information | ||
3597 | 112 | Enclosure Device ID: 32 | ||
3598 | 113 | Slot Number: 3 | ||
3599 | 114 | Device Id: 3 | ||
3600 | 115 | Sequence Number: 2 | ||
3601 | 116 | Media Error Count: 0 | ||
3602 | 117 | Other Error Count: 0 | ||
3603 | 118 | Predictive Failure Count: 0 | ||
3604 | 119 | Last Predictive Failure Event Seq Number: 0 | ||
3605 | 120 | PD Type: SAS | ||
3606 | 121 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3607 | 122 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3608 | 123 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3609 | 124 | Firmware state: Online | ||
3610 | 125 | SAS Address(0): 0x5000c500079dc339 | ||
3611 | 126 | SAS Address(1): 0x0 | ||
3612 | 127 | Connected Port Number: 3(path0) | ||
3613 | 128 | Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5 | ||
3614 | 129 | Foreign State: None | ||
3615 | 130 | Media Type: Hard Disk Device | ||
3616 | 131 | |||
3617 | 132 | |||
3618 | 133 | Exit Code: 0x00 | ||
3619 | 134 | EOF | ||
3620 | 135 | 0 | ||
3621 | === removed file 't/pt-summary/lsi-megaraid-vdevices-0' | |||
3622 | --- t/pt-summary/lsi-megaraid-vdevices-0 2011-07-01 16:29:50 +0000 | |||
3623 | +++ t/pt-summary/lsi-megaraid-vdevices-0 1970-01-01 00:00:00 +0000 | |||
3624 | @@ -1,132 +0,0 @@ | |||
3625 | 1 | #!/bin/bash | ||
3626 | 2 | #parse_lsi_megaraid_virtual_devices | ||
3627 | 3 | |||
3628 | 4 | cat <<EOF > $1 | ||
3629 | 5 | |||
3630 | 6 | VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache | ||
3631 | 7 | ========== ========= ========== ===== ======= ====== ======= ========= | ||
3632 | 8 | 0(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA | ||
3633 | 9 | 1(no name) 69376MB 1 (1-0-0) 2 1-1 64kB Optimal WB, no RA | ||
3634 | 10 | EOF | ||
3635 | 11 | |||
3636 | 12 | cat <<EOF > $2 | ||
3637 | 13 | [root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LdPdInfo -aALL | ||
3638 | 14 | |||
3639 | 15 | Adapter #0 | ||
3640 | 16 | |||
3641 | 17 | Number of Virtual Disks: 2 | ||
3642 | 18 | Virtual Disk: 0 (Target Id: 0) | ||
3643 | 19 | Name: | ||
3644 | 20 | RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
3645 | 21 | Size:69376MB | ||
3646 | 22 | State: Optimal | ||
3647 | 23 | Stripe Size: 64kB | ||
3648 | 24 | Number Of Drives:2 | ||
3649 | 25 | Span Depth:1 | ||
3650 | 26 | Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3651 | 27 | Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3652 | 28 | Access Policy: Read/Write | ||
3653 | 29 | Disk Cache Policy: Disk's Default | ||
3654 | 30 | Number of Spans: 1 | ||
3655 | 31 | Span: 0 - Number of PDs: 2 | ||
3656 | 32 | PD: 0 Information | ||
3657 | 33 | Enclosure Device ID: 32 | ||
3658 | 34 | Slot Number: 0 | ||
3659 | 35 | Device Id: 0 | ||
3660 | 36 | Sequence Number: 2 | ||
3661 | 37 | Media Error Count: 0 | ||
3662 | 38 | Other Error Count: 0 | ||
3663 | 39 | Predictive Failure Count: 0 | ||
3664 | 40 | Last Predictive Failure Event Seq Number: 0 | ||
3665 | 41 | PD Type: SAS | ||
3666 | 42 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3667 | 43 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3668 | 44 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3669 | 45 | Firmware state: Online | ||
3670 | 46 | SAS Address(0): 0x5000c500079f8cf9 | ||
3671 | 47 | SAS Address(1): 0x0 | ||
3672 | 48 | Connected Port Number: 0(path0) | ||
3673 | 49 | Inquiry Data: SEAGATE ST373455SS S5273LQ2DZ33 | ||
3674 | 50 | Foreign State: None | ||
3675 | 51 | Media Type: Hard Disk Device | ||
3676 | 52 | |||
3677 | 53 | PD: 1 Information | ||
3678 | 54 | Enclosure Device ID: 32 | ||
3679 | 55 | Slot Number: 1 | ||
3680 | 56 | Device Id: 1 | ||
3681 | 57 | Sequence Number: 2 | ||
3682 | 58 | Media Error Count: 0 | ||
3683 | 59 | Other Error Count: 0 | ||
3684 | 60 | Predictive Failure Count: 0 | ||
3685 | 61 | Last Predictive Failure Event Seq Number: 0 | ||
3686 | 62 | PD Type: SAS | ||
3687 | 63 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3688 | 64 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3689 | 65 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3690 | 66 | Firmware state: Online | ||
3691 | 67 | SAS Address(0): 0x5000c500079f5c35 | ||
3692 | 68 | SAS Address(1): 0x0 | ||
3693 | 69 | Connected Port Number: 1(path0) | ||
3694 | 70 | Inquiry Data: SEAGATE ST373455SS S5273LQ2D9RH | ||
3695 | 71 | Foreign State: None | ||
3696 | 72 | Media Type: Hard Disk Device | ||
3697 | 73 | |||
3698 | 74 | Virtual Disk: 1 (Target Id: 1) | ||
3699 | 75 | Name: | ||
3700 | 76 | RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
3701 | 77 | Size:69376MB | ||
3702 | 78 | State: Optimal | ||
3703 | 79 | Stripe Size: 64kB | ||
3704 | 80 | Number Of Drives:2 | ||
3705 | 81 | Span Depth:1 | ||
3706 | 82 | Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3707 | 83 | Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3708 | 84 | Access Policy: Read/Write | ||
3709 | 85 | Disk Cache Policy: Disk's Default | ||
3710 | 86 | Number of Spans: 1 | ||
3711 | 87 | Span: 0 - Number of PDs: 2 | ||
3712 | 88 | PD: 0 Information | ||
3713 | 89 | Enclosure Device ID: 32 | ||
3714 | 90 | Slot Number: 2 | ||
3715 | 91 | Device Id: 2 | ||
3716 | 92 | Sequence Number: 2 | ||
3717 | 93 | Media Error Count: 0 | ||
3718 | 94 | Other Error Count: 0 | ||
3719 | 95 | Predictive Failure Count: 0 | ||
3720 | 96 | Last Predictive Failure Event Seq Number: 0 | ||
3721 | 97 | PD Type: SAS | ||
3722 | 98 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3723 | 99 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3724 | 100 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3725 | 101 | Firmware state: Online | ||
3726 | 102 | SAS Address(0): 0x5000c500079fc0c9 | ||
3727 | 103 | SAS Address(1): 0x0 | ||
3728 | 104 | Connected Port Number: 2(path0) | ||
3729 | 105 | Inquiry Data: SEAGATE ST373455SS S5273LQ2DPST | ||
3730 | 106 | Foreign State: None | ||
3731 | 107 | Media Type: Hard Disk Device | ||
3732 | 108 | |||
3733 | 109 | PD: 1 Information | ||
3734 | 110 | Enclosure Device ID: 32 | ||
3735 | 111 | Slot Number: 3 | ||
3736 | 112 | Device Id: 3 | ||
3737 | 113 | Sequence Number: 2 | ||
3738 | 114 | Media Error Count: 0 | ||
3739 | 115 | Other Error Count: 0 | ||
3740 | 116 | Predictive Failure Count: 0 | ||
3741 | 117 | Last Predictive Failure Event Seq Number: 0 | ||
3742 | 118 | PD Type: SAS | ||
3743 | 119 | Raw Size: 70007MB [0x88bb93a Sectors] | ||
3744 | 120 | Non Coerced Size: 69495MB [0x87bb93a Sectors] | ||
3745 | 121 | Coerced Size: 69376MB [0x8780000 Sectors] | ||
3746 | 122 | Firmware state: Online | ||
3747 | 123 | SAS Address(0): 0x5000c500079dc339 | ||
3748 | 124 | SAS Address(1): 0x0 | ||
3749 | 125 | Connected Port Number: 3(path0) | ||
3750 | 126 | Inquiry Data: SEAGATE ST373455SS S5273LQ2CKD5 | ||
3751 | 127 | Foreign State: None | ||
3752 | 128 | Media Type: Hard Disk Device | ||
3753 | 129 | |||
3754 | 130 | |||
3755 | 131 | Exit Code: 0x00 | ||
3756 | 132 | EOF | ||
3757 | 133 | 0 | ||
3758 | === removed file 't/pt-summary/lsi-megaraid-vdevices-1' | |||
3759 | --- t/pt-summary/lsi-megaraid-vdevices-1 2011-07-01 16:29:50 +0000 | |||
3760 | +++ t/pt-summary/lsi-megaraid-vdevices-1 1970-01-01 00:00:00 +0000 | |||
3761 | @@ -1,43 +0,0 @@ | |||
3762 | 1 | #!/bin/bash | ||
3763 | 2 | #parse_lsi_megaraid_virtual_devices | ||
3764 | 3 | |||
3765 | 4 | cat <<EOF > $1 | ||
3766 | 5 | |||
3767 | 6 | VirtualDev Size RAID Level Disks SpnDpth Stripe Status Cache | ||
3768 | 7 | ========== ========= ========== ===== ======= ====== ======= ========= | ||
3769 | 8 | 0(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA | ||
3770 | 9 | 1(no name) 69376MB 1 (1-0-0) 2 1- 64kB Optimal WB, no RA | ||
3771 | 10 | EOF | ||
3772 | 11 | |||
3773 | 12 | cat <<EOF > $2 | ||
3774 | 13 | [root@pc-db1 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll | ||
3775 | 14 | |||
3776 | 15 | |||
3777 | 16 | Adapter 0 -- Virtual Drive Information: | ||
3778 | 17 | Virtual Disk: 0 (Target Id: 0) | ||
3779 | 18 | Name: | ||
3780 | 19 | RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
3781 | 20 | Size:69376MB | ||
3782 | 21 | State: Optimal | ||
3783 | 22 | Stripe Size: 64kB | ||
3784 | 23 | Number Of Drives:2 | ||
3785 | 24 | Span Depth:1 | ||
3786 | 25 | Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3787 | 26 | Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3788 | 27 | Access Policy: Read/Write | ||
3789 | 28 | Disk Cache Policy: Disk's Default | ||
3790 | 29 | Virtual Disk: 1 (Target Id: 1) | ||
3791 | 30 | Name: | ||
3792 | 31 | RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0 | ||
3793 | 32 | Size:69376MB | ||
3794 | 33 | State: Optimal | ||
3795 | 34 | Stripe Size: 64kB | ||
3796 | 35 | Number Of Drives:2 | ||
3797 | 36 | Span Depth:1 | ||
3798 | 37 | Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3799 | 38 | Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU | ||
3800 | 39 | Access Policy: Read/Write | ||
3801 | 40 | Disk Cache Policy: Disk's Default | ||
3802 | 41 | |||
3803 | 42 | Exit Code: 0x00 | ||
3804 | 43 | EOF | ||
3805 | 44 | 0 | ||
3806 | === removed file 't/pt-summary/netstat-summary-01' | |||
3807 | --- t/pt-summary/netstat-summary-01 2011-07-01 16:29:50 +0000 | |||
3808 | +++ t/pt-summary/netstat-summary-01 1970-01-01 00:00:00 +0000 | |||
3809 | @@ -1,17 +0,0 @@ | |||
3810 | 1 | #!/bin/bash | ||
3811 | 2 | #parse_netstat | ||
3812 | 3 | |||
3813 | 4 | cat <<EOF > $1 | ||
3814 | 5 | Connections from remote IP addresses | ||
3815 | 6 | 192.168.243.72 1 | ||
3816 | 7 | 192.168.243.81 2 | ||
3817 | 8 | Connections to local IP addresses | ||
3818 | 9 | 192.168.243.71 3 | ||
3819 | 10 | Connections to top 10 local ports | ||
3820 | 11 | 3306 3 | ||
3821 | 12 | States of connections | ||
3822 | 13 | ESTABLISHED 4 | ||
3823 | 14 | LISTEN 15 | ||
3824 | 15 | EOF | ||
3825 | 16 | |||
3826 | 17 | cat samples/netstat-001.txt > $2 | ||
3827 | 18 | 0 | ||
3828 | === removed file 't/pt-summary/netstat-summary-02' | |||
3829 | --- t/pt-summary/netstat-summary-02 2011-07-01 16:29:50 +0000 | |||
3830 | +++ t/pt-summary/netstat-summary-02 1970-01-01 00:00:00 +0000 | |||
3831 | @@ -1,30 +0,0 @@ | |||
3832 | 1 | #!/bin/bash | ||
3833 | 2 | #parse_netstat | ||
3834 | 3 | |||
3835 | 4 | cat <<EOF > $1 | ||
3836 | 5 | Connections from remote IP addresses | ||
3837 | 6 | 10.8.0.12 6 | ||
3838 | 7 | 10.8.0.14 2 | ||
3839 | 8 | 10.8.0.65 1 | ||
3840 | 9 | 10.8.0.76 25 | ||
3841 | 10 | 10.8.0.77 1 | ||
3842 | 11 | 192.168.5.77 2 | ||
3843 | 12 | Connections to local IP addresses | ||
3844 | 13 | 10.8.0.75 35 | ||
3845 | 14 | Connections to top 10 local ports | ||
3846 | 15 | 22 1 | ||
3847 | 16 | 3306 25 | ||
3848 | 17 | 37570 1 | ||
3849 | 18 | 51071 1 | ||
3850 | 19 | 51072 1 | ||
3851 | 20 | 51073 1 | ||
3852 | 21 | 51074 1 | ||
3853 | 22 | 52300 1 | ||
3854 | 23 | 60757 1 | ||
3855 | 24 | States of connections | ||
3856 | 25 | ESTABLISHED 30 | ||
3857 | 26 | LISTEN 3 | ||
3858 | 27 | TIME_WAIT 3 | ||
3859 | 28 | EOF | ||
3860 | 29 | |||
3861 | 30 | cat samples/netstat-003.txt > $2 | ||
3862 | 31 | 0 | ||
3863 | === removed file 't/pt-summary/parse-arcconf-01' | |||
3864 | --- t/pt-summary/parse-arcconf-01 2011-07-01 16:29:50 +0000 | |||
3865 | +++ t/pt-summary/parse-arcconf-01 1970-01-01 00:00:00 +0000 | |||
3866 | @@ -1,154 +0,0 @@ | |||
3867 | 1 | #!/bin/bash | ||
3868 | 2 | #parse_arcconf | ||
3869 | 3 | |||
3870 | 4 | cat <<EOF > $1 | ||
3871 | 5 | Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal | ||
3872 | 6 | Battery | 99%, 3d1h11m remaining, Optimal | ||
3873 | 7 | |||
3874 | 8 | LogicalDev Size RAID Disks Stripe Status Cache | ||
3875 | 9 | ========== ========= ==== ===== ====== ======= ======= | ||
3876 | 10 | raid10 279800 MB 10 4 256 KB Optimal On (WB) | ||
3877 | 11 | |||
3878 | 12 | PhysiclDev State Speed Vendor Model Size Cache | ||
3879 | 13 | ========== ======= ============= ======= ============ =========== ======= | ||
3880 | 14 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146855SS 140014 MB On (WB) | ||
3881 | 15 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146356SS 140014 MB On (WB) | ||
3882 | 16 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146356SS 140014 MB On (WB) | ||
3883 | 17 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3146855SS 140014 MB On (WB) | ||
3884 | 18 | EOF | ||
3885 | 19 | |||
3886 | 20 | cat <<EOF > $2 | ||
3887 | 21 | # /usr/StorMan/arcconf getconfig 1 | ||
3888 | 22 | Controllers found: 1 | ||
3889 | 23 | ---------------------------------------------------------------------- | ||
3890 | 24 | Controller information | ||
3891 | 25 | ---------------------------------------------------------------------- | ||
3892 | 26 | Controller Status : Optimal | ||
3893 | 27 | Channel description : SAS/SATA | ||
3894 | 28 | Controller Model : Adaptec 3405 | ||
3895 | 29 | Controller Serial Number : 8C16103E017 | ||
3896 | 30 | Physical Slot : 1 | ||
3897 | 31 | Temperature : 35 C/ 95 F (Normal) | ||
3898 | 32 | Installed memory : 128 MB | ||
3899 | 33 | Copyback : Disabled | ||
3900 | 34 | Background consistency check : Disabled | ||
3901 | 35 | Automatic Failover : Enabled | ||
3902 | 36 | Global task priority : High | ||
3903 | 37 | Stayawake period : Disabled | ||
3904 | 38 | Spinup limit internal drives : 0 | ||
3905 | 39 | Spinup limit external drives : 0 | ||
3906 | 40 | Defunct disk drive count : 0 | ||
3907 | 41 | Logical devices/Failed/Degraded : 1/0/0 | ||
3908 | 42 | -------------------------------------------------------- | ||
3909 | 43 | Controller Version Information | ||
3910 | 44 | -------------------------------------------------------- | ||
3911 | 45 | BIOS : 5.2-0 (17304) | ||
3912 | 46 | Firmware : 5.2-0 (17304) | ||
3913 | 47 | Driver : 1.1-5 (2461) | ||
3914 | 48 | Boot Flash : 5.2-0 (17304) | ||
3915 | 49 | -------------------------------------------------------- | ||
3916 | 50 | Controller Battery Information | ||
3917 | 51 | -------------------------------------------------------- | ||
3918 | 52 | Status : Optimal | ||
3919 | 53 | Over temperature : No | ||
3920 | 54 | Capacity remaining : 99 percent | ||
3921 | 55 | Time remaining (at current draw) : 3 days, 1 hours, 11 minutes | ||
3922 | 56 | |||
3923 | 57 | ---------------------------------------------------------------------- | ||
3924 | 58 | Logical device information | ||
3925 | 59 | ---------------------------------------------------------------------- | ||
3926 | 60 | Logical device number 0 | ||
3927 | 61 | Logical device name : raid10 | ||
3928 | 62 | RAID level : 10 | ||
3929 | 63 | Status of logical device : Optimal | ||
3930 | 64 | Size : 279800 MB | ||
3931 | 65 | Stripe-unit size : 256 KB | ||
3932 | 66 | Read-cache mode : Enabled | ||
3933 | 67 | Write-cache mode : Enabled (write-back) | ||
3934 | 68 | Write-cache setting : Enabled (write-back) when protected by battery | ||
3935 | 69 | Partitioned : Unknown | ||
3936 | 70 | Protected by Hot-Spare : No | ||
3937 | 71 | Bootable : Yes | ||
3938 | 72 | Failed stripes : No | ||
3939 | 73 | Power settings : Disabled | ||
3940 | 74 | -------------------------------------------------------- | ||
3941 | 75 | Logical device segment information | ||
3942 | 76 | -------------------------------------------------------- | ||
3943 | 77 | Group 0, Segment 0 : Present (0,0) 3LN6552C00009903T8E4 | ||
3944 | 78 | Group 0, Segment 1 : Present (0,1) 3QN26HL400009009KZ0Q | ||
3945 | 79 | Group 1, Segment 0 : Present (0,2) 3QN1S2AN00009001XVFZ | ||
3946 | 80 | Group 1, Segment 1 : Present (0,3) 3LN648WZ00009903T916 | ||
3947 | 81 | |||
3948 | 82 | |||
3949 | 83 | ---------------------------------------------------------------------- | ||
3950 | 84 | Physical Device information | ||
3951 | 85 | ---------------------------------------------------------------------- | ||
3952 | 86 | Device #0 | ||
3953 | 87 | Device is a Hard drive | ||
3954 | 88 | State : Online | ||
3955 | 89 | Supported : Yes | ||
3956 | 90 | Transfer Speed : SAS 3.0 Gb/s | ||
3957 | 91 | Reported Channel,Device(T:L) : 0,0(0:0) | ||
3958 | 92 | Reported Location : Connector 0, Device 0 | ||
3959 | 93 | Vendor : SEAGATE | ||
3960 | 94 | Model : ST3146855SS | ||
3961 | 95 | Firmware : 0002 | ||
3962 | 96 | Serial number : 3LN6552C00009903T8E4 | ||
3963 | 97 | World-wide name : 5000C5000C4DDBB8 | ||
3964 | 98 | Size : 140014 MB | ||
3965 | 99 | Write Cache : Enabled (write-back) | ||
3966 | 100 | FRU : None | ||
3967 | 101 | S.M.A.R.T. : No | ||
3968 | 102 | Device #1 | ||
3969 | 103 | Device is a Hard drive | ||
3970 | 104 | State : Online | ||
3971 | 105 | Supported : Yes | ||
3972 | 106 | Transfer Speed : SAS 3.0 Gb/s | ||
3973 | 107 | Reported Channel,Device(T:L) : 0,1(1:0) | ||
3974 | 108 | Reported Location : Connector 0, Device 1 | ||
3975 | 109 | Vendor : SEAGATE | ||
3976 | 110 | Model : ST3146356SS | ||
3977 | 111 | Firmware : 0005 | ||
3978 | 112 | Serial number : 3QN26HL400009009KZ0Q | ||
3979 | 113 | World-wide name : 5000C50016F5E66C | ||
3980 | 114 | Size : 140014 MB | ||
3981 | 115 | Write Cache : Enabled (write-back) | ||
3982 | 116 | FRU : None | ||
3983 | 117 | S.M.A.R.T. : No | ||
3984 | 118 | Device #2 | ||
3985 | 119 | Device is a Hard drive | ||
3986 | 120 | State : Online | ||
3987 | 121 | Supported : Yes | ||
3988 | 122 | Transfer Speed : SAS 3.0 Gb/s | ||
3989 | 123 | Reported Channel,Device(T:L) : 0,2(2:0) | ||
3990 | 124 | Reported Location : Connector 0, Device 2 | ||
3991 | 125 | Vendor : SEAGATE | ||
3992 | 126 | Model : ST3146356SS | ||
3993 | 127 | Firmware : 0005 | ||
3994 | 128 | Serial number : 3QN1S2AN00009001XVFZ | ||
3995 | 129 | World-wide name : 5000C50016F5EF4C | ||
3996 | 130 | Size : 140014 MB | ||
3997 | 131 | Write Cache : Enabled (write-back) | ||
3998 | 132 | FRU : None | ||
3999 | 133 | S.M.A.R.T. : No | ||
4000 | 134 | Device #3 | ||
4001 | 135 | Device is a Hard drive | ||
4002 | 136 | State : Online | ||
4003 | 137 | Supported : Yes | ||
4004 | 138 | Transfer Speed : SAS 3.0 Gb/s | ||
4005 | 139 | Reported Channel,Device(T:L) : 0,3(3:0) | ||
4006 | 140 | Reported Location : Connector 0, Device 3 | ||
4007 | 141 | Vendor : SEAGATE | ||
4008 | 142 | Model : ST3146855SS | ||
4009 | 143 | Firmware : 0002 | ||
4010 | 144 | Serial number : 3LN648WZ00009903T916 | ||
4011 | 145 | World-wide name : 5000C5000C4DEA60 | ||
4012 | 146 | Size : 140014 MB | ||
4013 | 147 | Write Cache : Enabled (write-back) | ||
4014 | 148 | FRU : None | ||
4015 | 149 | S.M.A.R.T. : No | ||
4016 | 150 | |||
4017 | 151 | |||
4018 | 152 | Command completed successfully. | ||
4019 | 153 | |||
4020 | 154 | EOF | ||
4021 | 155 | 0 | ||
4022 | === removed file 't/pt-summary/parse-arcconf-02' | |||
4023 | --- t/pt-summary/parse-arcconf-02 2011-07-01 16:29:50 +0000 | |||
4024 | +++ t/pt-summary/parse-arcconf-02 1970-01-01 00:00:00 +0000 | |||
4025 | @@ -1,20 +0,0 @@ | |||
4026 | 1 | #!/bin/bash | ||
4027 | 2 | #parse_arcconf | ||
4028 | 3 | |||
4029 | 4 | cat <<EOF > $1 | ||
4030 | 5 | Specs | Adaptec 3405, SAS/SATA, 128 MB cache, Optimal | ||
4031 | 6 | Battery | 99%, 3d1h11m remaining, Optimal | ||
4032 | 7 | |||
4033 | 8 | LogicalDev Size RAID Disks Stripe Status Cache | ||
4034 | 9 | ========== ========= ==== ===== ====== ======= ======= | ||
4035 | 10 | Raid10-A 571392 MB 10 4 256 KB Optimal On (WB) | ||
4036 | 11 | |||
4037 | 12 | PhysiclDev State Speed Vendor Model Size Cache | ||
4038 | 13 | ========== ======= ============= ======= ============ =========== ======= | ||
4039 | 14 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB) | ||
4040 | 15 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB) | ||
4041 | 16 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB) | ||
4042 | 17 | Hard drive Online SAS 3.0 Gb/s SEAGATE ST3300655SS 286102 MB On (WB) | ||
4043 | 18 | EOF | ||
4044 | 19 | |||
4045 | 20 | cat samples/arcconf-002.txt > $2 | ||
4046 | 21 | 0 | ||
4047 | === removed file 't/pt-summary/parse-dmesg-raid-01' | |||
4048 | --- t/pt-summary/parse-dmesg-raid-01 2011-07-01 16:29:50 +0000 | |||
4049 | +++ t/pt-summary/parse-dmesg-raid-01 1970-01-01 00:00:00 +0000 | |||
4050 | @@ -1,8 +0,0 @@ | |||
4051 | 1 | #!/bin/bash | ||
4052 | 2 | #parse_raid_controller_dmesg | ||
4053 | 3 | |||
4054 | 4 | cat <<EOF > $1 | ||
4055 | 5 | Fusion-MPT SAS | ||
4056 | 6 | EOF | ||
4057 | 7 | |||
4058 | 8 | cat samples/dmesg-001.txt > $2 | ||
4059 | 9 | 0 | ||
4060 | === removed file 't/pt-summary/parse-dmesg-raid-02' | |||
4061 | --- t/pt-summary/parse-dmesg-raid-02 2011-07-01 16:29:50 +0000 | |||
4062 | +++ t/pt-summary/parse-dmesg-raid-02 1970-01-01 00:00:00 +0000 | |||
4063 | @@ -1,8 +0,0 @@ | |||
4064 | 1 | #!/bin/bash | ||
4065 | 2 | #parse_raid_controller_dmesg | ||
4066 | 3 | |||
4067 | 4 | cat <<EOF > $1 | ||
4068 | 5 | AACRAID | ||
4069 | 6 | EOF | ||
4070 | 7 | |||
4071 | 8 | cat samples/dmesg-002.txt > $2 | ||
4072 | 9 | 0 | ||
4073 | === removed file 't/pt-summary/parse-dmesg-raid-03' | |||
4074 | --- t/pt-summary/parse-dmesg-raid-03 2011-07-01 16:29:50 +0000 | |||
4075 | +++ t/pt-summary/parse-dmesg-raid-03 1970-01-01 00:00:00 +0000 | |||
4076 | @@ -1,8 +0,0 @@ | |||
4077 | 1 | #!/bin/bash | ||
4078 | 2 | #parse_raid_controller_dmesg | ||
4079 | 3 | |||
4080 | 4 | cat <<EOF > $1 | ||
4081 | 5 | LSI Logic MegaRAID SAS | ||
4082 | 6 | EOF | ||
4083 | 7 | |||
4084 | 8 | cat samples/dmesg-003.txt > $2 | ||
4085 | 9 | 0 | ||
4086 | === removed file 't/pt-summary/parse-dmesg-raid-04' | |||
4087 | --- t/pt-summary/parse-dmesg-raid-04 2011-07-01 16:29:50 +0000 | |||
4088 | +++ t/pt-summary/parse-dmesg-raid-04 1970-01-01 00:00:00 +0000 | |||
4089 | @@ -1,8 +0,0 @@ | |||
4090 | 1 | #!/bin/bash | ||
4091 | 2 | #parse_raid_controller_dmesg | ||
4092 | 3 | |||
4093 | 4 | cat <<EOF > $1 | ||
4094 | 5 | AACRAID | ||
4095 | 6 | EOF | ||
4096 | 7 | |||
4097 | 8 | cat samples/dmesg-004.txt > $2 | ||
4098 | 9 | 0 | ||
4099 | === removed file 't/pt-summary/parse-dmidecode-mem-devices-01' | |||
4100 | --- t/pt-summary/parse-dmidecode-mem-devices-01 2011-07-01 16:29:50 +0000 | |||
4101 | +++ t/pt-summary/parse-dmidecode-mem-devices-01 1970-01-01 00:00:00 +0000 | |||
4102 | @@ -1,465 +0,0 @@ | |||
4103 | 1 | #!/bin/bash | ||
4104 | 2 | #parse_dmidecode_mem_devices | ||
4105 | 3 | |||
4106 | 4 | cat <<EOF > $1 | ||
4107 | 5 | Locator Size Speed Form Factor Type Type Detail | ||
4108 | 6 | ========= ======== ================= ============= ============= =========== | ||
4109 | 7 | SODIMM0 2048 MB 800 MHz SODIMM Other Synchronous | ||
4110 | 8 | SODIMM1 2048 MB 800 MHz SODIMM Other Synchronous | ||
4111 | 9 | EOF | ||
4112 | 10 | |||
4113 | 11 | cat <<EOF > $2 | ||
4114 | 12 | # dmidecode 2.10 | ||
4115 | 13 | SMBIOS 2.5 present. | ||
4116 | 14 | 41 structures occupying 1867 bytes. | ||
4117 | 15 | Table at 0x000FCCE0. | ||
4118 | 16 | |||
4119 | 17 | Handle 0x0000, DMI type 0, 24 bytes | ||
4120 | 18 | BIOS Information | ||
4121 | 19 | Vendor: American Megatrends Inc. | ||
4122 | 20 | Version: 211 | ||
4123 | 21 | Release Date: 10/20/2009 | ||
4124 | 22 | Address: 0xF0000 | ||
4125 | 23 | Runtime Size: 64 kB | ||
4126 | 24 | ROM Size: 1024 kB | ||
4127 | 25 | Characteristics: | ||
4128 | 26 | ISA is supported | ||
4129 | 27 | PCI is supported | ||
4130 | 28 | PNP is supported | ||
4131 | 29 | BIOS is upgradeable | ||
4132 | 30 | BIOS shadowing is allowed | ||
4133 | 31 | ESCD support is available | ||
4134 | 32 | Boot from CD is supported | ||
4135 | 33 | Selectable boot is supported | ||
4136 | 34 | EDD is supported | ||
4137 | 35 | 5.25"/1.2 MB floppy services are supported (int 13h) | ||
4138 | 36 | 3.5"/720 kB floppy services are supported (int 13h) | ||
4139 | 37 | 3.5"/2.88 MB floppy services are supported (int 13h) | ||
4140 | 38 | Print screen service is supported (int 5h) | ||
4141 | 39 | 8042 keyboard services are supported (int 9h) | ||
4142 | 40 | Printer services are supported (int 17h) | ||
4143 | 41 | CGA/mono video services are supported (int 10h) | ||
4144 | 42 | ACPI is supported | ||
4145 | 43 | USB legacy is supported | ||
4146 | 44 | Smart battery is supported | ||
4147 | 45 | BIOS boot specification is supported | ||
4148 | 46 | Function key-initiated network boot is supported | ||
4149 | 47 | Targeted content distribution is supported | ||
4150 | 48 | BIOS Revision: 2.11 | ||
4151 | 49 | Firmware Revision: 32.1 | ||
4152 | 50 | |||
4153 | 51 | Handle 0x0001, DMI type 1, 27 bytes | ||
4154 | 52 | System Information | ||
4155 | 53 | Manufacturer: ASUSTeK Computer Inc. | ||
4156 | 54 | Product Name: UL30A | ||
4157 | 55 | Version: 1.0 | ||
4158 | 56 | Serial Number: 102677490240 | ||
4159 | 57 | UUID: 009FC67B-8AD1-DE81-2E8E-90E6BAF39C70 | ||
4160 | 58 | Wake-up Type: Power Switch | ||
4161 | 59 | SKU Number: | ||
4162 | 60 | Family: | ||
4163 | 61 | |||
4164 | 62 | Handle 0x0002, DMI type 2, 15 bytes | ||
4165 | 63 | Base Board Information | ||
4166 | 64 | Manufacturer: ASUSTeK Computer Inc. | ||
4167 | 65 | Product Name: UL30A | ||
4168 | 66 | Version: 1.0 | ||
4169 | 67 | Serial Number: BSN12345678901234567 | ||
4170 | 68 | Asset Tag: ATN12345678901234567 | ||
4171 | 69 | Features: | ||
4172 | 70 | Board is a hosting board | ||
4173 | 71 | Board requires at least one daughter board | ||
4174 | 72 | Board is replaceable | ||
4175 | 73 | Location In Chassis: MIDDLE | ||
4176 | 74 | Chassis Handle: 0x0003 | ||
4177 | 75 | Type: Motherboard | ||
4178 | 76 | Contained Object Handles: 0 | ||
4179 | 77 | |||
4180 | 78 | Handle 0x0003, DMI type 3, 21 bytes | ||
4181 | 79 | Chassis Information | ||
4182 | 80 | Manufacturer: ASUSTeK Computer Inc. | ||
4183 | 81 | Type: Notebook | ||
4184 | 82 | Lock: Not Present | ||
4185 | 83 | Version: 1.0 | ||
4186 | 84 | Serial Number: CSN12345678901234567 | ||
4187 | 85 | Asset Tag: ATN12345678901234567 | ||
4188 | 86 | Boot-up State: Safe | ||
4189 | 87 | Power Supply State: Safe | ||
4190 | 88 | Thermal State: Other | ||
4191 | 89 | Security Status: Other | ||
4192 | 90 | OEM Information: 0x00000000 | ||
4193 | 91 | Height: Unspecified | ||
4194 | 92 | Number Of Power Cords: 1 | ||
4195 | 93 | Contained Elements: 0 | ||
4196 | 94 | |||
4197 | 95 | Handle 0x0004, DMI type 4, 40 bytes | ||
4198 | 96 | Processor Information | ||
4199 | 97 | Socket Designation: Socket 478 | ||
4200 | 98 | Type: Central Processor | ||
4201 | 99 | Family: Other | ||
4202 | 100 | Manufacturer: Intel | ||
4203 | 101 | ID: 7A 06 01 00 FF FB EB BF | ||
4204 | 102 | Version: Genuine Intel(R) CPU U7300 @ 1.30GHz | ||
4205 | 103 | Voltage: 1.0 V | ||
4206 | 104 | External Clock: 200 MHz | ||
4207 | 105 | Max Speed: 1300 MHz | ||
4208 | 106 | Current Speed: 1300 MHz | ||
4209 | 107 | Status: Populated, Enabled | ||
4210 | 108 | Upgrade: Socket 478 | ||
4211 | 109 | L1 Cache Handle: 0x0005 | ||
4212 | 110 | L2 Cache Handle: 0x0007 | ||
4213 | 111 | L3 Cache Handle: Not Provided | ||
4214 | 112 | Serial Number: PSN12345678901234567 | ||
4215 | 113 | Asset Tag: PATN1234567890123456 | ||
4216 | 114 | Part Number: PPN12345678901234567 | ||
4217 | 115 | Core Count: 2 | ||
4218 | 116 | Core Enabled: 2 | ||
4219 | 117 | Thread Count: 2 | ||
4220 | 118 | Characteristics: | ||
4221 | 119 | 64-bit capable | ||
4222 | 120 | |||
4223 | 121 | Handle 0x0005, DMI type 7, 19 bytes | ||
4224 | 122 | Cache Information | ||
4225 | 123 | Socket Designation: L1-Cache | ||
4226 | 124 | Configuration: Enabled, Not Socketed, Level 1 | ||
4227 | 125 | Operational Mode: Write Back | ||
4228 | 126 | Location: Internal | ||
4229 | 127 | Installed Size: 64 kB | ||
4230 | 128 | Maximum Size: 64 kB | ||
4231 | 129 | Supported SRAM Types: | ||
4232 | 130 | Other | ||
4233 | 131 | Installed SRAM Type: Other | ||
4234 | 132 | Speed: Unknown | ||
4235 | 133 | Error Correction Type: Single-bit ECC | ||
4236 | 134 | System Type: Data | ||
4237 | 135 | Associativity: 8-way Set-associative | ||
4238 | 136 | |||
4239 | 137 | Handle 0x0006, DMI type 7, 19 bytes | ||
4240 | 138 | Cache Information | ||
4241 | 139 | Socket Designation: L1-Cache | ||
4242 | 140 | Configuration: Enabled, Not Socketed, Level 1 | ||
4243 | 141 | Operational Mode: Write Back | ||
4244 | 142 | Location: Internal | ||
4245 | 143 | Installed Size: 64 kB | ||
4246 | 144 | Maximum Size: 64 kB | ||
4247 | 145 | Supported SRAM Types: | ||
4248 | 146 | Other | ||
4249 | 147 | Installed SRAM Type: Other | ||
4250 | 148 | Speed: Unknown | ||
4251 | 149 | Error Correction Type: Single-bit ECC | ||
4252 | 150 | System Type: Instruction | ||
4253 | 151 | Associativity: 8-way Set-associative | ||
4254 | 152 | |||
4255 | 153 | Handle 0x0007, DMI type 7, 19 bytes | ||
4256 | 154 | Cache Information | ||
4257 | 155 | Socket Designation: L2-Cache | ||
4258 | 156 | Configuration: Enabled, Not Socketed, Level 2 | ||
4259 | 157 | Operational Mode: Write Back | ||
4260 | 158 | Location: Internal | ||
4261 | 159 | Installed Size: 3072 kB | ||
4262 | 160 | Maximum Size: 3072 kB | ||
4263 | 161 | Supported SRAM Types: | ||
4264 | 162 | Other | ||
4265 | 163 | Installed SRAM Type: Other | ||
4266 | 164 | Speed: Unknown | ||
4267 | 165 | Error Correction Type: Single-bit ECC | ||
4268 | 166 | System Type: Unified | ||
4269 | 167 | Associativity: Other | ||
4270 | 168 | |||
4271 | 169 | Handle 0x0008, DMI type 8, 9 bytes | ||
4272 | 170 | Port Connector Information | ||
4273 | 171 | Internal Reference Designator: J3401 | ||
4274 | 172 | Internal Connector Type: None | ||
4275 | 173 | External Reference Designator: LAN | ||
4276 | 174 | External Connector Type: RJ-45 | ||
4277 | 175 | Port Type: Network Port | ||
4278 | 176 | |||
4279 | 177 | Handle 0x0009, DMI type 8, 9 bytes | ||
4280 | 178 | Port Connector Information | ||
4281 | 179 | Internal Reference Designator: J4501 | ||
4282 | 180 | Internal Connector Type: None | ||
4283 | 181 | External Reference Designator: VGA | ||
4284 | 182 | External Connector Type: DB-15 female | ||
4285 | 183 | Port Type: Video Port | ||
4286 | 184 | |||
4287 | 185 | Handle 0x000A, DMI type 8, 9 bytes | ||
4288 | 186 | Port Connector Information | ||
4289 | 187 | Internal Reference Designator: J5201 | ||
4290 | 188 | Internal Connector Type: None | ||
4291 | 189 | External Reference Designator: USB1 | ||
4292 | 190 | External Connector Type: Access Bus (USB) | ||
4293 | 191 | Port Type: USB | ||
4294 | 192 | |||
4295 | 193 | Handle 0x000B, DMI type 8, 9 bytes | ||
4296 | 194 | Port Connector Information | ||
4297 | 195 | Internal Reference Designator: J5201 | ||
4298 | 196 | Internal Connector Type: None | ||
4299 | 197 | External Reference Designator: USB2 | ||
4300 | 198 | External Connector Type: Access Bus (USB) | ||
4301 | 199 | Port Type: USB | ||
4302 | 200 | |||
4303 | 201 | Handle 0x000C, DMI type 8, 9 bytes | ||
4304 | 202 | Port Connector Information | ||
4305 | 203 | Internal Reference Designator: J4800 | ||
4306 | 204 | Internal Connector Type: None | ||
4307 | 205 | External Reference Designator: HDMI | ||
4308 | 206 | External Connector Type: Other | ||
4309 | 207 | Port Type: Other | ||
4310 | 208 | |||
4311 | 209 | Handle 0x000D, DMI type 8, 9 bytes | ||
4312 | 210 | Port Connector Information | ||
4313 | 211 | Internal Reference Designator: J5101 | ||
4314 | 212 | Internal Connector Type: None | ||
4315 | 213 | External Reference Designator: SATA 1 | ||
4316 | 214 | External Connector Type: SAS/SATA Plug Receptacle | ||
4317 | 215 | Port Type: SATA | ||
4318 | 216 | |||
4319 | 217 | Handle 0x000E, DMI type 8, 9 bytes | ||
4320 | 218 | Port Connector Information | ||
4321 | 219 | Internal Reference Designator: J4202 | ||
4322 | 220 | Internal Connector Type: None | ||
4323 | 221 | External Reference Designator: FlashCard | ||
4324 | 222 | External Connector Type: Other | ||
4325 | 223 | Port Type: Other | ||
4326 | 224 | |||
4327 | 225 | Handle 0x000F, DMI type 8, 9 bytes | ||
4328 | 226 | Port Connector Information | ||
4329 | 227 | Internal Reference Designator: J4301 | ||
4330 | 228 | Internal Connector Type: None | ||
4331 | 229 | External Reference Designator: ExpressCard | ||
4332 | 230 | External Connector Type: Other | ||
4333 | 231 | Port Type: Other | ||
4334 | 232 | |||
4335 | 233 | Handle 0x0010, DMI type 8, 9 bytes | ||
4336 | 234 | Port Connector Information | ||
4337 | 235 | Internal Reference Designator: J6601 | ||
4338 | 236 | Internal Connector Type: None | ||
4339 | 237 | External Reference Designator: eSATA | ||
4340 | 238 | External Connector Type: SAS/SATA Plug Receptacle | ||
4341 | 239 | Port Type: SATA | ||
4342 | 240 | |||
4343 | 241 | Handle 0x0011, DMI type 8, 9 bytes | ||
4344 | 242 | Port Connector Information | ||
4345 | 243 | Internal Reference Designator: J3703 | ||
4346 | 244 | Internal Connector Type: None | ||
4347 | 245 | External Reference Designator: Audio Out | ||
4348 | 246 | External Connector Type: Mini Jack (headphones) | ||
4349 | 247 | Port Type: Audio Port | ||
4350 | 248 | |||
4351 | 249 | Handle 0x0012, DMI type 8, 9 bytes | ||
4352 | 250 | Port Connector Information | ||
4353 | 251 | Internal Reference Designator: J3801 | ||
4354 | 252 | Internal Connector Type: None | ||
4355 | 253 | External Reference Designator: Mic In | ||
4356 | 254 | External Connector Type: Mini Jack (headphones) | ||
4357 | 255 | Port Type: Audio Port | ||
4358 | 256 | |||
4359 | 257 | Handle 0x0013, DMI type 8, 9 bytes | ||
4360 | 258 | Port Connector Information | ||
4361 | 259 | Internal Reference Designator: J2502 | ||
4362 | 260 | Internal Connector Type: None | ||
4363 | 261 | External Reference Designator: USB3 | ||
4364 | 262 | External Connector Type: Access Bus (USB) | ||
4365 | 263 | Port Type: USB | ||
4366 | 264 | |||
4367 | 265 | Handle 0x0014, DMI type 8, 9 bytes | ||
4368 | 266 | Port Connector Information | ||
4369 | 267 | Internal Reference Designator: J4203 | ||
4370 | 268 | Internal Connector Type: None | ||
4371 | 269 | External Reference Designator: 1394 | ||
4372 | 270 | External Connector Type: IEEE 1394 | ||
4373 | 271 | Port Type: Firewire (IEEE P1394) | ||
4374 | 272 | |||
4375 | 273 | Handle 0x0015, DMI type 8, 9 bytes | ||
4376 | 274 | Port Connector Information | ||
4377 | 275 | Internal Reference Designator: J5401 | ||
4378 | 276 | Internal Connector Type: None | ||
4379 | 277 | External Reference Designator: DockPort | ||
4380 | 278 | External Connector Type: Other | ||
4381 | 279 | Port Type: Other | ||
4382 | 280 | |||
4383 | 281 | Handle 0x0016, DMI type 9, 13 bytes | ||
4384 | 282 | System Slot Information | ||
4385 | 283 | Designation: PCIE1 | ||
4386 | 284 | Type: x1 PCI Express | ||
4387 | 285 | Current Usage: In Use | ||
4388 | 286 | Length: Short | ||
4389 | 287 | ID: 0 | ||
4390 | 288 | Characteristics: | ||
4391 | 289 | 3.3 V is provided | ||
4392 | 290 | PME signal is supported | ||
4393 | 291 | |||
4394 | 292 | Handle 0x0017, DMI type 9, 13 bytes | ||
4395 | 293 | System Slot Information | ||
4396 | 294 | Designation: PCIE2 | ||
4397 | 295 | Type: x1 PCI Express | ||
4398 | 296 | Current Usage: Available | ||
4399 | 297 | Length: Short | ||
4400 | 298 | ID: 1 | ||
4401 | 299 | Characteristics: | ||
4402 | 300 | 3.3 V is provided | ||
4403 | 301 | PME signal is supported | ||
4404 | 302 | |||
4405 | 303 | Handle 0x0018, DMI type 9, 13 bytes | ||
4406 | 304 | System Slot Information | ||
4407 | 305 | Designation: PCIE3 | ||
4408 | 306 | Type: x1 PCI Express | ||
4409 | 307 | Current Usage: Available | ||
4410 | 308 | Length: Short | ||
4411 | 309 | ID: 2 | ||
4412 | 310 | Characteristics: | ||
4413 | 311 | 3.3 V is provided | ||
4414 | 312 | PME signal is supported | ||
4415 | 313 | |||
4416 | 314 | Handle 0x0019, DMI type 9, 13 bytes | ||
4417 | 315 | System Slot Information | ||
4418 | 316 | Designation: PCIE4 | ||
4419 | 317 | Type: x1 PCI Express | ||
4420 | 318 | Current Usage: Available | ||
4421 | 319 | Length: Short | ||
4422 | 320 | ID: 3 | ||
4423 | 321 | Characteristics: | ||
4424 | 322 | 3.3 V is provided | ||
4425 | 323 | PME signal is supported | ||
4426 | 324 | |||
4427 | 325 | Handle 0x001A, DMI type 10, 6 bytes | ||
4428 | 326 | On Board Device Information | ||
4429 | 327 | Type: Video | ||
4430 | 328 | Status: Enabled | ||
4431 | 329 | Description: UMA | ||
4432 | 330 | |||
4433 | 331 | Handle 0x001B, DMI type 10, 6 bytes | ||
4434 | 332 | On Board Device Information | ||
4435 | 333 | Type: Ethernet | ||
4436 | 334 | Status: Enabled | ||
4437 | 335 | Description: NIC | ||
4438 | 336 | |||
4439 | 337 | Handle 0x001C, DMI type 10, 6 bytes | ||
4440 | 338 | On Board Device Information | ||
4441 | 339 | Type: Sound | ||
4442 | 340 | Status: Enabled | ||
4443 | 341 | Description: Audio Codec | ||
4444 | 342 | |||
4445 | 343 | Handle 0x001D, DMI type 10, 6 bytes | ||
4446 | 344 | On Board Device Information | ||
4447 | 345 | Type: SATA Controller | ||
4448 | 346 | Status: Enabled | ||
4449 | 347 | Description: SATA Controller | ||
4450 | 348 | |||
4451 | 349 | Handle 0x001E, DMI type 10, 6 bytes | ||
4452 | 350 | On Board Device Information | ||
4453 | 351 | Type: Other | ||
4454 | 352 | Status: Enabled | ||
4455 | 353 | Description: 1394/FlashCardReader | ||
4456 | 354 | |||
4457 | 355 | Handle 0x001F, DMI type 13, 22 bytes | ||
4458 | 356 | BIOS Language Information | ||
4459 | 357 | Installable Languages: 1 | ||
4460 | 358 | en|US|iso8859-1 | ||
4461 | 359 | Currently Installed Language: en|US|iso8859-1 | ||
4462 | 360 | |||
4463 | 361 | Handle 0x0020, DMI type 16, 15 bytes | ||
4464 | 362 | Physical Memory Array | ||
4465 | 363 | Location: System Board Or Motherboard | ||
4466 | 364 | Use: System Memory | ||
4467 | 365 | Error Correction Type: None | ||
4468 | 366 | Maximum Capacity: 8 GB | ||
4469 | 367 | Error Information Handle: Not Provided | ||
4470 | 368 | Number Of Devices: 2 | ||
4471 | 369 | |||
4472 | 370 | Handle 0x0021, DMI type 19, 15 bytes | ||
4473 | 371 | Memory Array Mapped Address | ||
4474 | 372 | Starting Address: 0x00000000000 | ||
4475 | 373 | Ending Address: 0x000FFFFFFFF | ||
4476 | 374 | Range Size: 4 GB | ||
4477 | 375 | Physical Array Handle: 0x0020 | ||
4478 | 376 | Partition Width: 0 | ||
4479 | 377 | |||
4480 | 378 | Handle 0x0022, DMI type 17, 27 bytes | ||
4481 | 379 | Memory Device | ||
4482 | 380 | Array Handle: 0x0020 | ||
4483 | 381 | Error Information Handle: Not Provided | ||
4484 | 382 | Total Width: 64 bits | ||
4485 | 383 | Data Width: 64 bits | ||
4486 | 384 | Size: 2048 MB | ||
4487 | 385 | Form Factor: SODIMM | ||
4488 | 386 | Set: None | ||
4489 | 387 | Locator: SODIMM0 | ||
4490 | 388 | Bank Locator: BANK0 | ||
4491 | 389 | Type: Other | ||
4492 | 390 | Type Detail: Synchronous | ||
4493 | 391 | Speed: 800 MHz | ||
4494 | 392 | Manufacturer: N/A | ||
4495 | 393 | Serial Number: N/A | ||
4496 | 394 | Asset Tag: N/A | ||
4497 | 395 | Part Number: N/A | ||
4498 | 396 | |||
4499 | 397 | Handle 0x0023, DMI type 20, 19 bytes | ||
4500 | 398 | Memory Device Mapped Address | ||
4501 | 399 | Starting Address: 0x00000000000 | ||
4502 | 400 | Ending Address: 0x0007FFFFFFF | ||
4503 | 401 | Range Size: 2 GB | ||
4504 | 402 | Physical Device Handle: 0x0022 | ||
4505 | 403 | Memory Array Mapped Address Handle: 0x0021 | ||
4506 | 404 | Partition Row Position: Unknown | ||
4507 | 405 | Interleave Position: Unknown | ||
4508 | 406 | Interleaved Data Depth: Unknown | ||
4509 | 407 | |||
4510 | 408 | Handle 0x0024, DMI type 17, 27 bytes | ||
4511 | 409 | Memory Device | ||
4512 | 410 | Array Handle: 0x0020 | ||
4513 | 411 | Error Information Handle: Not Provided | ||
4514 | 412 | Total Width: 64 bits | ||
4515 | 413 | Data Width: 64 bits | ||
4516 | 414 | Size: 2048 MB | ||
4517 | 415 | Form Factor: SODIMM | ||
4518 | 416 | Set: None | ||
4519 | 417 | Locator: SODIMM1 | ||
4520 | 418 | Bank Locator: BANK1 | ||
4521 | 419 | Type: Other | ||
4522 | 420 | Type Detail: Synchronous | ||
4523 | 421 | Speed: 800 MHz | ||
4524 | 422 | Manufacturer: N/A | ||
4525 | 423 | Serial Number: N/A | ||
4526 | 424 | Asset Tag: N/A | ||
4527 | 425 | Part Number: N/A | ||
4528 | 426 | |||
4529 | 427 | Handle 0x0025, DMI type 20, 19 bytes | ||
4530 | 428 | Memory Device Mapped Address | ||
4531 | 429 | Starting Address: 0x00080000000 | ||
4532 | 430 | Ending Address: 0x000FFFFFFFF | ||
4533 | 431 | Range Size: 2 GB | ||
4534 | 432 | Physical Device Handle: 0x0024 | ||
4535 | 433 | Memory Array Mapped Address Handle: 0x0021 | ||
4536 | 434 | Partition Row Position: Unknown | ||
4537 | 435 | Interleave Position: Unknown | ||
4538 | 436 | Interleaved Data Depth: Unknown | ||
4539 | 437 | |||
4540 | 438 | Handle 0x0026, DMI type 22, 26 bytes | ||
4541 | 439 | Portable Battery | ||
4542 | 440 | Location: In the back | ||
4543 | 441 | Manufacturer: AS176NC2KF | ||
4544 | 442 | Manufacture Date: 09/08/03 | ||
4545 | 443 | Serial Number: @800 | ||
4546 | 444 | Name: UL50-44 | ||
4547 | 445 | Chemistry: Other | ||
4548 | 446 | Design Capacity: 4400 mWh | ||
4549 | 447 | Design Voltage: 14400 mV | ||
4550 | 448 | SBDS Version: SMART Ver 0123 | ||
4551 | 449 | Maximum Error: Unknown | ||
4552 | 450 | OEM-specific Information: 0x00000000 | ||
4553 | 451 | |||
4554 | 452 | Handle 0x0027, DMI type 200, 27 bytes | ||
4555 | 453 | OEM-specific Type | ||
4556 | 454 | Header and Data: | ||
4557 | 455 | C8 1B 27 00 01 02 03 00 00 00 00 00 00 00 00 00 | ||
4558 | 456 | 00 00 00 00 00 00 00 00 00 00 00 | ||
4559 | 457 | Strings: | ||
4560 | 458 | ASUSTeK Computer Inc. | ||
4561 | 459 | Notebook | ||
4562 | 460 | 1.0 | ||
4563 | 461 | |||
4564 | 462 | Handle 0x0028, DMI type 127, 4 bytes | ||
4565 | 463 | End Of Table | ||
4566 | 464 | |||
4567 | 465 | EOF | ||
4568 | 466 | 0 | ||
4569 | === removed file 't/pt-summary/parse-dmidecode-mem-devices-02' | |||
4570 | --- t/pt-summary/parse-dmidecode-mem-devices-02 2011-07-01 16:29:50 +0000 | |||
4571 | +++ t/pt-summary/parse-dmidecode-mem-devices-02 1970-01-01 00:00:00 +0000 | |||
4572 | @@ -1,750 +0,0 @@ | |||
4573 | 1 | #!/bin/bash | ||
4574 | 2 | #parse_dmidecode_mem_devices | ||
4575 | 3 | |||
4576 | 4 | cat <<EOF > $1 | ||
4577 | 5 | Locator Size Speed Form Factor Type Type Detail | ||
4578 | 6 | ========= ======== ================= ============= ============= =========== | ||
4579 | 7 | DIMM1 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4580 | 8 | DIMM2 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4581 | 9 | DIMM3 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4582 | 10 | DIMM4 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4583 | 11 | DIMM5 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4584 | 12 | DIMM6 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4585 | 13 | DIMM7 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4586 | 14 | DIMM8 2048 MB 667 MHz (1.5 ns) {OUT OF SPEC} {OUT OF SPEC} Synchronous | ||
4587 | 15 | EOF | ||
4588 | 16 | |||
4589 | 17 | cat <<EOF > $2 | ||
4590 | 18 | # dmidecode 2.7 | ||
4591 | 19 | SMBIOS 2.4 present. | ||
4592 | 20 | 64 structures occupying 3240 bytes. | ||
4593 | 21 | Table at 0xBFB9C000. | ||
4594 | 22 | |||
4595 | 23 | Handle 0xDA00, DMI type 218, 11 bytes. | ||
4596 | 24 | OEM-specific Type | ||
4597 | 25 | Header and Data: | ||
4598 | 26 | DA 0B 00 DA B2 00 17 00 0E 20 00 | ||
4599 | 27 | |||
4600 | 28 | Handle 0x0000, DMI type 0, 24 bytes. | ||
4601 | 29 | BIOS Information | ||
4602 | 30 | Vendor: Dell Inc. | ||
4603 | 31 | Version: 2.0.1 | ||
4604 | 32 | Release Date: 10/27/2007 | ||
4605 | 33 | Address: 0xF0000 | ||
4606 | 34 | Runtime Size: 64 kB | ||
4607 | 35 | ROM Size: 1024 kB | ||
4608 | 36 | Characteristics: | ||
4609 | 37 | ISA is supported | ||
4610 | 38 | PCI is supported | ||
4611 | 39 | PNP is supported | ||
4612 | 40 | BIOS is upgradeable | ||
4613 | 41 | BIOS shadowing is allowed | ||
4614 | 42 | ESCD support is available | ||
4615 | 43 | Boot from CD is supported | ||
4616 | 44 | Selectable boot is supported | ||
4617 | 45 | EDD is supported | ||
4618 | 46 | Japanese floppy for Toshiba 1.2 MB is supported (int 13h) | ||
4619 | 47 | 5.25"/360 KB floppy services are supported (int 13h) | ||
4620 | 48 | 5.25"/1.2 MB floppy services are supported (int 13h) | ||
4621 | 49 | 3.5"/720 KB floppy services are supported (int 13h) | ||
4622 | 50 | Print screen service is supported (int 5h) | ||
4623 | 51 | 8042 keyboard services are supported (int 9h) | ||
4624 | 52 | Serial services are supported (int 14h) | ||
4625 | 53 | Printer services are supported (int 17h) | ||
4626 | 54 | CGA/mono video services are supported (int 10h) | ||
4627 | 55 | ACPI is supported | ||
4628 | 56 | USB legacy is supported | ||
4629 | 57 | BIOS boot specification is supported | ||
4630 | 58 | Function key-initiated network boot is supported | ||
4631 | 59 | Targeted content distribution is supported | ||
4632 | 60 | BIOS Revision: 0.1 | ||
4633 | 61 | |||
4634 | 62 | Handle 0x0100, DMI type 1, 27 bytes. | ||
4635 | 63 | System Information | ||
4636 | 64 | Manufacturer: Dell Inc. | ||
4637 | 65 | Product Name: PowerEdge 2950 | ||
4638 | 66 | Version: Not Specified | ||
4639 | 67 | Serial Number: JQ8DMF1 | ||
4640 | 68 | UUID: 44454C4C-5100-1038-8044-CAC04F4D4631 | ||
4641 | 69 | Wake-up Type: Power Switch | ||
4642 | 70 | SKU Number: Not Specified | ||
4643 | 71 | Family: Not Specified | ||
4644 | 72 | |||
4645 | 73 | Handle 0x0200, DMI type 2, 9 bytes. | ||
4646 | 74 | Base Board Information | ||
4647 | 75 | Manufacturer: Dell Inc. | ||
4648 | 76 | Product Name: 0DP246 | ||
4649 | 77 | Version: A00 | ||
4650 | 78 | Serial Number: ..CN7082181S008M. | ||
4651 | 79 | |||
4652 | 80 | Handle 0x0300, DMI type 3, 21 bytes. | ||
4653 | 81 | Chassis Information | ||
4654 | 82 | Manufacturer: Dell Inc. | ||
4655 | 83 | Type: Rack Mount Chassis | ||
4656 | 84 | Lock: Present | ||
4657 | 85 | Version: Not Specified | ||
4658 | 86 | Serial Number: JQ8DMF1 | ||
4659 | 87 | Asset Tag: Not Specified | ||
4660 | 88 | Boot-up State: Safe | ||
4661 | 89 | Power Supply State: Safe | ||
4662 | 90 | Thermal State: Safe | ||
4663 | 91 | Security Status: Unknown | ||
4664 | 92 | OEM Information: 0x00000000 | ||
4665 | 93 | Heigth: 2 U | ||
4666 | 94 | Number Of Power Cords: Unspecified | ||
4667 | 95 | Contained Elements: 0 | ||
4668 | 96 | |||
4669 | 97 | Handle 0x0400, DMI type 4, 40 bytes. | ||
4670 | 98 | Processor Information | ||
4671 | 99 | Socket Designation: CPU1 | ||
4672 | 100 | Type: Central Processor | ||
4673 | 101 | Family: Xeon | ||
4674 | 102 | Manufacturer: Intel | ||
4675 | 103 | ID: FB 06 00 00 FF FB EB BF | ||
4676 | 104 | Signature: Type 0, Family 6, Model 15, Stepping 11 | ||
4677 | 105 | Flags: | ||
4678 | 106 | FPU (Floating-point unit on-chip) | ||
4679 | 107 | VME (Virtual mode extension) | ||
4680 | 108 | DE (Debugging extension) | ||
4681 | 109 | PSE (Page size extension) | ||
4682 | 110 | TSC (Time stamp counter) | ||
4683 | 111 | MSR (Model specific registers) | ||
4684 | 112 | PAE (Physical address extension) | ||
4685 | 113 | MCE (Machine check exception) | ||
4686 | 114 | CX8 (CMPXCHG8 instruction supported) | ||
4687 | 115 | APIC (On-chip APIC hardware supported) | ||
4688 | 116 | SEP (Fast system call) | ||
4689 | 117 | MTRR (Memory type range registers) | ||
4690 | 118 | PGE (Page global enable) | ||
4691 | 119 | MCA (Machine check architecture) | ||
4692 | 120 | CMOV (Conditional move instruction supported) | ||
4693 | 121 | PAT (Page attribute table) | ||
4694 | 122 | PSE-36 (36-bit page size extension) | ||
4695 | 123 | CLFSH (CLFLUSH instruction supported) | ||
4696 | 124 | DS (Debug store) | ||
4697 | 125 | ACPI (ACPI supported) | ||
4698 | 126 | MMX (MMX technology supported) | ||
4699 | 127 | FXSR (Fast floating-point save and restore) | ||
4700 | 128 | SSE (Streaming SIMD extensions) | ||
4701 | 129 | SSE2 (Streaming SIMD extensions 2) | ||
4702 | 130 | SS (Self-snoop) | ||
4703 | 131 | HTT (Hyper-threading technology) | ||
4704 | 132 | TM (Thermal monitor supported) | ||
4705 | 133 | PBE (Pending break enabled) | ||
4706 | 134 | Version: Intel(R) Xeon(R) CPU E5320 @ 1.86GHz | ||
4707 | 135 | Voltage: 1.4 V | ||
4708 | 136 | External Clock: 1066 MHz | ||
4709 | 137 | Max Speed: 3600 MHz | ||
4710 | 138 | Current Speed: 1867 MHz | ||
4711 | 139 | Status: Populated, Enabled | ||
4712 | 140 | Upgrade: <OUT OF SPEC> | ||
4713 | 141 | L1 Cache Handle: 0x0700 | ||
4714 | 142 | L2 Cache Handle: 0x0701 | ||
4715 | 143 | L3 Cache Handle: 0x0702 | ||
4716 | 144 | Serial Number: Not Specified | ||
4717 | 145 | Asset Tag: Not Specified | ||
4718 | 146 | Part Number: Not Specified | ||
4719 | 147 | |||
4720 | 148 | Handle 0x0401, DMI type 4, 40 bytes. | ||
4721 | 149 | Processor Information | ||
4722 | 150 | Socket Designation: CPU2 | ||
4723 | 151 | Type: Central Processor | ||
4724 | 152 | Family: Xeon | ||
4725 | 153 | Manufacturer: Intel | ||
4726 | 154 | ID: FB 06 00 00 FF FB EB BF | ||
4727 | 155 | Signature: Type 0, Family 6, Model 15, Stepping 11 | ||
4728 | 156 | Flags: | ||
4729 | 157 | FPU (Floating-point unit on-chip) | ||
4730 | 158 | VME (Virtual mode extension) | ||
4731 | 159 | DE (Debugging extension) | ||
4732 | 160 | PSE (Page size extension) | ||
4733 | 161 | TSC (Time stamp counter) | ||
4734 | 162 | MSR (Model specific registers) | ||
4735 | 163 | PAE (Physical address extension) | ||
4736 | 164 | MCE (Machine check exception) | ||
4737 | 165 | CX8 (CMPXCHG8 instruction supported) | ||
4738 | 166 | APIC (On-chip APIC hardware supported) | ||
4739 | 167 | SEP (Fast system call) | ||
4740 | 168 | MTRR (Memory type range registers) | ||
4741 | 169 | PGE (Page global enable) | ||
4742 | 170 | MCA (Machine check architecture) | ||
4743 | 171 | CMOV (Conditional move instruction supported) | ||
4744 | 172 | PAT (Page attribute table) | ||
4745 | 173 | PSE-36 (36-bit page size extension) | ||
4746 | 174 | CLFSH (CLFLUSH instruction supported) | ||
4747 | 175 | DS (Debug store) | ||
4748 | 176 | ACPI (ACPI supported) | ||
4749 | 177 | MMX (MMX technology supported) | ||
4750 | 178 | FXSR (Fast floating-point save and restore) | ||
4751 | 179 | SSE (Streaming SIMD extensions) | ||
4752 | 180 | SSE2 (Streaming SIMD extensions 2) | ||
4753 | 181 | SS (Self-snoop) | ||
4754 | 182 | HTT (Hyper-threading technology) | ||
4755 | 183 | TM (Thermal monitor supported) | ||
4756 | 184 | PBE (Pending break enabled) | ||
4757 | 185 | Version: Intel(R) Xeon(R) CPU E5320 @ 1.86GHz | ||
4758 | 186 | Voltage: 1.4 V | ||
4759 | 187 | External Clock: 1066 MHz | ||
4760 | 188 | Max Speed: 3600 MHz | ||
4761 | 189 | Current Speed: 1867 MHz | ||
4762 | 190 | Status: Populated, Idle | ||
4763 | 191 | Upgrade: <OUT OF SPEC> | ||
4764 | 192 | L1 Cache Handle: 0x0703 | ||
4765 | 193 | L2 Cache Handle: 0x0704 | ||
4766 | 194 | L3 Cache Handle: 0x0705 | ||
4767 | 195 | Serial Number: Not Specified | ||
4768 | 196 | Asset Tag: Not Specified | ||
4769 | 197 | Part Number: Not Specified | ||
4770 | 198 | |||
4771 | 199 | Handle 0x0700, DMI type 7, 19 bytes. | ||
4772 | 200 | Cache Information | ||
4773 | 201 | Socket Designation: Not Specified | ||
4774 | 202 | Configuration: Enabled, Not Socketed, Level 1 | ||
4775 | 203 | Operational Mode: Write Back | ||
4776 | 204 | Location: Internal | ||
4777 | 205 | Installed Size: 128 KB | ||
4778 | 206 | Maximum Size: 128 KB | ||
4779 | 207 | Supported SRAM Types: | ||
4780 | 208 | Unknown | ||
4781 | 209 | Installed SRAM Type: Unknown | ||
4782 | 210 | Speed: Unknown | ||
4783 | 211 | Error Correction Type: Single-bit ECC | ||
4784 | 212 | System Type: Data | ||
4785 | 213 | Associativity: 8-way Set-associative | ||
4786 | 214 | |||
4787 | 215 | Handle 0x0701, DMI type 7, 19 bytes. | ||
4788 | 216 | Cache Information | ||
4789 | 217 | Socket Designation: Not Specified | ||
4790 | 218 | Configuration: Enabled, Not Socketed, Level 2 | ||
4791 | 219 | Operational Mode: Write Back | ||
4792 | 220 | Location: Internal | ||
4793 | 221 | Installed Size: 8192 KB | ||
4794 | 222 | Maximum Size: 8192 KB | ||
4795 | 223 | Supported SRAM Types: | ||
4796 | 224 | Unknown | ||
4797 | 225 | Installed SRAM Type: Unknown | ||
4798 | 226 | Speed: Unknown | ||
4799 | 227 | Error Correction Type: Single-bit ECC | ||
4800 | 228 | System Type: Unified | ||
4801 | 229 | Associativity: 16-way Set-associative | ||
4802 | 230 | |||
4803 | 231 | Handle 0x0702, DMI type 7, 19 bytes. | ||
4804 | 232 | Cache Information | ||
4805 | 233 | Socket Designation: Not Specified | ||
4806 | 234 | Configuration: Enabled, Not Socketed, Level 3 | ||
4807 | 235 | Operational Mode: Write Back | ||
4808 | 236 | Location: Internal | ||
4809 | 237 | Installed Size: 0 KB | ||
4810 | 238 | Maximum Size: 0 KB | ||
4811 | 239 | Supported SRAM Types: | ||
4812 | 240 | Unknown | ||
4813 | 241 | Installed SRAM Type: Unknown | ||
4814 | 242 | Speed: Unknown | ||
4815 | 243 | Error Correction Type: Single-bit ECC | ||
4816 | 244 | System Type: Unified | ||
4817 | 245 | Associativity: Unknown | ||
4818 | 246 | |||
4819 | 247 | Handle 0x0703, DMI type 7, 19 bytes. | ||
4820 | 248 | Cache Information | ||
4821 | 249 | Socket Designation: Not Specified | ||
4822 | 250 | Configuration: Enabled, Not Socketed, Level 1 | ||
4823 | 251 | Operational Mode: Write Back | ||
4824 | 252 | Location: Internal | ||
4825 | 253 | Installed Size: 128 KB | ||
4826 | 254 | Maximum Size: 128 KB | ||
4827 | 255 | Supported SRAM Types: | ||
4828 | 256 | Unknown | ||
4829 | 257 | Installed SRAM Type: Unknown | ||
4830 | 258 | Speed: Unknown | ||
4831 | 259 | Error Correction Type: Single-bit ECC | ||
4832 | 260 | System Type: Data | ||
4833 | 261 | Associativity: 8-way Set-associative | ||
4834 | 262 | |||
4835 | 263 | Handle 0x0704, DMI type 7, 19 bytes. | ||
4836 | 264 | Cache Information | ||
4837 | 265 | Socket Designation: Not Specified | ||
4838 | 266 | Configuration: Enabled, Not Socketed, Level 2 | ||
4839 | 267 | Operational Mode: Write Back | ||
4840 | 268 | Location: Internal | ||
4841 | 269 | Installed Size: 8192 KB | ||
4842 | 270 | Maximum Size: 8192 KB | ||
4843 | 271 | Supported SRAM Types: | ||
4844 | 272 | Unknown | ||
4845 | 273 | Installed SRAM Type: Unknown | ||
4846 | 274 | Speed: Unknown | ||
4847 | 275 | Error Correction Type: Single-bit ECC | ||
4848 | 276 | System Type: Unified | ||
4849 | 277 | Associativity: 16-way Set-associative | ||
4850 | 278 | |||
4851 | 279 | Handle 0x0705, DMI type 7, 19 bytes. | ||
4852 | 280 | Cache Information | ||
4853 | 281 | Socket Designation: Not Specified | ||
4854 | 282 | Configuration: Enabled, Not Socketed, Level 3 | ||
4855 | 283 | Operational Mode: Write Back | ||
4856 | 284 | Location: Internal | ||
4857 | 285 | Installed Size: 0 KB | ||
4858 | 286 | Maximum Size: 0 KB | ||
4859 | 287 | Supported SRAM Types: | ||
4860 | 288 | Unknown | ||
4861 | 289 | Installed SRAM Type: Unknown | ||
4862 | 290 | Speed: Unknown | ||
4863 | 291 | Error Correction Type: Single-bit ECC | ||
4864 | 292 | System Type: Unified | ||
4865 | 293 | Associativity: Unknown | ||
4866 | 294 | |||
4867 | 295 | Handle 0x0800, DMI type 8, 9 bytes. | ||
4868 | 296 | Port Connector Information | ||
4869 | 297 | Internal Reference Designator: Not Specified | ||
4870 | 298 | Internal Connector Type: None | ||
4871 | 299 | External Reference Designator: Not Specified | ||
4872 | 300 | External Connector Type: DB-15 female | ||
4873 | 301 | Port Type: Video Port | ||
4874 | 302 | |||
4875 | 303 | Handle 0x0801, DMI type 8, 9 bytes. | ||
4876 | 304 | Port Connector Information | ||
4877 | 305 | Internal Reference Designator: Not Specified | ||
4878 | 306 | Internal Connector Type: None | ||
4879 | 307 | External Reference Designator: Not Specified | ||
4880 | 308 | External Connector Type: DB-15 female | ||
4881 | 309 | Port Type: Video Port | ||
4882 | 310 | |||
4883 | 311 | Handle 0x0802, DMI type 8, 9 bytes. | ||
4884 | 312 | Port Connector Information | ||
4885 | 313 | Internal Reference Designator: Not Specified | ||
4886 | 314 | Internal Connector Type: None | ||
4887 | 315 | External Reference Designator: Not Specified | ||
4888 | 316 | External Connector Type: Access Bus (USB) | ||
4889 | 317 | Port Type: USB | ||
4890 | 318 | |||
4891 | 319 | Handle 0x0803, DMI type 8, 9 bytes. | ||
4892 | 320 | Port Connector Information | ||
4893 | 321 | Internal Reference Designator: Not Specified | ||
4894 | 322 | Internal Connector Type: None | ||
4895 | 323 | External Reference Designator: Not Specified | ||
4896 | 324 | External Connector Type: Access Bus (USB) | ||
4897 | 325 | Port Type: USB | ||
4898 | 326 | |||
4899 | 327 | Handle 0x0804, DMI type 8, 9 bytes. | ||
4900 | 328 | Port Connector Information | ||
4901 | 329 | Internal Reference Designator: Not Specified | ||
4902 | 330 | Internal Connector Type: None | ||
4903 | 331 | External Reference Designator: Not Specified | ||
4904 | 332 | External Connector Type: Access Bus (USB) | ||
4905 | 333 | Port Type: USB | ||
4906 | 334 | |||
4907 | 335 | Handle 0x0805, DMI type 8, 9 bytes. | ||
4908 | 336 | Port Connector Information | ||
4909 | 337 | Internal Reference Designator: Not Specified | ||
4910 | 338 | Internal Connector Type: None | ||
4911 | 339 | External Reference Designator: Not Specified | ||
4912 | 340 | External Connector Type: Access Bus (USB) | ||
4913 | 341 | Port Type: USB | ||
4914 | 342 | |||
4915 | 343 | Handle 0x0806, DMI type 126, 9 bytes. | ||
4916 | 344 | Inactive | ||
4917 | 345 | |||
4918 | 346 | Handle 0x0807, DMI type 126, 9 bytes. | ||
4919 | 347 | Inactive | ||
4920 | 348 | |||
4921 | 349 | Handle 0x0808, DMI type 8, 9 bytes. | ||
4922 | 350 | Port Connector Information | ||
4923 | 351 | Internal Reference Designator: Not Specified | ||
4924 | 352 | Internal Connector Type: Access Bus (USB) | ||
4925 | 353 | External Reference Designator: Not Specified | ||
4926 | 354 | External Connector Type: None | ||
4927 | 355 | Port Type: USB | ||
4928 | 356 | |||
4929 | 357 | Handle 0x0809, DMI type 8, 9 bytes. | ||
4930 | 358 | Port Connector Information | ||
4931 | 359 | Internal Reference Designator: Not Specified | ||
4932 | 360 | Internal Connector Type: None | ||
4933 | 361 | External Reference Designator: Not Specified | ||
4934 | 362 | External Connector Type: RJ-45 | ||
4935 | 363 | Port Type: Network Port | ||
4936 | 364 | |||
4937 | 365 | Handle 0x080A, DMI type 8, 9 bytes. | ||
4938 | 366 | Port Connector Information | ||
4939 | 367 | Internal Reference Designator: Not Specified | ||
4940 | 368 | Internal Connector Type: None | ||
4941 | 369 | External Reference Designator: Not Specified | ||
4942 | 370 | External Connector Type: RJ-45 | ||
4943 | 371 | Port Type: Network Port | ||
4944 | 372 | |||
4945 | 373 | Handle 0x080B, DMI type 8, 9 bytes. | ||
4946 | 374 | Port Connector Information | ||
4947 | 375 | Internal Reference Designator: Not Specified | ||
4948 | 376 | Internal Connector Type: None | ||
4949 | 377 | External Reference Designator: Not Specified | ||
4950 | 378 | External Connector Type: DB-9 male | ||
4951 | 379 | Port Type: Serial Port 16550A Compatible | ||
4952 | 380 | |||
4953 | 381 | Handle 0x0900, DMI type 9, 13 bytes. | ||
4954 | 382 | System Slot Information | ||
4955 | 383 | Designation: PCI1 | ||
4956 | 384 | Type: x8 PCI Express | ||
4957 | 385 | Current Usage: Available | ||
4958 | 386 | Length: Long | ||
4959 | 387 | Characteristics: | ||
4960 | 388 | 3.3 V is provided | ||
4961 | 389 | PME signal is supported | ||
4962 | 390 | |||
4963 | 391 | Handle 0x0901, DMI type 9, 13 bytes. | ||
4964 | 392 | System Slot Information | ||
4965 | 393 | Designation: PCI2 | ||
4966 | 394 | Type: x8 PCI Express | ||
4967 | 395 | Current Usage: Available | ||
4968 | 396 | Length: Long | ||
4969 | 397 | Characteristics: | ||
4970 | 398 | 3.3 V is provided | ||
4971 | 399 | PME signal is supported | ||
4972 | 400 | |||
4973 | 401 | Handle 0x0902, DMI type 9, 13 bytes. | ||
4974 | 402 | System Slot Information | ||
4975 | 403 | Designation: PCI3 | ||
4976 | 404 | Type: x4 PCI Express | ||
4977 | 405 | Current Usage: Available | ||
4978 | 406 | Length: Long | ||
4979 | 407 | Characteristics: | ||
4980 | 408 | 3.3 V is provided | ||
4981 | 409 | PME signal is supported | ||
4982 | 410 | |||
4983 | 411 | Handle 0x0903, DMI type 126, 13 bytes. | ||
4984 | 412 | Inactive | ||
4985 | 413 | |||
4986 | 414 | Handle 0x0904, DMI type 126, 13 bytes. | ||
4987 | 415 | Inactive | ||
4988 | 416 | |||
4989 | 417 | Handle 0x0905, DMI type 126, 13 bytes. | ||
4990 | 418 | Inactive | ||
4991 | 419 | |||
4992 | 420 | Handle 0x0A00, DMI type 10, 10 bytes. | ||
4993 | 421 | On Board Device 1 Information | ||
4994 | 422 | Type: Video | ||
4995 | 423 | Status: Enabled | ||
4996 | 424 | Description: Embedded ATI ES1000 Video | ||
4997 | 425 | On Board Device 2 Information | ||
4998 | 426 | Type: Ethernet | ||
4999 | 427 | Status: Enabled | ||
5000 | 428 | Description: Embedded Broadcom 5708 NIC 1 |
The diff has been truncated for viewing.