Monitoring ZFS Statistic

добавлено: 08 дек 08
просмотров: 1879
комментов: 0


Автор: Roman Ivanov

By combining two great tools arcstat and dimstat you can get ZFS statistics in:

  • table view

  • chart view

  • any date/time interval

  • host to host compare

For example, online table and chart view

The following easy steps are needed to integrate arcstat into dimstat. I am suggesting that you are already happy user of dimstat and ZFS.

  1. Download script from this page.

  2. Modify script so it will print numerical values instead of pretty numbers (20000000000 versus 20G). This numbers will be inserted into database. This is why we need exact numbers. In the script locate prettynum function and add one line (bold one):

    sub prettynum {
            my @suffix=(' ','K', 'M', 'G', 'T', 'P', 'E', 'Z');
            my $num = $_[1] || 0;
            my $sz = $_[0];
            my $index = 0;
            return sprintf("%s", $num) if not $num =~ /^[0-9\.]+$/;
    return sprintf("%d", $num);
            while ($num > 1000 and $index < 8) {
                    $num = $num/1000;
            return sprintf("%*d", $sz, $num) if ($index == 0);
            return sprintf("%*d%s", $sz - 1, $num,$suffix[$index]);
  3. Save modified script in /etc/STATsrv/bin/ on the monitored server.

  4. Give execute permissions to the script: chmod +x /etc/STATsrv/bin/

  5. Register this script in dimstat “ access to execute” database. Add this line in the end of /etc/STATsrv/access file: command arcstat /etc/STATsrv/bin/

  6. Download description file arcstat.desc.

  7. Login to dimstat server and choose “ Add-On STAT(s)”:

  8. Choose “Restore Add-On STAT(s) Description”:

  9. Choose “From Local File on your disk” and upload description file acrstat.desc.

  10. From now you can go to dimstat Home and “Start New Collect”. arcstat will appear in the list of available STAT(s). Wait a few minutes before results will appear in Analyze section.

This modification will allow you to monitor 11 basic values provided by arcstat by default. At most arcstat gives all 30 values from kstat -m zfs.


Необходимо войти на сайт, чтобы оставлять комментарии