FreeBSD Bugzilla – Attachment 147754 Details for
Bug 187594
[zfs] [patch] ZFS ARC behavior problem and fix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
UMA summary script
vmstat.awk (text/plain), 1.51 KB, created by
Steven Hartland
on 2014-09-28 15:44:48 UTC
(
hide
)
Description:
UMA summary script
Filename:
MIME Type:
Creator:
Steven Hartland
Created:
2014-09-28 15:44:48 UTC
Size:
1.51 KB
patch
obsolete
>#!/usr/bin/awk -f > > >BEGIN { > FS=",|:"; > used = 0; > free = 0; > zused = 0; > zfree = 0; >} > >function hsize(val) >{ > if (val > 1024 ^ 3) { > return sprintf("%.3fGB", val / 1024 ^3); > } else if (val > 1024 ^ 2) { > return sprintf("%.0fMB", val / 1024 ^2); > } else if (val > 1024) { > return sprintf("%.0fKB", val / 1024); > } > > return sprintf("%db", val); >} > >{ > if (NF != 8) { > if ($0 ~ /^ITEM/) { > print "ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP USED(H) FREE(H) TOTAL(H) FREE%"; > } > } else { > used += ($2 * $4); > free += ($2 * $5); > gsub(/^[ \t]+/,"",$2); > gsub(/^[ \t]+/,"",$3); > gsub(/^[ \t]+/,"",$4); > gsub(/^[ \t]+/,"",$5); > gsub(/^[ \t]+/,"",$6); > gsub(/^[ \t]+/,"",$7); > if ($5 == 0) { > freepct = 0; > } else { > freepct = sprintf("%d%%", $5 / (($4 + $5) / 100)); > } > warn = "" > if (($2 * $5) > 50 * (1024 ^ 2)) { > warn = "**" > } > printf("%-24s%6s,%10s,%10s,%10s,%10s,%10s,%10s,%10s,%10s,%10s,%10s%s\n", $1":", $2, $3, $4, $5, $6, $7, $8, hsize($2 * $4), hsize($2 * $5), hsize($2 * ($4 + $5)), freepct, warn); > if ($1 ~ /^arc_|dmu_|dnode_|lz4_|range_seg_|reference_|sa_|zfs_|zio_/) { > zused += ($2 * $4); > zfree += ($2 * $5); > } > } >} > >END { > print "Totals" > print "oused: " hsize(used - zused) ", ofree: " hsize(free - zfree) ", ototal: " hsize((free + used) - (zfree + zused)); > print "zused: " hsize(zused) ", zfree: " hsize(zfree) ", ztotal: " hsize(zfree + zused); > print "used: " hsize(used) ", free: " hsize(free) ", total: " hsize(free + used); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 187594
:
140882
|
140883
|
140884
|
140885
|
140886
|
140887
|
140888
|
140889
|
140890
|
140891
|
140892
|
146178
|
146203
|
146249
|
146251
|
146287
|
146300
|
146373
|
146423
|
146424
|
146456
|
146816
|
146817
|
146851
|
146852
|
146854
|
146859
|
146861
|
146946
|
146947
|
146948
|
146949
|
147014
|
147068
|
147069
|
147070
|
147265
|
147274
|
147275
|
147276
|
147286
|
147459
|
147607
|
147609
|
147733
|
147738
| 147754 |
147815
|
152852
|
158809
|
159207
|
159688
|
159859
|
159905
|
161691
|
161692
|
161943
|
164051
|
174197
|
174198
|
174231
|
174232
|
174254
|
186818