1 POPCORN - Popularity Contest (for RPM)
2 --------------------------------------
4 http://repo.or.cz/w/popcorn.git
6 Licensed under MIT License
7 Copyright (c) 2009 Pavol Rusnak <stick@gk2.sk>
12 Popcorn lists system packages and for each package it reads access time of its
13 "watched" files (see section Watched Files below). The most recent fileaccess
14 time is considered as the "package access time". The packages are then split into
15 four categories depending on the package install time and package access time:
18 - package has been recently installed (less than 30 days)
19 - ( now - install_time < 30 days )
21 - package is older than 30 days and has been used in the last 30 days
22 - ( now - install_time > 30 days ) and ( now - access_time < 30 days)
24 - package is older than 30 days and hasn't been used recently
25 - ( now - install_time > 30 days ) and ( now - access_time > 30 days)
27 - there are no watched files present in the package
30 Each package falls exactly into one category, so (n + r + v + o) is the total
31 number of the installed packages.
33 Popcorn is inspired by Debian Popcon available from http://popcon.debian.org/
38 To find out whether the package has been used recently, access times of the files
39 in the following directories are watched:
58 Note: The files mounted from the noatime/relatime filesystems are not taken into
59 consideration, because they would skew the results. If package contains
60 only such files, it appears in 'no-files' category.
66 * client-side written in Python
67 * gathers info about packages and sends to server (either via e-mail or HTTP POST)
68 * is called from cron every week (random time for each machine)
71 * server-side written in C and using libtdb library (http://tdb.samba.org)
72 * reads info from stdin and saves it to stats.tdb
75 * called every week on server
76 * move stats.tdb to stats-{year}-{week}.tdb and recreates stats.tdb
79 * dumps stats.tdb to stdout
84 Format is simple plaintext. First line contains string POPCORN followed by the
85 popcorn version and architecture. Then the list of packages follows. Each package
86 is prepended with one character describing the category (see Introduction) and
87 the space. Plaintext size is around 30 KiB on casual machine, which could be
88 later compressed to 10-15 KiB using HTTP gzip compression.
92 POPCORN <popcorn-client_version> <arch>
112 Format is produced by libtdb library (http://tdb.samba.org)
114 key | value | meaning
115 -------------+----------------------+----------------------------------------------------
116 arch/<arch> | <int> | number of reports from arch <arch>
117 ver/<ver> | <int> | number of reports from ver <ver>
118 <name> | <int><int><int><int> | package <name> was reported <int> times as n,r,v,o
120 Use popcorn-dump to dump the contents of the database.