DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T g

⟦9bb597edd⟧ TextFile

    Length: 2451 (0x993)
    Types: TextFile
    Names: »getstats.sh«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/others/quipu/tools/dsaconfig/quipu/scripts/getstats.sh« 

TextFile

: run this script through /bin/sh

DISHPARENT=$$ export DISHPARENT
if [ $$ -ge 32768 ];
then
    PORT="$$"
else
    PORT="`expr $$ + 32768`"
fi
DISHPROC="127.0.0.1 $PORT" export DISHPROC

if bind -c "Boa Constrictor" -u c=US@cn=Manager -pass secret ;
then
    squid
else
    exit 1
fi

search @c=US -singlelevel -filter objectClass=quipuNonLeafObject -relative -nosequence -nosizelimit -notimelimit > entries

sort < entries | while read x; do
    echo ''; echo "Counting $x..."

    if [ ! -d "$x" ]; then
	echo "creating directory for @c=US@$x"
	mkdir "$x" "$x/history"
	echo 0 > "$x/top.cnt"
    fi

    echo 0 > "$x/top.tmp"

    if bind -c "Boa Constrictor" -u c=US@cn=Manager -pass secret ;
    then
	moveto "@c=US@$x"
	dsa="`showentry -nokey -type masterDSA`"
	echo "using DSA $dsa for @c=US@$x"
	moveto "@$dsa"
	addr="`showentry -nokey -type presentationAddress`"
    else
	echo "unable to determine masterDSA for @c=US@$x"
	continue
    fi

: hack around dish bug
    unbind
    PORT="`expr $PORT + 1`"
    DISHPROC="127.0.0.1 $PORT" export DISHPROC

    if bind -c "$addr" -u c=US@cn=Manager -pass secret ;
    then
	(cd "$x"; gather.sh "@c=US@$x" top)

	echo "looking for Level-2 DSAs"
	search "@c=US@$x" -singlelevel -filter objectClass=dsa -relative -nosequence -nosizelimit -notimelimit > "$x/dsas"
	> "$x/addrs"
	cat "$x/dsas" | while read y; do
	    moveto "@c=US@$x@$y"
	    showentry -nokey -type presentationAddress >> "$x/addrs"
	done

	cat "$x/addrs" | while read y; do
: hack around dish bug
	    unbind
	    PORT="`expr $PORT + 1`"
	    DISHPROC="127.0.0.1 $PORT" export DISHPROC

	    echo "using Level-2 DSA at $y for @c=US@$x"
	    if bind -c "$y" -u c=US@cn=Manager -pass secret ;
	    then
		(cd "$x"; gather.sh "@c=US@$x" top)
	    fi
	done
    fi

    awk 'BEGIN { i = 0; } { i += $1; } END { printf ("%d\n", i); }' < \
	"$x/top.tmp" >> "$x/top.cnt"
    (cd "$x"; gather.sh "@c=US@$x" top total)
done

unbind

eval `getweek.sh`

for class in top;
do
    (for A in */$class.cnt; do tail -1 "$A"; done) | \
	awk 'BEGIN { i = 0; } { i += $1; } END { printf ("%d\n", i); }' >> \
	$class.cnt

    if [ "$DN" = 1 ]; then
	cp $class.cnt history/$class.cnt
    fi

    tail -30 $class.cnt | \
	graph -a -l "30 day history of $class entries in @c=US as of ${Y}-${M}-${DN}" > \
	$class-30.graph
    cat      $class.cnt | \
	graph -a -l "Number of $class entries in @c=US as of ${Y}-${M}-${DN}" > \
	$class-total.graph
done

exit 0