.\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %%%LICENSE_START(BSD_3_CLAUSE_UCB) .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" %%%LICENSE_END .\" .\" @(#)getloadavg.3 8.1 (Berkeley) 6/4/93 .\" .\" 2007-12-08, mtk, Converted from mdoc to man macros .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 2002 NAKANO Takeo all rights reserved. .\" Translated Sun 6 Jan 2002 by NAKANO Takeo .\" .TH GETLOADAVG 3 2014\-04\-01 Linux "Linux Programmer's Manual" .SH 名前 getloadavg \- get system load averages .SH 書式 .nf \fB#define _BSD_SOURCE\fP /* feature_test_macros(7) 参照 */ \fB#include \fP .sp \fBint getloadavg(double \fP\fIloadavg[]\fP\fB, int \fP\fInelem\fP\fB);\fP .fi .SH 説明 \fBgetloadavg\fP() 関数はシステムの実行キューに入っているプロセスの数を、 様々な期間について平均した値を返す。 \fInelem\fP 個までのサンプル値を取得し、 \fIloadavg\fP[] の連続する要素に代入する。 システムが提供するサンプル数は 3 個までで、 それぞれ最近 1, 5, 15 分の平均を表している。 .SH 返り値 .\" .SH HISTORY .\" The .\" BR getloadavg () .\" function appeared in .\" 4.3BSD Reno . 負荷平均が取得できないと \-1 を返す。 取得できた場合は、実際に取得したサンプル値の数を返す。 .SH バージョン この関数は glibc のバージョン 2.2 以降で利用可能である。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBgetloadavg\fP() はスレッドセーフである。 .SH 準拠 .\" mdoc seems to have a bug - there must be no newline here POSIX.1\-2001 にはない。 BSD 系と Solaris に存在する。 .SH 関連項目 \fBuptime\fP(1), \fBproc\fP(5) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.65 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。