Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Add top 10 IdPs logging into test SP in monthly stats output
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhys Smith committed Sep 28, 2016
1 parent cfb6f66 commit df6ee26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utilities/stats-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ testsplogincount=$(grep $date $logslocation/test-sp/shibd.log* | grep "new sessi
# 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) }')

# 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)


# =====
# = Now we're ready to build the message. Different message for daily vs month/year
# =====
Expand Down Expand Up @@ -467,6 +471,8 @@ else
msg+="\n-----\n"
msg+="Test SP usage:\n"
msg+="-> $testsplogincount logins from $testspidpcount IdPs.\n"
msg+="\nTop 10 IdPs logged in from:\n"
msg+="$testsptoptenidpsbycount\n"
msg+="\n-----"
fi

Expand Down

0 comments on commit df6ee26

Please sign in to comment.