From Fedora Project Wiki
(One intermediate revision by one other user not shown)
Line 5: Line 5:
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) ==

Revision as of 18:47, 20 July 2011

These are the command line recipes for the metrics shown on the Statistics page.

Yum

New Way

SSH to log1 and:

cat /srv/www/fedoraUsage/updates-released-f40

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 log1 and:

egrep 'Fedora-40.*\.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 \
> ~/f40-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