Professional Documents
Culture Documents
I often have the task of investigating server performance problems but have almost no
historical information on which to base any adjustments. Running ‘top’ to see what
process is using resources in the middle of an event may tell you what is happening right
then but that isn’t necessarily always the cause of the performance problems. In order to
make any informed decisions about your system’s configuration you need data. My
favorite tool for collecting performance data on single systems or small installations is
Munin.
Munin is comprised of two separate packages: ‘munin-node,’ which is a daemon that runs
on the system(s) to be monitored and ‘munin,’ which is a program that connects to the
munin-node daemon(s), collects the current performance information, stores and graphs it
using RRDTool, and then products HTML output [example]. On a typical installation you
would install both munin and munin-node on the same system. By default munin-node is
configured only to listen on localhost and munin is configured only to check for the
localhost node so little initial configuration is necessary.
Munin is not included in the CentOS / RHEL default repositories so you’ll need to add a
third-party repository to install it via yum. If you already have a third-party repo installed
and want to check if Munin is available, enter this command:
At this point I’d recommend Installing the EPEL Repository but you can choose other
third-party repositories if you wish.
Once you have the proper repository installed, this is all you should have to do:
Munin is included in the Fedora repositories so this is all you should have to do:
Post-Install Configuration
You can edit the /etc/munin/munin.conf to change the location to which it writes its
HTML output if you want to place this within the structure of an existing site. I usually
leave this set at the default and then just create a symlink or an Apache alias from the
website path to the Munin HTML directory.
Munin has a cron job that runs every five minutes that connects to the node and collects
the data. You should start to see the graphs updating within about ten minutes. Once you
have a couple days of data you’ll be in a much better position to make decisions about the
system’s configuration.