getloadavg(3)
β¨ getloadavg(3) β¨
okay bestie, welcome to the getloadavg page π this one lives in section 3 of the manual, and it's literally just "hey, how stressed is my computer rn" in function form. no cap.
πΈ NAME πΈ
getloadavg β get system load averages π
π LIBRARY π
Standard C library (libc, -lc)
β¨ SYNOPSIS β¨
#include <stdlib.h>
int getloadavg(double loadavg[], int n);
π¦ Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
getloadavg():- Since glibc 2.19:
_DEFAULT_SOURCE
- In glibc up to and including 2.19:
_BSD_SOURCE
- Since glibc 2.19:
π DESCRIPTION π
so basically, getloadavg() tells you how many processes are chilling in the system run queue, averaged over various periods of time. like, it's the vibe check for your CPU's to-do list π
Up to n samples get retrieved and assigned to successive elements of loadavg[]. and here's the tea: the system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 minutes, respectively. so that's it, that's the whole menu π
π RETURN VALUE π
if the load average was unobtainable, -1 is returned π otherwise, you get back the number of samples actually retrieved. so like, count your blessings, literally.
π ATTRIBUTES π
for an explanation of the terms used in this section, see attributes(7).
- Interface:
getloadavg() - Attribute: Thread safety
- Value:
MT-Safe
π STANDARDS π
BSD. periodt.
π§ HISTORY π§
4.3BSD-Reno, Solaris. glibc 2.2. she's been around, bestie, she's a legend π
π«Ά SEE ALSO π«Ά
and that's the page!! this one's from the Linux man-pages 6.20 era, dated 2025-09-21 π go forth and check your load average, you icon, you. slay β¨
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: BSD-3-Clause
- Copyright 1989-1993, The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms