Commit 464ef5d6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

update azbyka_stat

parent c7cbdd45
...@@ -17,6 +17,10 @@ for i in /azbyka/*/log/*_error.log ; do ...@@ -17,6 +17,10 @@ for i in /azbyka/*/log/*_error.log ; do
echo echo
echo "$i" echo "$i"
cat $0.tmp cat $0.tmp
echo
done >>$NS done >>$NS
rm -f $0.tmp rm -f $0.tmp
tail /azbyka/azbyka_otechnik/tmp/logs/calibre_worker.log -n100 >>$NS
...@@ -11,6 +11,12 @@ format() ...@@ -11,6 +11,12 @@ format()
xargs printf "%5d %-100s %s\n" xargs printf "%5d %-100s %s\n"
} }
dodirname()
{
# FIXME: xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option
xargs -r dirname 2>/dev/null
}
for i in $IN ; do for i in $IN ; do
echo >>$NS echo >>$NS
...@@ -34,7 +40,7 @@ for i in $IN ; do ...@@ -34,7 +40,7 @@ for i in $IN ; do
#cat $i | #cat $i |
tail $i -n3000 | perl -p -e 's|.*"GET (.*) HTTP.*|\1|g' | sort | uniq -c | sort -n -r | head -n 15 | sed -e "s|/audio/audio1||g" >>$NS tail $i -n3000 | perl -p -e 's|.*"GET (.*) HTTP.*|\1|g' | sort | uniq -c | sort -n -r | head -n 15 | sed -e "s|/audio/audio1||g" >>$NS
echo >>$NS echo >>$NS
tail $i -n3000 | perl -p -e 's|.*"GET (.*) HTTP.*|\1|g' | xargs -r dirname | sort | uniq -c | sort -n -r | head -n 15 | sed -e "s|/audio/audio1||g" >>$NS tail $i -n3000 | perl -p -e 's|.*"GET (.*) HTTP.*|\1|g' | dodirname | sort | uniq -c | sort -n -r | head -n 15 | sed -e "s|/audio/audio1||g" >>$NS
echo >>$NS echo >>$NS
tail $i -n3000 | perl -p -e 's|.*"GET (.*) HTTP.*|\1|g' | xargs -r dirname | xargs -r dirname | sort | uniq -c | sort -n -r | head -n 15 | sed -e "s|/audio/audio1||g" >>$NS tail $i -n3000 | perl -p -e 's|.*"GET (.*) HTTP.*|\1|g' | dodirname | dodirname | sort | uniq -c | sort -n -r | head -n 15 | sed -e "s|/audio/audio1||g" >>$NS
done done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment