perfmon package readme: 1. What is perfmon perfmon is a software package which collects system performance data and graphicaly presents the data in plots by using the GNUplot(http://gnuplot.info/). The 'sar', 'netstat' and 'ps' commands are used to collect the data. Perfmon is able to generate the following plots: - CPU Utilization - Virtual Memory Usage - I/O - Paging Activity - Swap Activity - Network Throughput - Number of Process by user The plots are in PNG format. 2. Software Requirement - GNUplot - http://gnuplot.info Gnuplot is a portable command-line driven interactive datafile (text or binary) and function plotting utility for UNIX and many other platforms To install GNUplot, follow the below steps 1). download gnuplot-4.0.0-sol8-sparc-local.gz from http://sunfreeware.com 2). put the file under /tmp and gunzip it # cd /tmp # gunzip gnuplot-4.0.0-sol8-sparc-local.gz 3). install the package # cd /tmp # pkgadd -d gnuplot-4.0.0-sol8-sparc-local - libpng The PNG library is a collection of routines used to create and manipulate PNG format graphics files. This library is required by GNUplot. To install libpng, follow the below steps 1). download libpng-1.2.5-sol8-sparc-local.gz from http://sunfreeware.com 2). put the file under /tmp and gunzip it # cd /tmp # gunzip libpng-1.2.5-sol8-sparc-local.gz 3). install the package # cd /tmp # pkgadd -d libpng-1.2.5-sol8-sparc-local - patch 110941-03 for Solaris 8 sar and sadc patch To verify the required packages are installed correctly, run 'ldd /usr/local/bin/gnuplot' If the output is like this, libpng was not installed: libz.so.1 => /usr/lib/libz.so.1 libpng.so.3 => (file not found) <-------- libpng not found libm.so.1 => /usr/lib/libm.so.1 libc.so.1 => /usr/lib/libc.so.1 libdl.so.1 => /usr/lib/libdl.so.1 /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1 If libpng was installed correctly, the output would look like this libz.so.1 => /usr/lib/libz.so.1 libpng.so.3 => /usr/local/lib/libpng.so.3 libm.so.1 => /usr/lib/libm.so.1 libc.so.1 => /usr/lib/libc.so.1 libdl.so.1 => /usr/lib/libdl.so.1 /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1 3. Installation 1) Add a user named 'perfmon' # useradd -c "Performance Monitor" -d -m perfmon replace in the above command with whatever path you like. Note that if you would like to put the collected data under , please make sure there is enough free space. 2) Extract the package into the Assume you have put perfmon.tar.gz to /tmp # su - perfmon $ cd $ gzcat /tmp/perfmon.tar.gz | tar xf - 3) Config Create the perfmon.conf configuration file in perfmon's home dir. There is an perfmon.conf.sample file, it's self explanatory. Please ensure the following variables are set correctly: datadir, gnuplot, netif, psuser 4) Setup the rc script copy the perfmon.rc to /etc/init.d/perfmon edit /etc/init.d/perfmon to use correct path and make a link to /etc/rc2.d # ln -s /etc/init.d/perfmon /etc/rc2.d/S21perfmon start the data collection by # /etc/init.d/perfmon start 5) Setup cron table # EDITOR=vi crontab -e perfmon edit the cron table like this, of course adapt it with your path 0,10,20,30,40,50 * * * * /export/share/perfmon/perfmon 5 0 * * 0-6 /export/share/perfmon/perfplot 15 0 * * 1 /export/share/perfmon/perfplot_weekly 45 0 1 * * /export/share/perfmon/perfplot_monthly 30 23 * * 0-6 /export/share/perfmon/housekeeping 4. Usage 1) Online usage(Automated) Setup rc script and cron table as describe in the Installation section data collection and plotting is done by cron jobs collected data are stored at , is defined in perfmon.conf file daily plots are stored at /plot/daily weekly plots are stored at /plot/weekly monthly plots are stored at /plot/monthly 2) Offline usage(Manual) You can manually run perfplot_* to plot daily/weekly/month/custom reports, in case certain report was not automaticly generated(eg. the cron job was missed due to system maintenance). You can also download the collected data to another system, and plot on that system. 'perfplot', 'perfplot_weekly' and 'perfplot_monthly' accept the following arguments: -h: Help -d : Set datadir to -n : Set hostname to -t : Plot for the given date, format for is YYYY.MM.DD if this option is given for 'perfplot_weekly', it plots the week of if this option is given for 'perfplot_monthly', it plots the month of Examples: [1]. plot for the day of Jun 20, 2004, with data located at /home/perfmon/boss_sv01, and hostname set to boss_sv01: $ perfplot -d /home/perfmon/boss_sv01 -n boss_sv01 -t 2004.06.20 [2]. plot for the week of Jun 14 - Jun 20, 2004, datadir and hostname same as above $ perfplot_weekly -d /home/perfmon/boss_sv01 -n boss_sv01 -t 2004.06.14 can be set to any one from 2004.06.14 to 2004.06.20 [3]. plot for June 2004, datadir and hostname same as above $ perfplot_monthly -d /home/perfmon/boss_sv01 -n boss_sv01 -t 2004.06 output of the above 3 examples are put under /home/perfmon/boss_sv01/plot 'perfplot_range' accept the following arguments: -h: Help -d : Set datadir -n : Set hostname -s : Set start date in the format of YYYY.MM.DD -e : Set end date in the format of YYYY.MM.DD -i : Set plotting interval can have a suffix of 's', 'm' or 'h' means second, minute or hour respectively if no suffix is specified, the default is second Custom plots are put under /plot/custom directory Example: [1]. plot from Nov 25, 2005 to Dec 3, 2005 , with data located at /home/perfmon/boss_sv01, hostname set to boss_sv01 and plotting interval set to 30 minutes: $ perfplot_range -d /home/perfmon/boss_sv01 -n boss_sv01 -s 2005.11.25 -e 2005.12.03 -i 30m