Created
December 11, 2016 14:29
-
-
Save lucaswerkmeister/c0df15f1aab4a4235e72db145dcadc82 to your computer and use it in GitHub Desktop.
Days on which Postfix sent most outgoing emails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
journalctl -u postfix -o json | jq -r 'select(.MESSAGE | contains("to=")) | .["_SOURCE_REALTIME_TIMESTAMP"]' | awk '{sec=int($1/(1000*1000)); print sec, int(sec/(60*60*24))}' | uniq -f 1 -c | sort -rn | head | while read count stamp day; do printf '%s\t%s\n' "$count" "$(date -Idate -d @$stamp)"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment