Finding RSS Subscriber Counts Through Apache Logs Finding RSS Subscriber Räknar Through Apache Loggar
If you've declined to use a service like FeedBurner to handle your RSS feeds, you might wonder how many subscribers you actually have. Om du har avstått från att använda en tjänst som FeedBurner för att hantera dina RSS-flöden, kan man undra hur många prenumeranter som du faktiskt har. This also works well for finding subscriber counts to specific categories or comment posts on your site, which you typically wouldn't run through FeedBurner. Detta fungerar också bra för att hitta abonnent räknas till specifika kategorier eller kommentera inlägg på din webbplats som du vanligtvis inte skulle gå igenom FeedBurner.
It turns out that most of the bigger feed readers like Google Reader and Netvibes will actually show you the count during the request for your feed. Det visar sig att de flesta av de större RSS-läsare som Google Reader och Netvibes faktiskt kommer att visa dig räkna under förfrågan om ditt flöde. All you have to do is take a peek inside your access log files. Allt du behöver göra är att ta en titt inuti filerna tillgång log.
First you'll need to locate your apache logfile, which is normally called access_log or access.log. Först måste du hitta din apache loggfil, som normalt kallas access_log eller access.log. The location for this file will vary greatly based on distribution and your hosting provider. Platsen för denna fil kommer att variera stort beroende på distribution och webbhotellet. Here's a couple of places to start, but you might have to look around. Här är ett par ställen att starta, men du kanske måste se oss omkring.
Ubuntu default: Ubuntu default:
/var/log/apache2/access.log / var/log/apache2/access.log
MediaTemple DV default: Mediatemple DV default:
/var/www/vhosts/<hostname>/statistics/logs/access_log / var / www / vhosts / <hostname> / statistics / logs / access_log
Dreamhost default: Dreamhost default:
~/logs/<hostname>/http/access.log ~ / logs / <hostname> / http / access.log
Now that you've found the logfile, it's a simple matter of running it through grep for the keyword “subscribers”, which most of the feed readers use to show the subscriber count. Nu när du har hittat loggfil är det en enkel sak att köra det genom grep för sökordet "abonnenter", som de flesta RSS-läsare använder för att visa abonnenten räkna. You could just use the simplest command: Du kan bara använda den enklaste kommandot:
grep -i subscribers access_log grep-i abonnenter access_log
Or, if you wanted to find the subscribers for a particular feed, you could run it through a second grep to restrict to just that rss feed. Eller, om du vill hitta de abonnenter för ett särskilt foder, kan du köra det genom en andra grep att begränsa till just det RSS-flöde.
grep -i subscribers access_log | grep -i '/howtogeek/feed/' grep-i-abonnenter access_log | grep-i "/ howtogeek / feed / '
Here's an example of what that brings back on Här är ett exempel på vad som ger igen my personal blog Min personliga blogg (which I should really update more) (vilket jag borde verkligen uppdatera mer)
209.85.238.9 – - [28/Aug/2007:06:08:23 -0700] “GET /howtogeek/feed/ HTTP/1.1″ 302 572 “-” “Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 52 subscribers ; feed-id=13671896334760112923)” 209.85.238.9 - - [28/Aug/2007: 06:08:23 -0700] "GET / howtogeek / feed / HTTP/1.1" 302 572 "-" "Feedfetcher-Google; (+ http://www.google .com / feedfetcher.html, 52 prenumeranter, feed-id = 13671896334760112923) "
193.189.143.237 – - [28/Aug/2007:06:12:32 -0700] “GET /howtogeek/feed/ HTTP/1.0″ 302 535 “-” “Netvibes (http://www.netvibes.com/; 2 subscribers )” 193.189.143.237 - - [28/Aug/2007: 06:12:32 -0700] "GET / howtogeek / feed / HTTP/1.0" 302 535 "-" "Netvibes (http://www.netvibes.com/; 2 prenumeranter) "
64.78.155.100 – - [28/Aug/2007:06:14:40 -0700] “GET /howtogeek/feed/ HTTP/1.1″ 302 535 “-” “NewsGatorOnline/2.0 (http://www.newsgator.com; 2 subscribers )” 64.78.155.100 - - [28/Aug/2007: 06:14:40 -0700] "GET / howtogeek / feed / HTTP/1.1" 302 535 "-" "NewsGatorOnline/2.0 (http://www.newsgator.com 2 prenumeranter) "
Note the bolded text that shows I have all of 56 subscribers from those three online feed readers. Notera fetstil som visar jag har alla 56 abonnenter från dessa tre läsare online foder. Mysticgeek Mysticgeek has a lot more from Google alone: har mycket mer från Google ensam:
209.85.238.9 – - [28/Aug/2007:05:57:25 -0700] “GET /mysticgeek/feed/ HTTP/1.1″ 302 568 “-” “Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 111 subscribers ; feed-id=5433036316661303107)” 209.85.238.9 - - [28/Aug/2007: 05:57:25 -0700] "GET / mysticgeek / feed / HTTP/1.1" 302 568 "-" "Feedfetcher-Google; (+ http://www.google .com / feedfetcher.html, 111 prenumeranter, feed-id = 5433036316661303107) "
Perhaps I should take a cue from him and start updating my personal blog… but then I would have less time for writing articles. Kanske jag borde ta en cue från honom och börja uppdatera min personliga blogg ... men då skulle jag ha mindre tid för att skriva artiklar.

Daily Email Updates Dagligt Updates
You can get our how-to articles in your inbox each day for free. Du kan få våra instruktioner artiklar i din inkorg varje dag gratis. Just enter your name and email below: Skriv bara in ditt namn och e-postadress nedan:



Nice tip! Nice tip! I found a command line to Jag hittade en kommandorad till print nicely how many users are subscribing with Google Reader print fint hur många användare som prenumererar med Google Reader (in Portuguese). (på portugisiska). I wrote a more generic script: Jag skrev ett mer generiskt skript:
awk '/subscriber/ {print $12,$14,$7}' my_log | \ awk '/ abonnenten / (print $ 12, $ 14, $ 7)' my_log | \
sort -nr | uniq | \ sort-nr | Unika | \
cut -c 2- | tr ' ' '\t' cut-c 2 - | tr '' '\ t'
That's an awesome script… really nice tool. That's an awesome manus ... really nice tool.
How i could do this if don't have shell access to my domain? Hur kunde jag göra detta om det inte har skal tillgång till min domän?
@Leonardo @ Leonardo
Great script! Great script!
A better way to do this is FeedBurner. Ett bättre sätt att göra detta är FeedBurner. But if you are using the feedburner service, you will not be able to do get the data from the server log. Men om du använder feedburner tjänsten kommer du inte att kunna göra hämta data från servern loggen.
@Barbara: I don't have shell access either. @ Barbara: Jag har inte skal tillgång heller. From time to time, I download the log file and run the script on my own machine. Från tid till annan, jag ladda ner loggfilen och köra scriptet på min egen maskin.
Terrific post. Terrific post. Do you have a particular web log analyzer that you like to use, one that will specifically allow this type of search? Har du en särskild analysator webblogg som du vill använda, en som specifikt tillåter denna typ av sökning? Thanks for any help you can provide. Tack för all hjälp du kan ge.