Filesys::ZFS::Stat - read ZFS statistics on FreeBSD
use Filesys::ZFS::Stat;
my $zstat = Filesys::ZFS::Stat->new(pools => ['zroot']);
my $zroot = Filesys::ZFS::Stat->pool('zroot');
my $data = Filesys::ZFS::Stat->dataset('zroot', 'data');
$zstat->nread('zroot', 'data');
$zroot->nread('data');
$data->nread();
Create new Filesys::ZFS::Stat object that later can be used to retrieve global
statistics as well as per pool statistics, if any pools supplied.
Arguments
- pools
- Points to list of ZFS pool names to be used.
Create new Filesys::ZFS::Stat object associated with single pool.
Create new Filesys::ZFS::Stat object associated with single dataset.
The following methods can be called on any Filesys::ZFS::Stat object. For a
dataset object they require no arguments. For a pool object they require
single argument - dataset name. For a global object they require two arguments
- pool name and dataset name.
- reads()
- Returns number of read requests.
- nread()
- Returns bytes read.
- writes()
- Returns number of write requests.
- nwritten()
- Returns bytes written.
- nunlinks()
- Returns number of requests to unlink files.
- nunlinked()
- Returns number of files unlinked.
Gleb Smirnoff "<glebius at glebi.us>"
Please report any bugs or feature requests via Github at
<https://github.com/glebius/Filesys-ZFS-Stat>.
This software is Copyright (c) 2021 by Gleb Smirnoff. This is free software,
licensed under BSD License.