Actions
Feature #9705
closedAdd kernel memory usage to status.php
Start date:
08/27/2019
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
Release Notes:
Description
The FreeBSD ZFS docs include some commands to calculate kernel memory (kmem) usage. Looks like it would be nice to have on status.php output.
kmemusage.sh
:
#!/bin/sh - TEXT=`kldstat | awk 'BEGIN {print "16i 0";} NR>1 {print toupper($4) "+"} END {print "p"}' | dc` DATA=`vmstat -m | sed -Ee '1s/.*/0/;s/.* ([0-9]+)K.*/\1+/;$s/$/1024*p/' | dc` TOTAL=$((DATA + TEXT)) 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"}'`
./kmemusage.sh TEXT=21228536, 20.2451 MB DATA=41686016, 39.7549 MB TOTAL=62914552, 60 MB
Actions