suve

awful: function: sysinfo

Declaration

dict :sysinfo

Summary

:!: Available only on Linux.

Returns a dictionary containing various info about the state of the system the interpreter is running on.

Dictionary structure

Index Value
disk Array containing info about disk usage (the one root directory resides on). 0 is total available space, 1 is free space, and 2 is used space. Amounts are expressed in bytes.
domain System domain name.
hostname System hostname.
load Array containing average system loads (as floats). 0 is the 1-minute load, 1 is the 5-minute load and 2 is the 15-minute load.
procs Number of active processes.
ram Array containing info about RAM memory usage. 0 is total memory, 1 is free memory, and 2 is used memory.
Amounts are expressed in bytes.
swap Array containing info about swap space usage. 0 is total swap, 1 is free swap, and 2 is used swap. Amounts are expressed in bytes.
system System name. Most probably simply Linux or GNU\Linux.
thermal Array of floats containing temperatures at all thermal zones found. Indexes equal zone IDs.
uptime System running time, in seconds.
version Linux kernel version.

Example

# :sysinfo example.
:set &SYS :sysinfo
:writeln $SYS[s'hostname'] s' has been running for ' $SYS[s'uptime'] s' seconds!'

wikipage modified on 2014/0601/2317