About
News
Installation
Usage
Tech-Forum
FAQ
Try PACT NEW!
Guestbook
Feedback
Bugreports
Download
 
Installation

Prerequisites
In order to use PACT, your system must include certain software packages. Currently, these are:
  • MySQL (used to store administrative and accounting data)
  • Webserver with PHP/3 and MySQL support
Please note that you may want to have sufficient disk space on the partition that will contain the accounting database. As an example, I currently run accounting on ~80 ports, once every five minutes. The database contains about 1 million sets of data in the raw data table (per month), which is about 50megs of data (data & index). The raw data can be reduced by decreasing the number of collection runs per hour, but this might result in greater data loss when a router is reset or crashes.

Before you read any further - please note that PACT at the current time is a work in progress. Though all preliminary tests work out fine, much work is still left to be done. Among much needed cleanup of code and catching errors gracefully, setting up a decent install script is one thing on the list. Therefore, at the moment, only manual installation is provided. If you do not feel comfortable with this, you may want to wait a bit 'til I get a version out the door that is a bit closer to a "1.0" version.At the moment, I also have not gotten through to re-writing the accounting overview, but the old C-code will continue to work (sticking to old structures can be an advantage ... :-) ), so I'm including it for the time being. Anyway, the design will most certainly be re-done, allowing for some additional data mining.

Installing

The core program for the accounting - apart from the database and its tables - is the so called "collector". It goes through the database, keeping track of the changes of the interface counters, storing the actual accounting data for all active ports. Copy it to any place you see fit. /usr/local/bin might be a neat idea.

Next we have to set up the database.By default, the database name is "acct". If you wish to change this, edit the file "struc.sql". After you are finished, create the database and the tables with "mysql -p <struc.sql" (may have to do this as root). After querying for the password, the rest should be done by your machine without any further errors or messages.

The next step might not be necessary if you already have an installation of ucd-snmp on your machine. On the standard installation, the MIBs are installed at /usr/local/share/snmp/mibs. If they are not, and the collector program complains about MIBs not being found, you may need to either install ucd-snmp, or, if you do not want to mess around downloading and installing it, you can use included archive. Just type "cd / ; tar zxvf (install-dir)/mibs.tgz"; this should create the necessary files and directories.

Finally, all left to be done at the moment is setting up the PHP/3- and HTML files from the "web"-directory. Files have been layed out so that you can keep the top directory freely accessable for customers/users to check the accounting. The subdirectory pact contains all the docs as well as the administration files, so you should make sure you set up a .htaccess-file to keep other people from viewing, altering or deleting data. In contrast to the first release version 0.1, some code-cleanup was done, resulting in a central configuration file, "global.php3". Apart from the basic information (MySQL-server, username, password and master password), there are also some options for changing the behaviour of PACT. The same file also contains the definition of the language that is used for dynamic pages (PACT administration and query pages). Currently, english and german language files are included, but contributions of other languages are welcome. After you're done with setting up the directory in your web server, you can call your web browser and start adding data...

Updating from 0.1 to 0.2

Apart from some bug fixes and a complete overhaul of the PHP-files, there have been some changes to the database. In order to update the old database structure, call the SQL-script "update-struc.sql".

When updating, please note that the web files as such do not have to be altered anymore, as all configuration data is located in the central "global.php3"-file. See the file for more information on the different entries and options.

Updating from 0.2/0.3 to 0.4

As of version 0.4, all the admin-php3-files have been cleaned up, so there is no need to modify the database-connect-lines anymore. Please note that a couple lines have been added to global.php3 (now renamed to global.php3-dist in the distribution archive), which you will have to add to your own global.php3. Also, a new language file (french) is included.

Updating to 0.7

Due to some brain-dead SNMP (Novell), which doesn't seem to believe in unique port identifiers (ifDescr), PACT has been extended to support such systems. If you are running a version 0.6 or earlier, first of all you really should update ... .-) Also please note that 0.7 again consists of both the base package and the collector update, so get both.
Next, run the update-script for the database which will alter the hosts-table. If all you have is decent systems, that should already be it. If you do happen to have a system like Novell, go to the host edit mode and change the systemtype from regular to leaded - uhm - Novell. Save the setting. If you should have run the collector with "-c" before, make sure you delete all the ports of that specific system, as a new "-c"-run will create the ports new with new names (namely, the sequential numbers). Once that's done, and you've assigned the customer IDs to the ports, you're ready to roll ...

Updating to 0.8

Again, due to some added features, there have been some changes to the database structures, so make sure you execute the update-struc-0_8.sql script. One of the reasons this is necessary is the size of transfer volume per port per day. If this was bigger than int(11), the routine creating the archived data from the raw data would not store the value (actually, the database wouldn't), resulting in a mismatch of the total sum.
New internal features include deleting unrelated data (e.g. ports whose host was deleted, or accounting data when its customer is deleted).

Updating to 0.9/9a

As always, due to some added features, there have been some changes to the database structures, so make sure you execute the update-struc-0_9.sql and update-struc-0_9a.sql script.
From 0.9a, there is a new program to display the accounting data in a way similar to MRTG. You will have to compile this program, see the included docs in the "src" directory ... you might have to change some lines in the source file... Also, there have been changes to the global.php3 config file, so you should make sure you check that, too ... also, if you are using a manipulated language-file, see one of the included files and add the new lines to yours.

Updating to 0.9c

And again, changes to the database structure ... so make sure you run the appropriate update script ... update-struc-0_9c.sql.
There have also been a couple changes to the global.php file, so you will have to check the distribution file global.php-dist and add the new ones to your config file.
And finally, make sure you run a "collector -c" after installing this update, the port names may change slightly due to some extended control character and space character removal! If you get any new ports reported by that run of collector, check all the customer assignments on those port or you will lose traffic data!

Updating to 0.9d

As usual, changes to the database structure ... so make sure you run the appropriate update script ... update-struc-0_9d.sql.
There have been changes to the language and config files, you may want to make sure you have the newest additions in your files.
Also, due to the changes in the ports table, make sure you have the newest version of collector, otherwise you will not be able to create new ports!

Updating to 0.9f

As usual, changes to the database structure ... so make sure you run the appropriate update script ... update-struc-0_9f.sql.
There have been additions in the system types, namely ipchains support. Please read the usage-page for further informations.

Updating to 1.0

For a change, the havn't been too many changes in general, and nothing for the database, so updating from 0.9f will only consist of replacing collector and putting the web pages up ...