Home Explore Blog CI



neovim

55th chunk of `runtime/doc/luvref.txt`
4eb507039b8161a304f19a586de641b6447e5ee567b67b670000000100000fa0
                      *uv.uptime()*

                Returns the current system uptime in seconds.

                Returns: `number` or `fail`

uv.print_all_handles()                                  *uv.print_all_handles()*

                Prints all handles associated with the main loop to stderr.
                The format is `[flags] handle-type handle-address` . Flags are
                `R` for referenced, `A` for active and `I` for internal.

                Returns: Nothing.

                Note: This is not available on Windows.

                WARNING: This function is meant for ad hoc debugging, there
                are no API/ABI stability guarantees.

uv.print_active_handles()                            *uv.print_active_handles()*

                The same as |uv.print_all_handles()| except only active
                handles are printed.

                Returns: Nothing.

                Note: This is not available on Windows.

                WARNING: This function is meant for ad hoc debugging, there
                are no API/ABI stability guarantees.

uv.guess_handle({fd})                                        *uv.guess_handle()*

                Parameters:
                - `fd`: `integer`

                Used to detect what type of stream should be used with a given
                file descriptor `fd`. Usually this will be used during
                initialization to guess the type of the stdio streams.

                Returns: `string`

uv.gettimeofday()                                            *uv.gettimeofday()*

                Cross-platform implementation of `gettimeofday(2)`. Returns
                the seconds and microseconds of a unix time as a pair.

                Returns: `integer, integer` or `fail`

uv.interface_addresses()                              *uv.interface_addresses()*

                Returns address information about the network interfaces on
                the system in a table. Each table key is the name of the
                interface while each associated value is an array of address
                information where fields are `ip`, `family`, `netmask`,
                `internal`, and `mac`.

                See |luv-constants| for supported address `family` output values.

                Returns: `table`
                - `[name(s)]` : `table`
                  - `ip` : `string`
                  - `family` : `string`
                  - `netmask` : `string`
                  - `internal` : `boolean`
                  - `mac` : `string`

uv.if_indextoname({ifindex})                               *uv.if_indextoname()*

                Parameters:
                - `ifindex`: `integer`

                IPv6-capable implementation of `if_indextoname(3)`.

                Returns: `string` or `fail`

uv.if_indextoiid({ifindex})                                 *uv.if_indextoiid()*

                Parameters:
                - `ifindex`: `integer`

                Retrieves a network interface identifier suitable for use in
                an IPv6 scoped address. On Windows, returns the numeric
                `ifindex` as a string. On all other platforms,
                |uv.if_indextoname()| is used.

                Returns: `string` or `fail`

uv.loadavg()                                                      *uv.loadavg()*

                Returns the load average as a triad. Not supported on Windows.

                Returns: `number, number, number`

uv.os_uname()                                                    *uv.os_uname()*

                Returns system information.

                Returns: `table`
                - `sysname` : `string`
                - `release` : `string`
                - `version` : `string`
                - `machine` : `string`

uv.os_gethostname()                                        *uv.os_gethostname()*

                Returns the hostname.

                Returns: `string`

uv.os_getenv({name} [, {size}])           

Title: Libuv: System Uptime, Debugging Handles, Interface Information, Load Average, and OS Details
Summary
This section covers Libuv functions to retrieve system uptime (`uv.uptime`), debug handle information (`uv.print_all_handles`, `uv.print_active_handles`), guess stream types from file descriptors (`uv.guess_handle`), obtain Unix time (`uv.gettimeofday`), retrieve network interface addresses and related information (`uv.interface_addresses`, `uv.if_indextoname`, `uv.if_indextoiid`), get system load averages (`uv.loadavg`), and fetch operating system details such as system name, release, version, and machine type (`uv.os_uname`, `uv.os_gethostname`). Platform-specific notes and warnings are included.