Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Apr 2012 06:26:27 GMT
From:      Radim Kolar <hsn@sendmail.cz>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/166780: add sysctl for swap space used
Message-ID:  <201204090626.q396QRF4008425@red.freebsd.org>
Resent-Message-ID: <201204090630.q396UGNU047301@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         166780
>Category:       kern
>Synopsis:       add sysctl for swap space used
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 09 06:30:15 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Radim Kolar
>Release:        8.2
>Organization:
FILEZ.com
>Environment:
>Description:
currently its impossible to query swap space used or available via sysctl and it must be done via kvm calls which are inaccessible for languages like Java.

currently sysctl returns only this.
vm.swap_reserved: 768651264  <-- free space on disk holding swapfile
vm.swap_total: 629145600     <-- swapfile total size

i propose to add variable like

vm.swap_count:  <-- how many of vm.swap_total are currently in use

proposed sysctl name is similar to vm.stats.vm.v_* names.
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



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