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