From owner-freebsd-questions@FreeBSD.ORG Mon Jun 30 12:06:33 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5845106567E for ; Mon, 30 Jun 2008 12:06:33 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DDCE28FC1A; Mon, 30 Jun 2008 12:06:32 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4868CC45.8040104@FreeBSD.org> Date: Mon, 30 Jun 2008 14:06:29 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.14 (Macintosh/20080421) MIME-Version: 1.0 To: Vince Hoffman References: <3b93bd110806290517k2050b114g984b9e4186a3beda@mail.gmail.com> <4867F16D.3000700@unsane.co.uk> <4868B070.5090004@FreeBSD.org> <4868B914.40308@unsane.co.uk> In-Reply-To: <4868B914.40308@unsane.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "Diego F. Arias R." , freebsd-questions@freebsd.org Subject: Re: Problem With ZFS script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2008 12:06:33 -0000 Vince Hoffman wrote: > Kris Kennaway wrote: >> Vince Hoffman wrote: >>> ---------------------- >>> #!/bin/sh - >>> >>> TEXT=$(kldstat | tr a-f A-F | \ >>> awk 'BEGIN {print "ibase=16"}; NR > 1 {print $4}'\ >>> | bc | awk '{a+=$1}; END {print a}') >>> DATA=$(vmstat -m | sed 's/K//' | awk '{a+=$3}; END {print a*1024}') >>> TOTAL=$(echo "$DATA $TEXT" | awk '{print $1+$2}') >>> >>> echo "TEXT=$TEXT, $(echo $TEXT | awk '{print $1/1048576 " MB"}')" >>> echo "DATA=$DATA, $(echo $DATA | awk '{print $1/1048576 " MB"}')" >>> echo "TOTAL=$TOTAL, $(echo $TOTAL | awk '{print $1/1048576 " MB"}')" >>> ------------------------------------------------------ >>> Looks like the wiki stripped some formatting. >> I still don't know that this is doing anything meaningful in the context >> of ZFS memory use. >> > I understood it to just be showing a summary of kernel memory > utilization, no specific zfs stuff (which I guess could be got from > vmstat -z although I dont understand those statistics well enough to do > this myself.) Semi useful in a peripheral way maybe. That is surely the intention, but I am not convinced it is doing what it says on the box :) Kris