kern/166780: add sysctl for swap space used

Radim Kolar hsn at sendmail.cz
Mon Apr 9 06:30:16 UTC 2012


>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:


More information about the freebsd-bugs mailing list