Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created December 2, 2011 15:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KristianLyng/1423630 to your computer and use it in GitHub Desktop.
Save KristianLyng/1423630 to your computer and use it in GitHub Desktop.
Cookie-Counter
kristian@odd:~$ varnishlog -d -k 100000 -O -i RxHeader -I Cookie -X Set-Cookie -u | sed 's/=[^;]*\(;\|$\)//g' -u | cut -b30- | awk '{for(i=1;i<NF;i++) { foo[$i]++ } } END{for (var in foo) { print var ":" foo[var]; } }'
PHPSESSID:1
ASPSESSIONIDSSBDDCAC:1
BCSI-CS-27C15425D9E30835:20
TG5H_fff8_saltkey:1
__utmz:49
TG5H_fff8_lastvisit:1
__utma:349
__utmb:238
__utmc:265
# Remove -d to do it on real-time data, first 100000 log lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment