No edit summary |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
These are the command line recipes for the metrics shown on the [[Statistics]] page. | These are the command line recipes for the metrics shown on the [[Statistics]] page. | ||
'''These commands appear to be outdated, and do not seem to work with the current layout. A new system, more accurate system is being developed.''' | |||
= Yum = | = Yum = | ||
Line 5: | Line 7: | ||
SSH to log1 and: | SSH to log1 and: | ||
cat /srv/www/fedoraUsage/updates-released-f{{FedoraVersion}} | cat /srv/www/fedoraUsage/updates-released-f{{FedoraVersion}} | ||
NOTE: The script used to produce this file is in the [http://git.fedorahosted.org/git/?p=fedora-infrastructure.git;a=tree;f=scripts/fedoraUsage;h=79efccda909b1a17baefe5689498b3b212ec6419;hb=HEAD fedora-infrastructure.git repo] which is publicly accessible | |||
A collection of scripts currently used on the logging host as a personal cronjob can be found here: | |||
[http://pfrields.fedorapeople.org/scripts/fedora-statistics-scripts.tar.gz] | |||
== Old Way (deprecated) == | == Old Way (deprecated) == | ||
Line 14: | Line 21: | ||
= Direct Downloads = | = Direct Downloads = | ||
SSH to | SSH to log01 and: | ||
egrep 'Fedora-{{FedoraVersion}}.*\.iso' \ | egrep 'Fedora-{{FedoraVersion}}.*\.iso' \ |
Latest revision as of 22:59, 8 April 2015
These are the command line recipes for the metrics shown on the Statistics page.
These commands appear to be outdated, and do not seem to work with the current layout. A new system, more accurate system is being developed.
Yum
New Way
SSH to log1 and:
cat /srv/www/fedoraUsage/updates-released-f41
NOTE: The script used to produce this file is in the fedora-infrastructure.git repo which is publicly accessible
A collection of scripts currently used on the logging host as a personal cronjob can be found here: [1]
Old Way (deprecated)
SSH to lockbox and:
egrep 'repo=updates-released-f9' \ /var/log/httpd/archives/proxy*/mirrors.fedoraproject.org-access.log.<date_range> | \ grep '\" 200 ' | awk '{print $1}' | awk -F : '{print $2}' | \ sort | uniq | wc -l > ~/f9-yum-<end_date>.txt
Direct Downloads
SSH to log01 and:
egrep 'Fedora-41.*\.iso' \ /var/log/hosts/proxy*/YYYY/MM/DD/http/download.fedoraproject.org-access.log | \ grep '\" 302 ' | awk '{print $1}' | awk -F : '{print $2}' | sort | uniq | wc -l \ > ~/f41-dl-$(date +%Y%m%d).txt
This script appears to work well:
#!/bin/bash # [ -n "$NDAYS" ] || NDAYS=7 [ -n "$RELEASE" ] || RELEASE=10 for D in $(seq $NDAYS -1 1) do YEAR=`date -d "$D days ago" +"%Y"` MONTH=`date -d "$D days ago" +"%m"` DAY=`date -d "$D days ago" +"%d"` egrep "Fedora-$RELEASE.*\.iso" \ /var/log/hosts/proxy*/${YEAR}/${MONTH}/${DAY}/http/download.fedoraproject.org-access.log | \ grep '\" 302 ' | awk '{print $1}' | awk -F : '{print $2}' | \ sort | uniq | wc -l \ > ~/f${RELEASE}-dl-${YEAR}${MONTH}${DAY}.txt done
Fedoraproject.org Visits
Go here. Also, for example:
for month in seq -w 9 10
; do echo -n "$month "; (bzcat \
/var/log/hosts/proxy[1-5]/2008/$month/*/http/fedoraproject.org-access.* \
2> /dev/null || cat \
/var/log/hosts/proxy[1-5]/2008/$month/*/http/fedoraproject.org-access.*) | \
awk '{print $1 }' | sort | uniq | wc -l ; done
Wiki Edits
for month in seq -w 5 10
; do echo -n "$month "; (bzgrep -hce 'POST.*edit' \
/var/log/hosts/proxy[1-5]/2008/$month/*/http/fedoraproject.org-access.* \
2> /dev/null || grep -hce 'POST.*edit' \
/var/log/hosts/proxy[1-5]/2008/$month/*/http/fedoraproject.org-access.*) | \
awk '{ s+=$1 } END { print "Total: "s}'; done