Skip to content

Instantly share code, notes, and snippets.

@tjfontaine
Last active December 19, 2015 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjfontaine/a7fd96fa27c8a8f24452 to your computer and use it in GitHub Desktop.
Save tjfontaine/a7fd96fa27c8a8f24452 to your computer and use it in GitHub Desktop.
### All in the past 30 log files
#nodejs.2013-06-12T03:10:01.000Z
#nodejs.2013-06-13T03:10:02.000Z
#nodejs.2013-06-14T03:10:01.000Z
#nodejs.2013-06-15T03:10:01.000Z
#nodejs.2013-06-16T03:10:02.000Z
#nodejs.2013-06-17T03:10:01.000Z
#nodejs.2013-06-19T03:10:02.000Z
#nodejs.2013-06-20T03:10:01.000Z
#nodejs.2013-06-21T03:10:02.000Z
#nodejs.2013-06-22T03:10:01.000Z
#nodejs.2013-06-23T03:10:03.000Z
#nodejs.2013-06-24T03:10:01.000Z
#nodejs.2013-06-25T03:10:01.000Z
#nodejs.2013-06-26T03:10:02.000Z
#nodejs.2013-06-27T03:10:01.000Z
#nodejs.2013-06-28T03:10:02.000Z
#nodejs.2013-06-29T03:10:02.000Z
#nodejs.2013-06-30T03:10:01.000Z
#nodejs.2013-07-01T03:10:00.000Z
#nodejs.2013-07-02T03:10:01.000Z
#nodejs.2013-07-03T03:10:01.000Z
#nodejs.2013-07-04T03:10:02.000Z
#nodejs.2013-07-05T03:10:02.000Z
#nodejs.2013-07-06T03:10:01.000Z
#nodejs.2013-07-07T03:10:02.000Z
#nodejs.2013-07-08T03:10:02.000Z
#nodejs.2013-07-09T03:10:01.000Z
#nodejs.2013-07-10T03:10:02.000Z
#nodejs.2013-07-11T03:10:01.000Z
#nodejs.2013-07-12T03:10:01.000Z
# most popular platforms
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodePlatform" -r "sort | uniq -c | sort -n"
1003 sunos
55784 darwin
100227 linux
226911 win32
729393 source
# what's going on with those windows downloads?
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodePlatform userAgent | grep win32" -r "sort | uniq -c | sort -n"
...
10601 win32 Platform-Installer/4.0.0.0(Microsoft Windows NT 6.2.9200.0)
13744 win32 Platform-Installer/4.0.0.0(Microsoft Windows NT 6.1.7601 Service Pack 1)
153372 win32 Download Master
# ugh, Download Master uses range requests, it will take more work to only report the first
# redo popular platforms without Download Master
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodePlatform userAgent | grep -v 'Download Master' | cut -f1" -r "sort | uniq -c | sort -n"
1003 sunos
55784 darwin
73539 win32
100226 linux
729386 source
# popular platform and arch downloads
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodePlatform nodeArch userAgent | grep -v 'Download Master' | cut -f1,2" -r "sort | uniq -c | sort -n"
28 win32 x64
448 sunos x86
555 sunos x64
1306 darwin x86
2689 linux arm-pi
11393 darwin x64
11673 linux x86
43085 darwin both
73511 win32 x86
85864 linux x64
729386 source all
# 10 most popular versions (source or binary)
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodeVersion userAgent | egrep -v '(source|Download Master)' | cut -f1" -r "sort | uniq -c | sort -n"
...
28048 v0.10.5
31365 v0.8.18
31998 v0.8.14
35706 v0.6.20
38682 v0.10.10
42735 v0.10.13
49887 v0.8.25
57562 v0.10.11
72173 v0.8.22
287400 v0.10.12
# why is 0.6.20 still so popular?
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodeVersion userAgent refer | grep 0.6.20" -r "sort | uniq -c | sort -n"
...
130 v0.6.20 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0) -
143 v0.6.20 Platform-Installer/4.0.0.0(Microsoft Windows NT 6.1.7600.0) wpi://2.1.0.0/Microsoft Windows NT 6.1.7600.0
221 v0.6.20 Platform-Installer/4.0.0.0(Microsoft Windows NT 6.0.6002 Service Pack 2) wpi://2.1.0.0/Microsoft Windows NT 6.0.6002 Service Pack 2
270 v0.6.20 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) -
314 v0.6.20 curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5 -
355 v0.6.20 curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5 -
9616 v0.6.20 Platform-Installer/4.0.0.0(Microsoft Windows NT 6.2.9200.0) wpi://2.1.0.0/Microsoft Windows NT 6.2.9200.0
11683 v0.6.20 - -
12272 v0.6.20 Platform-Installer/4.0.0.0(Microsoft Windows NT 6.1.7601 Service Pack 1) wpi://2.1.0.0/Microsoft Windows NT 6.1.7601 Service Pack 1
# What's the most popular version on homebrew in the past 30
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js nodeVersion userAgent | grep Homebrew | sed -E 's#(Homebrew).*#\1#'" -r "sort | uniq -cd | sort -n"
...
179 v0.10.3 Homebrew
236 v0.10.4 Homebrew
319 v0.10.7 Homebrew
320 v0.10.8 Homebrew
332 v0.10.9 Homebrew
661 v0.10.5 Homebrew
2567 v0.10.10 Homebrew
4907 v0.10.13 Homebrew
5652 v0.10.11 Homebrew
17338 v0.10.12 Homebrew
# homebrew by day
mfind --type o /NodeCore/stor/nginx/access_log | sort | tail -30 | mjob create -o -s /tjfontaine/public/apache.js -m "node /assets/tjfontaine/public/apache.js date nodeVersion userAgent | grep Homebrew | sed -E 's#(Homebrew).*#\1#'" -r "sort | uniq -cd"
...
11 2013-07-12 v0.10.10 Homebrew
7 2013-07-12 v0.10.11 Homebrew
107 2013-07-12 v0.10.12 Homebrew
1246 2013-07-12 v0.10.13 Homebrew
7 2013-07-12 v0.10.2 Homebrew
6 2013-07-12 v0.10.3 Homebrew
6 2013-07-12 v0.10.4 Homebrew
21 2013-07-12 v0.10.5 Homebrew
3 2013-07-12 v0.10.6 Homebrew
8 2013-07-12 v0.10.7 Homebrew
10 2013-07-12 v0.10.8 Homebrew
2 2013-07-12 v0.10.9 Homebrew
2 2013-07-12 v0.11.3 Homebrew
3 2013-07-12 v0.8.11 Homebrew
2 2013-07-12 v0.8.12 Homebrew
3 2013-07-12 v0.8.14 Homebrew
5 2013-07-12 v0.8.15 Homebrew
3 2013-07-12 v0.8.16 Homebrew
5 2013-07-12 v0.8.18 Homebrew
2 2013-07-12 v0.8.19 Homebrew
2 2013-07-12 v0.8.20 Homebrew
2 2013-07-12 v0.8.21 Homebrew
3 2013-07-12 v0.8.22 Homebrew
5 2013-07-12 v0.8.24 Homebrew
2 2013-07-13 v0.10.11 Homebrew
8 2013-07-13 v0.10.12 Homebrew
94 2013-07-13 v0.10.13 Homebrew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment