PROCPS_uptime_sprint_SPRINT(3)

NAME
procps_uptime_sprint - provide the uptime and idle time in seconds

SYNOPSIS
#include <proc/procps.h>

char procps_uptime_sprint(void);
char procps_uptime_sprint_short(void);

Link with -lprocps.

DESCRIPTION
The functions procps_uptime_sprint() and procps_uptime_sprint_short() return a string from a statically allocated buffer which displays uptime and other system statistics. This format is similar to w(1)

RETURN VALUE
Both functions return a formatted string on success and NULL on failure.

procps_uptime_sprint returns a string displaying the uptime, number of users and load average.

procps_uptime_sprint_short returns a string displaying the uptime only.

VERSIONS
procps_uptime_sprint() and procps_uptime_sprint_short() first appeared in libproc-2 version 0.0.

SEE ALSO
fopen(3), procps_loadavg(3), procps_uptime(3), proc(5).