From nobody@FreeBSD.org  Tue Apr 22 15:17:30 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id AF31F5EE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Apr 2014 15:17:30 +0000 (UTC)
Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client did not present a certificate)
	by mx1.freebsd.org (Postfix) with ESMTPS id 9B0DF1357
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Apr 2014 15:17:30 +0000 (UTC)
Received: from cgiserv.freebsd.org ([127.0.1.6])
	by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3MFHUQM016004
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 22 Apr 2014 15:17:30 GMT
	(envelope-from nobody@cgiserv.freebsd.org)
Received: (from nobody@localhost)
	by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3MFHUdr015993;
	Tue, 22 Apr 2014 15:17:30 GMT
	(envelope-from nobody)
Message-Id: <201404221517.s3MFHUdr015993@cgiserv.freebsd.org>
Date: Tue, 22 Apr 2014 15:17:30 GMT
From: Dirk-Willem van Gulik <dirkx@webweaving.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ZFS periodic information - improvement
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         188893
>Category:       conf
>Synopsis:       [patch] periodic(8): ZFS periodic information - improvement
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 22 15:20:01 UTC 2014
>Closed-Date:    
>Last-Modified:  Tue Apr 22 22:16:23 UTC 2014
>Originator:     Dirk-Willem van Gulik
>Release:        FreeBSD 10/p2
>Organization:
Web Weaving
>Environment:
FreeBSD weser.webweaving.org 10.0-RELEASE-p1 FreeBSD 10.0-RELEASE-p1 #0: Tue Apr  8 06:45:06 UTC 2014     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
Would be nice to have something like below in /etc/periodic/daily - as
to show the status of the ZFS file system when such is enabled.

Thanks,

Dw.

>How-To-Repeat:

>Fix:
#!/bin/sh -
#
# $FreeBSD$
#

if [ -r /etc/defaults/periodic.conf ]; then
	. /etc/defaults/periodic.conf
	source_periodic_confs
fi

rc=0

case "${zfs_enable:-YES}" in
	[Nn][Oo])
	;;
	*)
	echo ZFS Pool status
	echo ===============
	echo
	zpool status || rc=$?
	echo
	echo Recent changes:
	zpool history  | grep -e `date +%Y-%m-%d` -e `date -v-24H +%Y-%m-%d`
	echo
	;;
esac

exit $rc

>Release-Note:
>Audit-Trail:
>Unformatted:
