###############################################################################
# topper (c) 2011 John Sennesael                                              #
# This program comes with ABSOLUTELY NO WARRANTY.                             #
# This is free software, and you are welcome to redistribute it               #
# under certain conditions.                                                   #
# For detail see enclosed LICENSE file.                                       #
###############################################################################

About:
------

Topperd periodically collects information about running processes, such as 
pid, user, cpu usage, memory usage and stores this information in a database
for parsing with a client. 

The idea is that this client can show a graphical representation of 
resource usage per process over time (a graphical `top` over time, if you will).

At the time of writing the client is yet to be implemented, but topperd will
already collect information and store it in a MySQL database.

Currently, it is to be used in cron (it runs once, then exists). Future 
versions will make it look more like a conventional daemon program, and an 
interval will be configurable in the configuration file.

Requirements:
-------------

  * perl >= 5.8 
  * perl POSIX support
  * perl DBI module
  * perl DBD::mysql module
  * A MySQL server ( requirement may be dropped in future versions as more
                    datasinks are implemented. )

Installation:
-------------

You can just run ./topperd from within the src/ folder.
It will automatically attempt to read in ../conf/topperd.conf
You should copy the appropriate example configuration file over topperd.conf
and edit it with database details.

A database dump to initialize the table(s) is provided in db/topper.sql

Database initialization:
------------------------

> mysql -u root -pyour_password_if_any

CREATE DATABASE topper;
GRANT ALL PRIVILEGES ON topper.* TO 'some_user'@'localhost' 
  IDENTIFIED BY 'some_password';

> mysql -u root -pyour_password_if_any -D topper < db/topper.sql

IRIX specific installation notes:
----------------------------------

** You can use supplied topperd.conf.irix example.
   Just copy it over to topperd.conf

** At the time of writing there is no nekoware package for DBD::mysql and
   out of the box installation with cpan won't work.
   Some fiddling with the makefile is required to make DBD::mysql compile
   on the IRIX platform. 
   I will put up for download a working source tree with the Makefile already 
   edited for DBD::mysql.

