- Table of contents
- Introduction
- Usage
- Get it
Introduction¶
This small utility, written in python using matplotlib, parses your emerge.log and creates an image representing successful emerge on your gentoo box. Think of it as a graphical view of ‘genlop -l’.
It works in two modes.- The file mode doesn't require a graphical interface, does not require Qt, and create a png file. This is usually used on servers or other "headless" devices.
- The gui mode requires a working PyQt-4 on the path, and will open a window where you can play with parameters. A widget displays the corresponding command line so that you use the GUI to tweak parameters, and then copy/paste the command line to your server/cron/whatever.
This first screenshot shows the graphical interface:
Here are two more examples. This first one shows the activity on an old server. You can see the initial install, and then more or less regular updates.
This second example shows the activity on my main desktop computer. I use KDE, and the big increase in packages emerged starting in 2008 corresponds to the date where KDE packages were splitted in Gentoo.
Usage¶
the option --help
will display the usual usage text:
usage: EmergeActivity.py [-h] [--mode {file,gui}] [--title TITLE] [logfile] [pngfile] This script parses a log file from emerge/portage and create an image file representing the emerge activity. positional arguments: logfile Emerge log file to parse. pngfile Filename for the image (in file mode only). optional arguments: -h, --help show this help message and exit --mode {file,gui} file: create a file, doesn't require a graphical environment. gui(default): open a window. --title TITLE Title displayed on the image, default to the logfile name if provided, or then to the current host name.
Here is an example creating an image for the activity on the current host:
orzel@berlioz orzel/hg/EmergeActivity% ./EmergeActivity.py --mode=file /var/log/emerge.log Using file /var/log/emerge.log There are 32738 emerge completed successfully Created the file 'activity.png'
I have a script that scp log files from several computers and creates/displays the image for all of them.
Get it¶
If you know what this means, I highly recommend to clone the mercurial repository from http://sources.freehackers.org/EmergeActivity, else you can grab a tarball from the "File" tab at the top of this page.
Updated by Thomas Capricelli over 9 years ago · 16 revisions