LC.sys.*

The module LC.sys provides access to several system informations.

LC.sys.get_fqdn()
Rückgabe

fully-qualified name

This function returns the fully-qualified domain name of the server. The result is the same as running the command hostname -f.

LC.sys.get_machine()
Rückgabe

machine (hardware) name

This function returns the hardware name (e.g. x86_64). The result is the same as running the command uname -m.

LC.sys.get_name()
Rückgabe

kernel name

This function returns the kernel name (e.g. Linux). The result is the same as running the command uname -k.

LC.sys.get_node()
Rückgabe

host name

This function returns the host name (without domain). The result is the same as running the command uname -n.

LC.sys.get_release()
Rückgabe

kernel release

This function returns the kernel release (e.g. 4.9.0-11-amd64). The result is the same as running the command uname -r.

LC.sys.get_version()
Rückgabe

kernel version

This function returns the full kernel version string (e.g. #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20)). The result is the same as running the command uname -v.

LC.sys.group_exists(name)
Parameter
  • name (String) – group name

Rückgabe

group id or false

Check if a group with the given name exists. The check is done using getgrnam(), so NIS and LDAP are also taken into account.

If the group exists, its numerical ID is returned, otherwise false.

LC.sys.user_exists(name)
Parameter
  • name (String) – user name

Rückgabe

user id or false

Check if a user with the given name exists. The check is done using getgrnam(), so NIS and LDAP are also taken into account.

If the user exists, its numerical ID is returned, otherwise false.


Zuletzt aktualisiert am 29.06.2020.
weiter: LC.timeout.*
zurück: LC.mutex.*