tail head cat sleep
QR code linking to this page

manページ  — GETLOADAVG

名称

getloadavg – システムの負荷平均の取得

内容

書式


#include <stdlib.h>
int
getloadavg(double loadavg[], int nelem);

解説

getloadavg() 関数は、さまざまな期間で平均したシステム実行待ち行列のプロセス数を返します。 最大個数 nelem のサンプルが取り出され、 loadavg, Ns, Bq の逐次要素に割り当てられます。システムは直近の 1, 5, 15 分間での平均を示す、 最大 3 個のサンプルを必要とします。

診断

負荷平均が得られなかった場合は -1 が返ります。 その他の場合は、実際に取り出されたサンプルの個数が返ります。

関連項目

uptime(1), kvm_getloadavg(3), sysctl(3)

歴史

getloadavg() 関数は、 BSD 4.3 Reno で最初に取り入れられました。

GETLOADAVG (3) June 4, 1993

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

Do you laugh when the waiter drops a tray full of dishes? Unix weenies do. They're the first ones to laugh at hapless users, trying to figure out an error message that doesn't have anything to do with what they just typed.
— The Unix Haters' handbook