Server-watch is a project mainly written in Python, it's free.
Script to monitor server side variables for logging while testing, etc.
This is script setup to allow for easy logging of various server level statistics that is useful when doing system profiling and load testing.
This is a simple Python script that can be run via
./server-watch.py
This logs the desired values to stdout. Those can be redirected to a file as:
./server-watch.py > /tmp/server-data.log
There are a few command line options to customize the behavior
-c, --config config file
Specifies which config file to use
-a, --apache
Enable apache connection monitoring
-m, --mysql
Enable mysql monitoring
-d, --delimeter delimeter
What string to use as a delimeter for the log file, defaults to a tab
-s, --seconds delay
How many seconds to delay b/w report rows, defaults to 1 second
There are a few sections in the configuration file
This controls the output columns in the log file a sample configuration looks like
[log]
format = 1 11 12 13
format
Format is a space delineated listing of the columns to appear in the output rows.
The following fields are available for logging:
This controls the connection info to MySQL
[mysql]
host = localhost
user = root
password = root
host
The host name to connect
user
The username for connecting
password
The password connecting