aboutsummaryrefslogtreecommitdiff
path: root/share/examples/witness/lockgraphs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples/witness/lockgraphs.sh')
-rw-r--r--share/examples/witness/lockgraphs.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/share/examples/witness/lockgraphs.sh b/share/examples/witness/lockgraphs.sh
new file mode 100644
index 000000000000..cbb229228273
--- /dev/null
+++ b/share/examples/witness/lockgraphs.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+################################################################################
+#
+# lockgraphs.sh by Michele Dallachiesa -- 2008-05-07 -- v0.1
+#
+#
+################################################################################
+
+sysctl debug.witness.graphs | awk '
+BEGIN {
+ print "digraph lockgraphs {"
+ }
+
+NR > 1 && $0 ~ /"Giant"/ {
+ gsub(","," -> ");
+ print $0 ";"
+}
+
+END {
+ print "}"
+ }'
+
+#eof