Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jun 2008 12:07:44 +0200
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Vince Hoffman <jhary@unsane.co.uk>
Cc:        "Diego F. Arias R." <dak.col@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Problem With ZFS script
Message-ID:  <4868B070.5090004@FreeBSD.org>
In-Reply-To: <4867F16D.3000700@unsane.co.uk>
References:  <3b93bd110806290517k2050b114g984b9e4186a3beda@mail.gmail.com> <4867F16D.3000700@unsane.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Kris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4868B070.5090004>