Project

General

Profile

Actions

Feature #9705

closed

Add kernel memory usage to status.php

Added by Jim Pingle over 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Web Interface
Target version:
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 #1

Updated by Jim Pingle over 2 years ago

  • Target version set to 2.5.0
Actions #2

Updated by Jim Pingle over 2 years ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Jim Pingle about 2 years ago

  • Target version changed from 2.5.0 to 2.4.5
Actions #4

Updated by Jim Pingle almost 2 years ago

  • Status changed from Feedback to Resolved

Information is present in status.php output on 2.4.5.a.20191217.0637

Actions

Also available in: Atom PDF