Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2008 15:17:00 +0200
From:      Kris Kennaway <kris@FreeBSD.org>
To:        "Diego F. Arias R." <dak.col@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Problem With ZFS script
Message-ID:  <48678B4C.9070809@FreeBSD.org>
In-Reply-To: <3b93bd110806290517k2050b114g984b9e4186a3beda@mail.gmail.com>
References:  <3b93bd110806290517k2050b114g984b9e4186a3beda@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Diego F. Arias R. wrote:
> Hi:
> 
> Im testing the new ZFS feature on freebsd. On the page i got a script
> to monitor kernel memory but the script dont works.
> ---------------------------------------------------------------------------------------------------------------------------------------------------
> #!/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"}'
> ---------------------------------------------------------------------------------------------------------------------------------------------------
> 
> link:
> 
> http://wiki.freebsd.org/ZFSTuningGuide
> 
> 
> 
> the error i got is
> 
> freebsd# ./kernmem.sh
> 
> -m: not found

The script is nonsense, it's not valid sh syntax.  I guess it got badly 
mangled by the wiki software.

Kris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48678B4C.9070809>