mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-11 14:10:34 +00:00
Add a new awk script which parses informations returned by the newly
added sysctl debug.witness.graphs and returns all the graphs involving Giant lock creating an appropriate script in DOT format which can be plotted immediately. Submitted by: Michele Dallachiesa <michele dot dallachiesa at poste dot it>
This commit is contained in:
parent
688b98135c
commit
29614b3788
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178842
24
share/examples/witness/lockgraphs.sh
Normal file
24
share/examples/witness/lockgraphs.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
#
|
||||
# lockgraphs.sh by Michele Dallachiesa -- 2008-05-07 -- v0.1
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
################################################################################
|
||||
|
||||
sysctl debug.witness.graphs | awk '
|
||||
BEGIN {
|
||||
print "digraph lockgraphs {"
|
||||
}
|
||||
|
||||
NR > 1 && $0 ~ /"Giant"/ {
|
||||
gsub(","," -> ");
|
||||
print $0 ";"
|
||||
}
|
||||
|
||||
END {
|
||||
print "}"
|
||||
}'
|
||||
|
||||
#eof
|
Loading…
Reference in New Issue
Block a user