some bash stuff

This commit is contained in:
mrbesen 2019-07-09 13:51:16 +02:00
parent fac0953cd3
commit fd794541ba
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,30 @@
dlbot
userlist:
journalctl -u dlbot | grep "chat_id=" | cut -s -d "=" -f 2 | cut -d "&" -f 1 | sort | uniq
user count:
journalctl -u dlbot | grep "chat_id=" | cut -s -d "=" -f 2 | cut -d "&" -f 1 | sort | uniq | wc -l
malformed links:
journalctl -u dlbot | grep "&text=Link+malformed." | wc -l
exception count
journalctl -u dlbot | grep "Exception" | grep -v "Caused by" | wc -l
exception type count
journalctl -u dlbot -o cat | grep "Exception" | grep -v "Caused by" | cut -d " " -f 1 | cut -d ":" -f 1 | sed 's/^.*\.//g' | sort | uniq -c | sort -hr
nsfwbot
unknown links:
journalctl -u nsfwbot -o cat | grep "unknown linktype: " | sort | uniq
dbsize over time:
journalctl -u nsfwbot | grep "&text=Known+Images%3A+" | cut -s -d % -f 2 | cut -c 4-
version2 (csv output):
journalctl -u nsfwbot | grep "&text=Known+Images%3A+" | cut -d m -f 1,4 | cut -d % -f 1,2 | sed 's/ mages%3A+/; /g'
version3 (csv with nice date format):
journalctl -o short-iso -u nsfwbot | grep "&text=Known+Images%3A+" | cut -d m -f 1,4 | cut -d % -f 1,2 | sed 's/ mages%3A+/; /g' | sed -E 's/T.*;/;/g'
mac.log:
links anz messungen, rechts: anzahl gemessener mac adressen
cat mac.log | cut -d - -f 2 | grep -n -o ';' | sort -n | uniq -c | cut -d : -f 1 | sort -n | cut -d ' ' -f 6 | uniq -c
links: anz macs, rechts: zeilen nr
cat mac.log | cut -d - -f 2 | grep -n -o ';' | sort -n | uniq -c | cut -d : -f 1 | sort -n

3
pullweb.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
#$1 = website
wget --mirror --convert-links --adjust-extension --page-requisites $1