Date: Tue, 28 Jun 2011 16:32:28 -0400 From: Glen Barber <gjb@FreeBSD.org> To: fs@FreeBSD.org Subject: [RFC] [patch] periodic status-zfs: list pools in daily emails Message-ID: <20110628203228.GA4957@onyx.glenbarber.us>
next in thread | raw e-mail | index | archive | help
--qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I'd like to get some feedback on a change I made to 404.status-zfs. I added a default behavior to list the pools on the system, in addition to checking if the pool is healthy. I think it might be useful for others to have this as the default behavior, for example on systems where dedup is enabled to track the dedup statistics over time. The output of the the script after my changes follows: Checking status of zfs pools: NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT zroot 456G 147G 309G 32% 1.00x ONLINE - zstore 928G 258G 670G 27% 1.00x ONLINE - all pools are healthy Feedback would be appreciated. A diff is attached. Regards, -- Glen Barber | gjb@FreeBSD.org FreeBSD Documentation Project --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="404.status-zfs.diff.txt" Index: 404.status-zfs =================================================================== --- 404.status-zfs (revision 223645) +++ 404.status-zfs (working copy) @@ -16,12 +16,14 @@ echo echo 'Checking status of zfs pools:' - out=`zpool status -x` - echo "$out" + lout=`zpool list` + echo "$lout" + sout=`zpool status -x` + echo "$sout" # zpool status -x always exits with 0, so we have to interpret its # output to see what's going on. - if [ "$out" = "all pools are healthy" \ - -o "$out" = "no pools available" ]; then + if [ "$sout" = "all pools are healthy" \ + -o "$sout" = "no pools available" ]; then rc=0 else rc=1 --qMm9M+Fa2AknHoGS--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110628203228.GA4957>