Project

General

Profile

Feature #9705

Add kernel memory usage to status.php

Added by Jim Pingle about 2 months ago. Updated about 2 months ago.

Status:
Feedback
Priority:
Low
Assignee:
Category:
Web Interface
Target version:
Start date:
08/27/2019
Due date:
% Done:

100%

Estimated time:

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

Associated revisions

Revision df586293 (diff)
Added by Jim Pingle about 2 months ago

Add kernel memory usage to status.php. Implements #9705

Revision 9a6d5e10 (diff)
Added by Jim Pingle about 2 months ago

Add kernel memory usage to status.php. Implements #9705

(cherry picked from commit df5862939e7449294305a4f270ebfdce2a99c42d)

History

#1 Updated by Jim Pingle about 2 months ago

  • Target version set to 2.5.0

#2 Updated by Jim Pingle about 2 months ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

Also available in: Atom PDF