Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 May 2017 09:30:57 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r318235 - user/pho/stress2/tools
Message-ID:  <201705120930.v4C9UvPd042958@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pho
Date: Fri May 12 09:30:57 2017
New Revision: 318235
URL: https://svnweb.freebsd.org/changeset/base/318235

Log:
  Added more items to watch.
  
  Sponsored by:	Dell EMC Isilon

Modified:
  user/pho/stress2/tools/vmstat.sh

Modified: user/pho/stress2/tools/vmstat.sh
==============================================================================
--- user/pho/stress2/tools/vmstat.sh	Fri May 12 08:35:46 2017	(r318234)
+++ user/pho/stress2/tools/vmstat.sh	Fri May 12 09:30:57 2017	(r318235)
@@ -41,6 +41,7 @@ while getopts dmz flag; do
         esac
 done
 
+pages=`sysctl -n vm.stats.vm.v_page_count`
 start=`date '+%s'`
 OIFS=$IFS
 while true; do
@@ -54,7 +55,7 @@ while true; do
 	done
 
 	# ITEM                   SIZE  LIMIT     USED
-	[ -z "$optz" ] && vmstat -z | sed "1,2d;/^$/d;s/: /, /" |
+	[ -z "$optz" ] && vmstat -z | sed "1,2d;/^$/d;s/: /, /" | sed -E 's/[^[:print:]\r\t]/ /g' |
 	    while read l; do
 		IFS=','
 		set $l
@@ -70,8 +71,17 @@ while true; do
 		   echo "vmstat -z $1,$tot"
 	done
 
+	r=`sysctl -n vm.stats.vm.v_wire_count`
+	[ -n "$r" ] &&
 	echo "vm.cnt.v_wire_count, \
-	    $((`sysctl -n vm.stats.vm.v_wire_count` * 4))"
+	    $((r * 4))"
+	r=`sysctl -n vm.stats.vm.v_free_count`
+	[ -n "$r" ] &&
+	echo "pages in use, \
+	    $(((pages - r) * 4))"
+	r=`sysctl -n vm.kmem_map_size`
+	[ -n "$r" ] &&
+	echo "kmem_map_size, $r"
 	sleep 10
 done | awk $debug -F, '
 {



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