$darkmode
Elektra 0.11.0
Plugin: uname

This plugin is a storage plugin that will use the syscall uname (2). No resolver is needed for that plugin to work.

Installation

See installation. The package is called libelektra5-extra.

Special Values

This plugin defines following keynames below its mount point:

Errors

The only documented error in uname(2) is when an invalid buffer is passed to it. As this is an implementation error only, this plugin should not run into errors.

Restrictions

This plugin is read-only.

Example

1 # To mount uname information using this plugin:
2 kdb mount -R noresolver none user:/tests/uname uname
3 
4 # List available data
5 kdb ls user:/tests/uname/
6 #> user:/tests/uname/machine
7 #> user:/tests/uname/nodename
8 #> user:/tests/uname/release
9 #> user:/tests/uname/sysname
10 #> user:/tests/uname/version
11 
12 # Read the OS name
13 kdb get user:/tests/uname/sysname
14 # STDOUT-REGEX: CYGWIN_NT.*|Darwin|DragonFly|FreeBSD|Linux|OpenBSD
15 
16 # Read the OS version number
17 kdb get user:/tests/uname/release
18 # STDOUT-REGEX: [0-9]+(\.[0-9]+)*[[:alnum:][:punct:]]*
19 
20 # Unmount the plugin
21 kdb umount user:/tests/uname