SDR User Guide
This is the installation guide for current version of SDR: 0.71.
This is the installation guide for current version of SDR: 0.71.
If you plan to install SDR to a location different than the default one, /opt/sdr make sure you edit MONITOR_PATH under setenv script to reflect the correct location
SDR uses SAR, system activity reporter. SAR is started using SMF so these are the main steps in order to get started SAR:
If you get this error, when trying to update your sys crontab: "crontab: you are not authorized to use cron. Sorry." then it means you have certain security restrictions in place. Edit cron.allow and cron.deny making sure sys account has been enabled.
One very useful feature of SDR under Solaris 10 is SMF: the service management facility, a way to automatic restart your service in case of a failure, maintenance, etc. SDR uses SMF under Solaris 10 automatically but requires its activation. Below there are the steps used to enable SDR under SMF:
# svcs -a | grep rec # svcadm disable sysrec # svcadm disable cpurec # svcadm disable netrec # svcadm disable nicrec # svcadm disable zonerec # svcadm disable jvmrec |
# svccfg validate sysrec.xml # svccfg validate cpurec.xml # svccfg validate nicrec.xml # svccfg validate netrec.xml # svccfg validate zonerec.xml # svccfg import sysrec.xml # svccfg import cpurec.xml # svccfg import nicrec.xml # svccfg import netrec.xml # svccfg import zonerec.xml |
# svcadm enable sysrec # svcadm enable cpurec # svcadm enable nicrec # svcadm enable netrec # svcadm enable zonerec |
# svcs -a | grep rec online 16:36:07 svc:/application/sysrec:default online 16:37:43 svc:/application/cpurec:default online 16:37:47 svc:/application/nicrec:default online 16:37:52 svc:/application/netrec:default online 16:37:56 svc:/application/zonerec:default # ptree [...] 3958 /usr/bin/perl -w /opt/sdr/bin/sysrec 60 3972 /bin/perl -w /opt/sdr/bin/cpurec 60 3980 /usr/bin/perl -w /opt/sdr/bin/nicrec 60 3989 /bin/perl -w /opt/sdr/bin/netrec 60 4000 /bin/ksh -p /opt/sdr/bin/zonerec 60 4022 sleep 60 |
# pwd /opt/sdr/log/raw # ls -lrt total 25 -rw-r--r-- 1 root root 342 Oct 31 16:39 cpurec.raw -rw-r--r-- 1 root root 522 Oct 31 16:39 nicrec.raw -rw-r--r-- 1 root root 324 Oct 31 16:39 netrec.raw -rw-r--r-- 1 root root 7552 Oct 31 16:39 zonerec.raw -rw-r--r-- 1 root root 263 Oct 31 16:40 sysrec.raw |
Enable for each raw file, a entry for logadm to rotate the file at midnight and to compress the file. For this make sure you are superuser and modify the /etc/logadm.conf file or use logadm utility to add the entries. # SDR Monitoring /opt/sdr/log/raw/sysrec.raw -c -p 1d -z 0 /opt/sdr/log/raw/cpurec.raw -c -p 1d -z 0 /opt/sdr/log/raw/nicrec.raw -c -p 1d -z 0 /opt/sdr/log/raw/netrec.raw -c -p 1d -z 0 /opt/sdr/log/raw/zonerec.raw -c -p 1d -z 0 At the end make sure you check the consistency of the logadm.conf by running: # logadm -V |
# crontab -e Add here logadm to be done at 00:05, everyday instead of 3AM and move the raw data compressed into daily directories. # 05 00 * * * /usr/sbin/logadm 10 00 * * * /opt/sdr/bin/raw2day |
raw2day is an optional script which simple copies over the previous data into its own dir. If you consider needed to simple upload the data into RRD skip this entirely.
If you have already installed SDR, version 0.63 or older make sure you follow the instructions:
# svcadm disable sysrec # svcadm disable cpurec # svcadm disable nicrec # svcadm disable netrec # svcadm disable zonerec |
If you plan to install SDR to a location different than the default one, /opt/sdr make sure you edit MONITOR_PATH under setenv script to reflect the correct location
raw2day is used to automatically send data every night to a reporting server. If you use a 24hours time window update policy make sure you restore your raw2day hooks as they were found before the upgrade.
In order to remove SDR from your system make sure you login in the global zone of the physical machine where you have installed the software. Become root and disable all SDR recorders from smf and delete all its manifests. Make sure as well you delete the log directory, where SDR keeps its recorded data to make room for other applications
# svcadm disable sysrec # svcadm disable cpurec # svcadm disable nicrec # svcadm disable netrec # svcadm disable zonerec # svcs -a | grep rec disabled 16:43:55 svc:/application/sysrec:default disabled 16:44:02 svc:/application/cpurec:default disabled 16:44:05 svc:/application/nicrec:default disabled 16:44:08 svc:/application/netrec:default disabled 16:44:11 svc:/application/zonerec:default |
# svccfg delete application/sysrec # svccfg delete application/cpurec # svccfg delete application/nicrec # svccfg delete application/netrec # svccfg delete application/zonerec At this moment SMF does not know anymore about SDR # svcs -a | grep rec |