[Migration] Migrate Podcast.update_interval
[mygpo.git] / bin / view-usage.sh
blob60b609cd18b3f2b94de77acd4df8c86565644dc0
1 #!/bin/bash
2 # When run on a CouchDB log file, determines the number of
3 # requests to individual views
4 # Usage: ./view-usage.sh /var/log/couchdb/couch.log
6 LOGFILE=$1
8 cat $LOGFILE | grep GET | awk '{print $13;}' | cut -f1 -d"?" | awk '{count[$1]++}END{for(j in count) print count[j],j}' | sort -n -r | head -n 10