This commit is contained in:
parent
4ed16744e8
commit
8296087a89
3 changed files with 0 additions and 202 deletions
|
@ -1,81 +0,0 @@
|
|||
#!/bin/sh
|
||||
## Dieses Script nutzt die Dienste von finanztr*ff.d*
|
||||
## Dieser generiert Grafiken fuer Aktien-/Fondkurse.
|
||||
##
|
||||
## geeks starten $0
|
||||
## lamer glotzen auf www.mon*ysp*cial.d*
|
||||
|
||||
#### Grundeinstellungen
|
||||
## Schreib jeweils die WKN/ISIN und den Namen in eine Zeile einer Datei.
|
||||
## Beide duerfen keine Leerzeichen enthalten. Bsp:
|
||||
## 12345 Eine_Sinnlos_Aktie
|
||||
|
||||
## hier kommt der Dateiname rein:
|
||||
WKNFILE="wkns.txt"
|
||||
|
||||
## alt: hier die Wertpapierkennnummern eintragen (WKN oder ISIN)
|
||||
#WKN="881823 980705 870737 847652 847414 DE000A0AB0K1 DE0005152623 LU0048578792 DE0009802306 DE0009848002"
|
||||
|
||||
## DURATION bestimmt das angezeigte Intervall
|
||||
## 0 ist Tageskurs; x0 sind Tage; x00 sind Monate; x0000 Jahre
|
||||
DURATION="30 300 10000 30000"
|
||||
PREDURATION="&zeit="
|
||||
## Groesse der Grafik
|
||||
WIDTH="&b=400"
|
||||
HEIGHT="&h=240"
|
||||
|
||||
##### Spezialeinstellungen
|
||||
## mit TYP wird die Art des Graphen ausgewaehlt
|
||||
TYP="&typ=0"
|
||||
## AVERAGE zeichnet die Mittelwerte der letzten x Tage
|
||||
AVERAGE1="&d=38"
|
||||
AVERAGE2="&d=200"
|
||||
|
||||
##### ab hier brauchst du in der Regel nichts mehr aendern
|
||||
BASEURL="http://gfx.finanztreff.de/charts/cc_gatrixx.gfx?"
|
||||
IMAGETYP="&out=png"
|
||||
## BOERSE _muss_ angegeben werden; k.A. ob grosse Unterschiede zwischen den Boersen existieren
|
||||
BOERSE="&boerse=1"
|
||||
## hab ich nicht weiter getestet, bleibt deswegen erstmal default
|
||||
LAND="$land=276"
|
||||
DATE=`date '+0%Y-%m-%d'`
|
||||
|
||||
##### genug Variablen jetzt geht's los
|
||||
WKN=( `cat "${WKNFILE}"` )
|
||||
COUNT=${#WKN[@]}
|
||||
INDEX=0
|
||||
echo "Ich hole folgende Paare:"
|
||||
echo -e "WKN\tNAME"
|
||||
while [ $INDEX -lt $COUNT ]; do
|
||||
echo -e "${WKN[$INDEX]}\t${WKN[$INDEX+1]}"
|
||||
INDEX=$(( $INDEX+2 ))
|
||||
done
|
||||
read -p "Korrekt? (j/n)" WILLE
|
||||
if [ X"$WILLE" != X"j" ]; then
|
||||
echo $WILLE
|
||||
echo "dann eben nicht"
|
||||
exit 1
|
||||
else
|
||||
mkdir $DATE || exit 2
|
||||
cd $DATE
|
||||
COUNT=${#WKN[@]}
|
||||
INDEX=0
|
||||
while [ $INDEX -lt $COUNT ]; do
|
||||
THIS_WKN=${WKN[$INDEX]}
|
||||
THIS_NAME=${WKN[$INDEX+1]}
|
||||
SEMIURL="herkunft=123&string=${THIS_WKN}${WIDTH}${HEIGHT}${IMAGETYP}${TYP}\
|
||||
${AVERAGE1}${AVERAGE2}${BOERSE}${LAND}"
|
||||
URL=${BASEURL}${SEMIURL}
|
||||
## referer wird nur so gesetzt, wegen finanztreff
|
||||
REFERER="http://www.moneyspecial.de/123/kurse_einzelkurs_charts.htm?u=0&p=0&k=0&seite=kurse${SEMIURL}"
|
||||
echo -e "Ich hole jetzt die Grafiken fuer: ${THIS_WKN} ${THIS_NAME}\n"
|
||||
for THIS_DURATION in $DURATION; do
|
||||
URL2=${URL}${PREDURATION}${THIS_DURATION}
|
||||
echo -e "--> $URL2 \n"
|
||||
wget ${URL2} --referer=${REFERER} -O ${DATE}_${THIS_WKN}_${THIS_NAME}_${THIS_DURATION}.png -q
|
||||
done
|
||||
INDEX=$(( $INDEX+2 ))
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
cd "/home/age/logs/sao-apache/2006"
|
||||
#TODO
|
||||
## das ist hier etwas bloede
|
||||
## die logfiles sollten gzipped sein und ein .gz am ende haben
|
||||
## hier stehen sie aber ophne drin
|
||||
LOGFILES="access-sao2006-02.log.shrunk access-sobi2006-02.log.shrunk"
|
||||
|
||||
DEST="/tmp/tmplog"
|
||||
## hier werden ein paar dinge rausgefiltert
|
||||
for SRC in $LOGFILES; do
|
||||
cp -v ${SRC}.gz ${DEST}.gz
|
||||
gunzip -v ${DEST}.gz
|
||||
rows_orig=`wc -l $DEST | cut -d " " -f 1`
|
||||
## hier kannst du deine inline sed replacements einfuegen
|
||||
sed -i 's/^/127.0.0.1 /' $DEST
|
||||
sed -i '/Python-urllib/d' $DEST
|
||||
#sed -i '/\"Wget\/1\.9\.1\"/d' $DEST
|
||||
sed -i '/check_http\/1\.81/d' $DEST
|
||||
sed -i '/U\;\ Nessus/d' $DEST
|
||||
sed -i '/action=rss/d' $DEST
|
||||
rows_filtered=`wc -l $DEST | cut -d " " -f 1`
|
||||
echo "logentries original: $rows_orig and filtered: $rows_filtered"
|
||||
visitors -AT -m 30 ${DEST} -o html --prefix https://systemausfall.org > ${SRC}_report_full.html
|
||||
echo "generated full report"
|
||||
visitors -WKOBXY -m 30 -i 15 -x 15 ${DEST} -o html --prefix https://systemausfall.org > ${SRC}_report_public.html
|
||||
echo "generated public report"
|
||||
visitors ${DEST} --prefix https://systemausfall.org --graphviz > ${SRC}.graph.dot
|
||||
neato ${SRC}.graph.dot -Tpng -o ${SRC}.graph.png
|
||||
rm "$DEST" "${SRC}.graph.dot"
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
## den report gengerieren
|
||||
#visitors --prefix https://systemausfall.org -AT -m 30 ${DEST}.0 -o html > ${SRC}_fullreport.html
|
||||
#visitors --prefix https://systemausfall.org -XKUWDOBT -m 30 ${SRC}.clean -o html > ${SRC}_customreport.html
|
||||
#echo "generated custom report"
|
||||
#visitors --prefix https://systemausfall.org -WKOBXY -m 30 -i 15 -x 15 ${SRC}.clean -o html > ${SRC}_publicreport.html
|
||||
|
||||
## noch ne kleine grafik erzeugen
|
||||
#echo "generating the graph"
|
||||
#visitors ${SRC}.clean --prefix https://systemausfall.org --graphviz > ${SRC}.graph.dot
|
||||
#dot ${SRC}.graph.dot -Tpng > ${SRC}.graph.png
|
||||
|
||||
|
||||
###############################################
|
||||
|
||||
cp ${SRCSAO}.gz ${DESTSAO}.gz
|
||||
gunzip $DESTSAO
|
||||
sed -i 's/^/127.0.0.1 /' $DESTSAO
|
||||
sed -i '/Python-urllib/d' $DESTSAO
|
||||
#sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
||||
sed -i '/check_http\/1\.81/d' $DESTSAO
|
||||
sed -i '/U\;\ Nessus/d' $DESTSAO
|
||||
sed -i '/action=rss/d' $DESTSAO
|
||||
cp $DESTSAO ${SRCSAO}.clean
|
||||
#rm ${DESTSAO}.*
|
||||
|
||||
|
||||
cp $SRCSOBI.gz $DESTSOBI.gz
|
||||
gunzip $DESTSOBI
|
||||
sed -i 's/^/127.0.0.1 /' $DESTSOBI
|
||||
sed '/Python-urllib/d' $DESTSOBI > ${DESTSOBI}.a
|
||||
#sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
||||
sed '/U\;\ Nessus/d' $DESTSOBI.a > ${DESTSOBI}.c
|
||||
sed '/action=rss/d' $DESTSOBI.c > ${DESTSOBI}.d
|
||||
cp ${DESTSOBI}.d ${SRCSOBI}.clean
|
||||
#rm ${DESTSOBI}.*
|
||||
|
||||
visitors -XKUWDOBT -m 30 ${SRCSAO}.clean -o html --prefix https://systemausfall.org > ${SRCSAO}_report.html
|
||||
visitors ${SRCSAO}.clean --prefix https://systemausfall.org --graphviz > ${SRCSAO}.graph.dot
|
||||
neato ${SRCSAO}.graph.dot -Tpng -o ${SRCSAO}.graph.png
|
||||
|
||||
visitors -XKUWDOBT -m 30 ${SRCSOBI}.clean -o html --prefix https://systemausfall.org > ${SRCSOBI}_report.html
|
||||
visitors ${SRCSOBI}.clean --prefix https://systemausfall.org --graphviz > ${SRCSOBI}.graph.dot
|
||||
neato ${SRCSOBI}.graph.dot -Tpng -o ${SRCSOBI}.graph.png
|
||||
|
||||
for $SRC in $LOGFILES; do
|
||||
DEST=${SRC}.tmp
|
||||
cp $SRC.gz $DEST.gz
|
||||
gunzip $DEST
|
||||
sed -i 's/^/127.0.0.1 /' $DEST
|
||||
sed '/Python-urllib/d' $DEST> ${DEST}.a
|
||||
#sed '/\"Wget\/1\.9\.1\"/d' $DEST.a > ${DEST}.b
|
||||
sed '/U\;\ Nessus/d' $DEST.a > ${DEST}.c
|
||||
sed '/action=rss/d' $DEST.c > ${DEST}.d
|
||||
cp ${DEST}.d ${SRC}.clean
|
||||
visitors -XKUWDOBT -m 30 ${SRC}.clean -o html --prefix https://systemausfall.org > ${SRC}_report.html
|
||||
visitors ${SRC}.clean --prefix https://systemausfall.org --graphviz > ${SRC}.graph.dot
|
||||
neato ${SRC}.graph.dot -Tpng -o ${SRC}.graph.png
|
||||
done
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
#DATE=`date '+%Y-%m'`
|
||||
DATE=`date -d '1 month ago' '+%Y-%m'`
|
||||
SRC="/var/log/apache/access-${DATE}.log"
|
||||
DST_SAO="/tmp/access-${DATE}_sao.log.shrunk"
|
||||
DST_SOBI="/tmp/access-${DATE}_sobi.log.shrunk"
|
||||
|
||||
nice -n 10 cat ${SRC} | grep "webproxy pound" | grep "systemausfall.org" > ${DST_SAO}
|
||||
[ -e ${DST_SAO}.gz ] && rm ${DST_SAO}.gz
|
||||
gzip ${DST_SAO}
|
||||
|
||||
nice -n 10 cat ${SRC} | grep "webproxy pound" | grep "soziale-bildung.org" > ${DST_SAO}
|
||||
[ -e ${DST_SAO}.gz ] && rm ${DST_SAO}.gz
|
||||
gzip ${DST_SAO}
|
||||
|
||||
|
||||
## we have no mailservice at all
|
||||
#MAILBODY="scp uml-webproxy@systemausfall.org:/var/log/access.log.now.gz . && \n gunzip access.log.now && \n visitors -A -m 30 access.log.now --prefix systemausfall.org -o html > report-${DATE}.html"
|
||||
#echo $MAILBODY > /tmp/foo
|
||||
#mutt -n -F /dev/null -s "access.log" age < /tmp/foo
|
||||
#rm $SRC
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue