Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Jul 2018 13:22:21 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Changes to sysctl values
Message-ID:  <e8498497-00df-81d8-3bf8-4d4179113532@ShaneWare.Biz>

next in thread | raw e-mail | index | archive | help
I use devel/py-sysctl in some scripts to get values, using a recent
12-current (r336728) I see at least two values that get a different
value type than on 11-stable. Same version of python and port.

I have 12-current running in a bhyve on an 11-stable host.

Is there a recent change to sysctl calls that would cause this?
or is this bhyve related?

On 11-stable I get long int values that I expect

Python 2.7.15 (default, Jun  8 2018, 08:54:38)
[GCC 4.2.1 Compatible FreeBSD Clang 6.0.0 (tags/RELEASE_600/final
326565)] on freebsd11
Type "help", "copyright", "credits" or "license" for more information.
>>> sysctl.filter('vm.stats.vm.v_wire_count')[0].value
1061486L
>>> sysctl.filter('vm.stats.vm.v_free_count')[0].value
77217L

On 12-current I get the same sysctls as a bytearray

Python 2.7.15 (default, Jul 26 2018, 10:32:28)
[GCC 4.2.1 Compatible FreeBSD Clang 6.0.1 (tags/RELEASE_601/final
335540)] on freebsd12
Type "help", "copyright", "credits" or "license" for more information.
>>> sysctl.filter('vm.stats.vm.v_wire_count')[0].value
bytearray(b"\'R\x12\x00")
>>> sysctl.filter('vm.stats.vm.v_free_count')[0].value
bytearray(b'\x06\\\x08\x00')



-- 
FreeBSD - the place to B...Software Developing

Shane Ambler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e8498497-00df-81d8-3bf8-4d4179113532>