All Projects → tklauser → go-sysconf

tklauser / go-sysconf

Licence: BSD-3-Clause license
sysconf for Go, without using cgo

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to go-sysconf

Ecominit
eComInit is a free init system and service manager designed to scale from lightweight desktops to web-scale cloud deployments. It aims to offer feature-parity with systemd but with a modular, portable architecture compliant with software engineering best-practice.
Stars: ✭ 352 (+195.8%)
Mutual labels:  unix, posix, bsd
Awesome Unix
All the UNIX and UNIX-Like: Linux, BSD, macOS, Illumos, 9front, and more.
Stars: ✭ 973 (+717.65%)
Mutual labels:  unix, posix, bsd
InitKit
Neo-InitWare is a modular, cross-platform reimplementation of the systemd init system. It is experimental.
Stars: ✭ 364 (+205.88%)
Mutual labels:  unix, posix, bsd
Posnk
An operating system project.
Stars: ✭ 34 (-71.43%)
Mutual labels:  unix, posix
Frosted
Frosted: Free POSIX OS for tiny embedded devices
Stars: ✭ 194 (+63.03%)
Mutual labels:  unix, posix
Kirc
A tiny IRC client written in POSIX C99.
Stars: ✭ 416 (+249.58%)
Mutual labels:  unix, posix
Ngircd
Free, portable and lightweight Internet Relay Chat server
Stars: ✭ 292 (+145.38%)
Mutual labels:  unix, bsd
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (-17.65%)
Mutual labels:  unix, posix
Parsrs
CSV, JSON, XML text parsers and generators written in pure POSIX shellscript
Stars: ✭ 56 (-52.94%)
Mutual labels:  unix, posix
Unix Permissions
Swiss Army knife for Unix permissions
Stars: ✭ 106 (-10.92%)
Mutual labels:  unix, posix
Cats
Implementations of cat(1) from various sources.
Stars: ✭ 125 (+5.04%)
Mutual labels:  unix, bsd
Dragonflybsd
DragonFly BSD System Source Repository (read-only mirror)
Stars: ✭ 367 (+208.4%)
Mutual labels:  unix, bsd
Mg
Micro (GNU) Emacs-like text editor ❤️ public-domain
Stars: ✭ 117 (-1.68%)
Mutual labels:  unix, bsd
Smcroute
Static multicast routing for UNIX
Stars: ✭ 140 (+17.65%)
Mutual labels:  unix, bsd
Bfs
A breadth-first version of the UNIX find command
Stars: ✭ 336 (+182.35%)
Mutual labels:  unix, bsd
Skalibs
The skarnet.org C system programming library
Stars: ✭ 58 (-51.26%)
Mutual labels:  unix, posix
Pimd
PIM-SM/SSM multicast routing for UNIX
Stars: ✭ 143 (+20.17%)
Mutual labels:  unix, bsd
autoconf-archive
A mirror of the GNU Autoconf Archive, a collection of more than 500 macros for GNU Autoconf that have been contributed as free software by friendly supporters of the cause from all over the Internet.
Stars: ✭ 70 (-41.18%)
Mutual labels:  unix, system-programming
Cloudlibc
CloudABI's standard C library
Stars: ✭ 254 (+113.45%)
Mutual labels:  unix, posix
Ltp
Linux Test Project http://linux-test-project.github.io/
Stars: ✭ 1,654 (+1289.92%)
Mutual labels:  unix, posix

go-sysconf

Go Reference GitHub Action Status

sysconf for Go, without using cgo or external binaries (e.g. getconf).

Supported operating systems: Linux, macOS, DragonflyBSD, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos.

All POSIX.1 and POSIX.2 variables are supported, see References for a complete list.

Additionally, the following non-standard variables are supported on some operating systems:

Variable Supported on
SC_PHYS_PAGES Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos
SC_AVPHYS_PAGES Linux, OpenBSD, Solaris/Illumos
SC_NPROCESSORS_CONF Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos
SC_NPROCESSORS_ONLN Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos
SC_UIO_MAXIOV Linux

Usage

package main

import (
	"fmt"

	"github.com/tklauser/go-sysconf"
)

func main() {
	// get clock ticks, this will return the same as C.sysconf(C._SC_CLK_TCK)
	clktck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK)
	if err == nil {
		fmt.Printf("SC_CLK_TCK: %v\n", clktck)
	}
}

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].