Skip to content

Commit

Permalink
Update stats script for column change in log files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Smith committed Sep 20, 2018
1 parent 20bc3bc commit e7e8520
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities/stats-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -669,12 +669,12 @@ fi
testsplogincount=$(grep $date $logslocation/test-sp/shibd.log* | grep "new session created" | wc -l | awk '{ printf ("%'"'"'d\n", $0) }')

# And from how many unique IdPs?
testspidpcount=$(grep $date $logslocation/test-sp/shibd.log* | grep "new session created" | cut -f 12 -d " " | sort | uniq | wc -l | awk '{ printf ("%'"'"'d\n", $0) }')
testspidpcount=$(grep $date $logslocation/test-sp/shibd.log* | grep "new session created" | cut -f 13 -d " " | sort | uniq | wc -l | awk '{ printf ("%'"'"'d\n", $0) }')

# Don't count these for daily stats
if [[ "$timeperiod" != "day" ]]; then
# Top 10 IdPs used to log into the Test SP
testsptoptenidpsbycount=$(grep $date $logslocation/test-sp/shibd.log* | grep "new session created" | awk '{print $12}' | cut -d "(" -f 2 | cut -d ")" -f 1 | sort | uniq -c | sort -nr | head -10)
testsptoptenidpsbycount=$(grep $date $logslocation/test-sp/shibd.log* | grep "new session created" | awk '{print $13}' | cut -d "(" -f 2 | cut -d ")" -f 1 | sort | uniq -c | sort -nr | head -10)
fi


Expand Down

0 comments on commit e7e8520

Please sign in to comment.