Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My company hosts an open source RPM repository and would like to start counting RPM downloads per day. The repository is hosted on Apache httpd. Can anyone recommend a good way to count the downloads of just the RPM files (which will have URLs of the form while excluding any other accesses to the repository URLs for index browsing, etc. ?

share|improve this question
up vote 1 down vote accepted

If you don't want to go with classic apache log analyzers like awstats or webalizer, you might want to try visitors, a simple CLI log file analyzer.

visitors -o text ACCESS.LOG | grep " /" | grep ".rpm"

will give you a list of requested RPMs sorted by popularity with the number of downloads included after the file name. Non-RPM downloads will be ignored, so the order might look a little funny.

1)    /rpm/example.rpm: 4
3)    /rpm/example2.rpm: 2

for example.

share|improve this answer

The simplest answer would be something along these lines:

grep ".rpm" /var/log/httpd/access_log | wc -l

This would give you the number of files accessed with .rpm in their name. Simple I know, but effective.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.