{"id":58,"date":"2010-07-15T06:51:00","date_gmt":"2010-07-15T06:51:00","guid":{"rendered":"https:\/\/pim.famnit.upr.si\/wp\/?p=58"},"modified":"2021-11-17T11:22:25","modified_gmt":"2021-11-17T11:22:25","slug":"counting-rss-subscriptions","status":"publish","type":"post","link":"https:\/\/pim.famnit.upr.si\/wp\/?p=58","title":{"rendered":"Counting RSS subscriptions"},"content":{"rendered":"<p>The reason for this entry is more to show <strong>how interesting can it be working with a command line interface<\/strong> than to actually count RSS subscriptions. Counting is entirely based on my assumptions.<\/p>\n<p>A friend asked me <strong>how many RSS subscriptions<\/strong> this blog has. I got hooked up by how to count them. I googled a bit and I could only find referencing <a href=\"http:\/\/www.feedburner.com\/\">FeedBurner<\/a>. But it seamed to much work to go through. So here&#8217;s my simple estimate (which might be very very wrong).<\/p>\n<p>First I wanted to see <strong>how many times the RSS link was accessed<\/strong> in the last month in my Apache logs:<\/p>\n<pre style=\"background-color: #ffffd2;\">$ grep index.rss access.log | wc -l\r\n6479<\/pre>\n<p>Then I wanted to <strong>divide these entries by IP addresses<\/strong>:<\/p>\n<pre style=\"background-color: #ffffd2;\">$ grep index.rss access.log | awk '{IP[$1]++;} END {for(s in IP) print IP[s], s;}'\r\n1 207.46.204.229\r\n1 66.249.67.227\r\n1 207.46.195.238\r\n7 72.30.142.219\r\n1201 72.14.199.79\r\n3 188.92.75.82\r\n2 207.46.204.236\r\n.....<\/pre>\n<p><strong>Count them:<\/strong><\/p>\n<pre style=\"background-color: #ffffd2;\">$ grep index.rss access.log | awk '{IP[$1]++;} END {for(s in IP) print IP[s], s;}' | wc -l\r\n266<\/pre>\n<p><strong>Count those with only one entry<\/strong> (write all command in one line):<\/p>\n<pre style=\"background-color: #ffffd2;\">$ grep index.rss access.log | awk '{IP[$1]++;} END {for(s in IP) print IP[s], s;}' \r\n      | awk '{if ($1==1) print $1,$2}' | wc -l\r\n137<\/pre>\n<p>If these people check my blog once a day and a month has 30 days this would give me 4 people <strong>dynamic IP&#8217;s<\/strong> as DSL dynamic IPs change once a day. Mobile IPs change with every connections and some people access the blog more than once a day. So all IPs that have accessed the RSS <strong>between 2 and 10 times<\/strong> (80% only 3 times) should be counted as the above. <\/p>\n<pre style=\"background-color: #ffffd2;\">$ grep index.rss access.log | awk '{IP[$1]++;} END {for(s in IP) print IP[s], s;}' \r\n       | awk '{if ($1&gt;2 &amp;&amp; $1&lt;10) print $1,$2}' | wc -l\r\n56<\/pre>\n<p>And there are another 17 IPs that belong to counts between 9 and 99<br \/>\nwhich I&#8217;d add here (if for example their RSS reader requests RSS feed once an hour or more). This is&nbsp; 137+56+17\/30<strong> approx 7 users with dynamic IPs<\/strong>.&nbsp;<\/p>\n<p>Some IPs have a count of more than 100 (some even more than 500) which might be RSS readers often checking the RSS address during the day <strong>from a fixed IP<\/strong>. So every IP that has a count of more than 100 counts for one user. <\/p>\n<pre style=\"background-color: #ffffd2;\">$ grep index.rss access.log | awk '{IP[$1]++;} END { for (s in IP) print IP[s], s; }' \r\n       | awk '{if ($1&gt;100) print $1,$2}' | wc -l\r\n16<\/pre>\n<p><strong>This would be now 7+16=23<\/strong>. And because <strong>this sounds to much<\/strong> to me I&#8217;d <strong>divide it by 2<\/strong> and get <strong>approx 11 users that read my blog through RSS feeds<\/strong> (me included).<\/p>\n<p>But I might be entirely wrong with my guessing. Let&#8217;s see what has the world say about it in comments. <\/p>\n<p>PS: Google analytics counted 400 unique visitors in the last month. <\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The reason for this entry is more to show how interesting can it be working with a command line interface than to actually count RSS subscriptions. Counting is entirely based on my assumptions. A friend asked me how many RSS subscriptions this blog has. I got hooked up by how to count them. I googled&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[96,103,104,105],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-5-physical-interfaces","tag-buttons","tag-features","tag-functions","tag-mouse"],"_links":{"self":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/58","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=58"}],"version-history":[{"count":1,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions"}],"predecessor-version":[{"id":873,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=\/wp\/v2\/posts\/58\/revisions\/873"}],"wp:attachment":[{"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=58"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=58"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pim.famnit.upr.si\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=58"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}