aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJohn-Mark Gurney <jmg@FreeBSD.org>2004-07-27 00:36:53 +0000
committerJohn-Mark Gurney <jmg@FreeBSD.org>2004-07-27 00:36:53 +0000
commit03c439e6e0e6d2a915c329a2812eba2bb383a14b (patch)
treea1cb616e86817f72d8add2a22e5008ec5ca3f6fd /tools
parenta31f99f88782dbc23b0de334db12715923e5c034 (diff)
Notes
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/mtxstat/mtxratio.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/tools/mtxstat/mtxratio.sh b/tools/tools/mtxstat/mtxratio.sh
new file mode 100644
index 0000000000000..02a66a94a246b
--- /dev/null
+++ b/tools/tools/mtxstat/mtxratio.sh
@@ -0,0 +1,2 @@
+# $FreeBSD$
+sysctl debug.mutex.prof.stats | awk '$1 ~ /[0-9]+/ { if ($3 != 0) { hld_prc = $5 / $3 * 100; lck_prc = $6 / $3 * 100 } else { hld_prc = 0; lck_prc = 0 } print $1 " " $2 " " $3 " " $4 " " $5 " " hld_prc " " $6 " " lck_prc " " substr($0, index($0, $7)); next } { print }'