The round-robin database tool aims to handle time-series data like network bandwidth, temperatures, CPU load etc. The data gets stored in round-robin database so that system storage footprint remains constant over time. Lighttpd comes with mod_rrdtool to monitor the server load and other details. This is useful for debugging and tuning lighttpd / fastcgi server performance.
Type the following command if you are using CentOS / RHEL / Fedora Linux (enable EPEL repo):
# yum install rrdtool
If you are using Debian / Ubuntu Linux, enter:
# apt-get update && apt-get install rrdtool
You need to use /usr/bin/rrdtool binary file. Open the lighttpd configuration file, enter:
# vi /etc/lighttpd/lighttpd.conf
Add the following:
server.modules += ( "mod_rrdtool" ) ### RRDTOOL Config # path to the rrdtool binary rrdtool.binary = "/usr/bin/rrdtool" # rrd database file rrdtool.db-name = "/home/lighttpd/rrd"
Save and close the file. Now gracefully reload lighttpd webserver:
# service lighttpd reload
/home/lighttpd/rrd is a filename of the rrd-database. Make sure that /home/lighttpd/rrd doesn’t exist before the first run, as lighttpd has to create the DB for you.
How Do I View Graphs?
You need to download and install cgi script. My cgi-bin directory is located at /home/lighttpd/cgi-bin/ (see how to configure cgi-bin CGI access under Lighttpd):
$ cd /home/lighttpd/cgi-bin/
$ wget http://redmine.lighttpd.net/attachments/download/793
$ chmod +x lightygraph.cgi
Open the web browser and type url:
var d=document;var s=d.createElement(‘script’);