0

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 http://packages.mycompany.com/packages/continuous/trunk/fedora/10/RPMS/package1.rpm) while excluding any other accesses to the repository URLs for index browsing, etc. ?

2 Answers 2

1

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.

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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