getloadavg
Section: C Library Functions (3)
Updated: 2025-09-21
Index
JM Home Page
roff page
名前
getloadavg - get system load averages
ライブラリ
標準 C ライブラリ (libc,~-lc)
書式
#include <stdlib.h>
int getloadavg(double loadavg[], int n);
glibc 向けの機能検査マクロの要件 (feature_test_macros(7) 参照):
getloadavg():
Since glibc 2.19:
_DEFAULT_SOURCE
In glibc up to and including 2.19:
_BSD_SOURCE
説明
The getloadavg() function returns the number of processes in the system
run queue averaged over various periods of time. Up to n samples are
retrieved and assigned to successive elements of loadavg[]. The system
imposes a maximum of 3 samples, representing averages over the last 1, 5,
and 15 minutes, respectively.
返り値
負荷平均が取得できないと -1 を返す。 取得できた場合は、実際に取得したサンプル値の数を返す。
属性
この節で使用されている用語の説明については、 attributes(7) を参照。
| インターフェース | 属性 | 値
|
|
getloadavg()
| Thread safety | MT-Safe
|
標準規格
BSD.
歴史
4.3BSD-Reno, Solaris. glibc 2.2.
関連項目
uptime(1), proc(5)
Index
- 名前
-
- ライブラリ
-
- 書式
-
- 説明
-
- 返り値
-
- 属性
-
- 標準規格
-
- 歴史
-
- 関連項目
-
This document was created by
man2html,
using the manual pages.