Metadata-Version: 2.1
Name: sysctl
Version: 0.3.3
Summary: Wrapper for the sysctl* system functions
Home-page: https://github.com/williambr/py-sysctl
Author: William Grzybowski
Author-email: wg@FreeBSD.org
License: BSD
Keywords: sysctl
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX :: BSD :: FreeBSD
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: Implementation :: CPython
License-File: LICENSE

============
py-sysctl
============

py-sysctl is a wrapper for the sysctl* system functions.
The core is written in C.


Examples
--------

py-sysctl provides a very simple interface to access sysctls through the filter method.


Sysctls for CPU #0
++++++++++++++++++

    >>> import sysctl
    >>> sysctl.filter('dev.cpu.0')
    [<Sysctl: dev.cpu.0.%desc>, <Sysctl: dev.cpu.0.%driver>, <Sysctl: dev.cpu.0.%location>, <Sysctl: dev.cpu.0.%pnpinfo>, <Sysctl: dev.cpu.0.%parent>, <Sysctl: dev.cpu.0.freq>, <Sysctl: dev.cpu.0.freq_levels>, <Sysctl: dev.cpu.0.cx_supported>, <Sysctl: dev.cpu.0.cx_lowest>, <Sysctl: dev.cpu.0.cx_usage>]


Inspect a sysctl
++++++++++++++++

    >>> import sysctl
    >>> shmall = sysctl.filter('kern.ipc.shmall')[0]
    >>> shmall.value
    131072L
    >>> shmall.tuneable
    False
    >>> shmall.writable
    True


License
-------

This python module is licensed under BSD 2 Clause, see LICENSE.
