Re: Problem With ZFS script

2008-06-30 Thread Kris Kennaway

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem With ZFS script

2008-06-30 Thread Vince Hoffman
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.

Vince

 Kris
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem With ZFS script

2008-06-30 Thread Kris Kennaway

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Problem With ZFS script

2008-06-29 Thread Diego F. Arias R.
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



Thanks.
-- 
mmm, interesante.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem With ZFS script

2008-06-29 Thread Kris Kennaway

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
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problem With ZFS script

2008-06-29 Thread Vince Hoffman

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




try
--
#!/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.


Vince


Thanks.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]