Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / sphinx / sphinx_documents @ 17f78427

Historique | Voir | Annoter | Télécharger (664 octets)

1 0f672f4c Damien Alexandre
#!/bin/bash
2
3
# Damien Alexandre © 2013
4
#
5
# Output number of documents per Sphinx Index
6
# Need indextool (since version 0.9.9 )
7
8 52f29a4c Damien Alexandre
# Index path (where .sphx files are)
9 0f672f4c Damien Alexandre
idxpath=/var/lib/sphinxsearch/data/
10
11
#
12
#
13
14
case $1 in
15
   config)
16
        cat <<'EOM'
17 52f29a4c Damien Alexandre
graph_title Documents per index
18
graph_vlabel number
19 0f672f4c Damien Alexandre
graph_scale no
20 e08a6448 dipohl
graph_category search
21 0f672f4c Damien Alexandre
graph_info Report number of documents (using indextool) by Sphinx Index.
22
EOM
23
for i in `ls $idxpath/*.sph`; do
24
	fn=`basename $i .sph`
25
	echo "$fn.label $fn"
26
done
27
        exit 0;;
28
esac
29
30 17f78427 Lars Kruse
for i in `ls $idxpath/*.sph`; do
31 0f672f4c Damien Alexandre
	echo -n "`basename $i .sph`.value "
32
	echo `indextool --dumpheader $i | grep ^total-doc | cut -f2 -d\:`
33
done