ZPcheck version 1.4 released

Hi All,

Today I’m releasing ZPcheck version 1.4, which is the initial public release. It’s a simple tool to regularly check and report on ZFS pools. Included in the reports generated by ZPcheck are smartd logging (if available) from your system logger. This is useful when you’re dealing with problematic pools and providers. Any ways the tool is released under the GPL 2.0 and is free for all to use. It requires Perl 5.10 or later and some Perl modules, all of which can be installed easily through CPAN.

Click here to downloda zpcheck-1.4.tar.gz

Simple script to alert you on ZFS pool problems

So after looking around this morning for a simple file system script to alert me when my ZFS pools have problems on my new file server I found a few, the problem was none worked correctly. Strangely these scripts were extremely simple so I was a bit surprised any hand problems. Because of this I took five minutes to knock together a portable perl script to email you in the event of problems:


our @users = qw(root);
our $zpool = "/sbin/zpool";
use strict;
use Sys::Hostname;
use IPC::Open3;

our $stat;
chomp($stat=`zpool status -x | head -1 | awk '{print \$4}'`);

if($stat ne 'healthy'){
 my $data = ("Date: " . scalar(localtime()) . "\n") .
 ("Hostname: " . hostname()) .
 "\n" .
 `$zpool status -x` .

 my $pid = open3(\*CHLDIN, \*CHLDOUT, \*CHLDERR,
 "mail", "-s", "ZFS Pool errors detected: " . hostname(), @users);

 print CHLDIN $data;