From 5760615df299ecf56e3dae06bdeab1078969dc91 Mon Sep 17 00:00:00 2001 From: Someone Date: Sun, 6 Oct 2013 20:29:50 +0200 Subject: [PATCH] generate stats with all entry types --- cron/ircsvcstats.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/cron/ircsvcstats.sh b/cron/ircsvcstats.sh index 7abbd46..dacbead 100755 --- a/cron/ircsvcstats.sh +++ b/cron/ircsvcstats.sh @@ -20,12 +20,15 @@ chmod -R 775 /tmp/irc/ &> /dev/null echo "dbsize.value $(du -b data/anope.db | awk '{print $1}')" > /tmp/irc/servicestats.txt echo "dblines.value $(cat data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "channelinfo.value $(egrep '^OBJECT ChannelInfo' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "nickcore.value $(egrep '^OBJECT NickCore' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "nickalias.value $(egrep '^OBJECT NickAlias' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "memo.value $(egrep '^OBJECT Memo' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "chanaccess.value $(egrep '^OBJECT ChanAccess' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "modelock.value $(egrep '^OBJECT ModeLock' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt -echo "nsmiscdata.value $(egrep '^OBJECT NSMiscData' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt + +for k in $(egrep '^OBJECT ' /srv/anope/data/anope.db | sort | uniq | sed -e 's/^OBJECT//'); do echo "et$(echo $k | awk '{print tolower($0)}').value $(egrep '^OBJECT '$k data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt; done + +#echo "channelinfo.value $(egrep '^OBJECT ChannelInfo' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt +#echo "nickcore.value $(egrep '^OBJECT NickCore' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt +#echo "nickalias.value $(egrep '^OBJECT NickAlias' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt +#echo "memo.value $(egrep '^OBJECT Memo' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt +#echo "chanaccess.value $(egrep '^OBJECT ChanAccess' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt +#echo "modelock.value $(egrep '^OBJECT ModeLock' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt +#echo "nsmiscdata.value $(egrep '^OBJECT NSMiscData' data/anope.db | wc -l)" >> /tmp/irc/servicestats.txt chmod 664 /tmp/irc/servicestats.txt &> /dev/null -- 2.43.0