batrick / cephfs-perf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MDS graph generation script almost there

bengland2 opened this issue · comments

@batrick I get an error from your makegraphs script that I think is caused by inactive MDSes, is there something that can be done in this script to filter them out? Otherwise I'll just have to write a script to figure out which MDS servers were the active ones. For example, if clients.txt is empty then you can stop there.

+ for stats in "$STATS"/*mds*/stats.db
++ dirname /home/bengland/ceph/linode/cephfs-perf/scripts/make-graphs
+ /home/bengland/ceph/linode/cephfs-perf/scripts/clients ./stats/mds-001/stats.db
++ dirname ./stats/mds-001/stats.db
+ DATA=./stats/mds-001/clients.txt
++ dirname ./stats/mds-001/stats.db
+ GRAPH=./stats/mds-001/clients-num_caps.eps
+ sqlite3 -csv ./stats/mds-001/stats.db
Error: near line 1: no such table: MDSStatus

when I delete stats.db in 2 of the 4 MDS directories (the inactive ones I think) so that it ignores them, it goes right through to mds-imported-inodes subscript.

+ /home/bengland/ceph/linode/cephfs-perf/scripts/mds-imported-inodes ./stats
+ DATA=./stats/mds-imported.csv
+ GRAPH=./stats/mds-imported.eps
+ cd ./stats
+ first=1
+ for mds in ceph-mds*
+ '[' 1 -eq 0 ']'
+ printf '"%s"\n' ceph-mds-imported.csv
+ sqlite3 -csv ceph-mds-imported.csv/stats.db
Error: unable to open database "ceph-mds-imported.csv/stats.db": unable to open database file

This is strange because ceph-mds-imported.csv is a text file, not a directory. But with this patch it worked:

[bengland@bene-laptop scripts]$ git diff
diff --git a/scripts/make-graphs b/scripts/make-graphs
index a1f59d1..c37565d 100755
--- a/scripts/make-graphs
+++ b/scripts/make-graphs
@@ -4,6 +4,7 @@ set -ex
 
 STATS="$1/stats"
 
+rm -fv $STATS/*mds-imported.csv
 for stats in "$STATS"/*mds*/st+ convert -flatten -density 800x800 ./stats/mds-imported.eps ./stats/mds-imported.png
convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `./stats/mds-imported.png' @ warning/png.c/MagickPNGWarningHandler/1665.
ats.db; do
        "$(dirname "$0")/clients" "$stats"
        "$(dirname "$0")/mdsmem" "$stats"

The graphs aren't colored because of this error:

+ convert -flatten -density 800x800 ./stats/mds-imported.eps ./stats/mds-imported.png
convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `./stats/mds-imported.png' @ warning/png.c/MagickPNGWarningHandler/1665.

Still have to figure that out.

IIRC, what should happen for inactive ranks is that the data produced by the sqlite queries should be empty. I'm not sure why the MDSStatus table would not exist. It's been a some time since I've looked at this. (Keep in mind that because of failovers, an MDS may be a rank for only a short time but this is not something I tested very well with the graph scripts.)

Not sure why those other problems occurred...