OSDN Git Service

Complete locale.5
[linuxjm/LDP_man-pages.git] / draft / man5 / acct.5
index 76096e9..d6b49e8 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (C) 2008, Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
+.\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
 .\"
 .\" Japanese Version Copyright (c) 2008  Akihiro MOTOKI
 .\"         all rights reserved.
 .\" Translated 2008-08-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
-.\" 
-.\"WORD:       accounting      ¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°
 .\"
-.TH ACCT 5 2008-06-15 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
-.SH Ì¾Á°
-.\"O acct \- process accounting file
-acct \- ¥×¥í¥»¥¹¡¦¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¡¦¥Õ¥¡¥¤¥ë
-.\"O .SH SYNOPSIS
-.SH ½ñ¼°
-.B #include <sys/acct.h>
-.\"O .SH DESCRIPTION
-.SH ÀâÌÀ
-.\"O If the kernel is built with the process accounting option enabled
-.\"O .RB ( CONFIG_BSD_PROCESS_ACCT ),
-.\"O then calling
-.\"O .BR acct (2)
-.\"O starts process accounting, for example:
-¥«¡¼¥Í¥ë¤¬¥×¥í¥»¥¹¡¦¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¤Î¥ª¥×¥·¥ç¥ó
-.RB ( CONFIG_BSD_PROCESS_ACCT )
-¤òÍ­¸ú¤Ë¤·¤ÆºîÀ®¤µ¤ì¤Æ¤¤¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ë
-.BR acct (2)
-¤ò¸Æ¤Ó½Ð¤¹¤È¥×¥í¥»¥¹¡¦¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¤¬³«»Ï¤µ¤ì¤ë¡£
+.TH ACCT 5 2008\-06\-15 Linux "Linux Programmer's Manual"
+.SH 名前
+acct \- プロセスアカウンティングファイル
+.SH 書式
+\fB#include <sys/acct.h>\fP
+.SH 説明
+カーネルがプロセスアカウンティングのオプション (\fBCONFIG_BSD_PROCESS_ACCT\fP)  を有効にして作成されていると、以下のように
+\fBacct\fP(2)  を呼び出すとプロセスアカウンティングが開始される。
 
 .in +4n
- acct("/var/log/pacct");
+acct("/var/log/pacct");
 .in
 
-.\"O When process accounting is enabled, the kernel writes a record
-.\"O to the accounting file as each process on the system terminates.
-.\"O This record contains information about the terminated process,
-.\"O and is defined in
-.\"O .I <sys/acct.h>
-.\"O as follows:
-¥×¥í¥»¥¹¡¦¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤È¡¢¥«¡¼¥Í¥ë¤Ï
-¥·¥¹¥Æ¥à¾å¤Î³Æ¥×¥í¥»¥¹¤¬½ªÎ»¤¹¤ë¤¿¤Ó¤Ë¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥Õ¥¡¥¤¥ë¤Ë
-¥ì¥³¡¼¥É¤ò½ñ¤­¹þ¤à¡£
-¤³¤Î¥ì¥³¡¼¥É¤Ï¡¢½ªÎ»¤·¤¿¥×¥í¥»¥¹¤Ë´Ø¤¹¤ë¾ðÊó¤òÊÝ»ý¤¹¤ë¤â¤Î¤Ç¡¢
-.I <sys/acct.h>
-¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
+プロセスアカウンティングが有効になっていると、カーネルは システム上の各プロセスが終了するたびにアカウンティングファイルに レコードを書き込む。
+このレコードは、終了したプロセスに関する情報を保持するもので、 \fI<sys/acct.h>\fP で以下のように定義されている。
 
 .in +4n
 .nf
@@ -90,7 +74,7 @@ struct acct {
                                (see wait(2)) */
     char      ac_comm[ACCT_COMM+1];
                             /* Command name (basename of last
-                               executed command; null-terminated) */
+                               executed command; null\-terminated) */
     char      ac_pad[\fIX\fP];    /* padding bytes */
 };
 
@@ -103,73 +87,21 @@ enum {          /* Bits that may be set in ac_flag field */
 .fi
 .in
 .PP
-.\"O The
-.\"O .I comp_t
-.\"O data type is a floating-point value consisting of a 3-bit, base-8 exponent,
-.\"O and a 13-bit mantissa.
-.\"O A value,
-.\"O .IR c ,
-.\"O of this type can be converted to a (long) integer as follows:
-¥Ç¡¼¥¿·¿
-.I comp_t
-¤ÏÉâÆ°¾®¿ôÅÀÃͤǡ¢3 ¥Ó¥Ã¥ÈÉý¤Î´ð¿ô¤¬ 8 ¤Î»Ø¿ôÉô¤È 13 ¥Ó¥Ã¥ÈÉý¤Î²¾¿ôÉô¤«¤é
-¹½À®¤µ¤ì¤ë¡£
-.I comp_t
-·¿¤ÎÃÍ
-.I c
-¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤·¤Æ (long ·¿¤Î) À°¿ô¤ËÊÑ´¹¤Ç¤­¤ë¡£
+データ型 \fIcomp_t\fP は浮動小数点値で、3 ビット幅の基数が 8 の指数部と 13 ビット幅の仮数部から 構成される。 \fIcomp_t\fP
+型の値 \fIc\fP は以下のようにして (long 型の) 整数に変換できる。
 .nf
 
     v = (c & 0x1fff) << (((c >> 13) & 0x7) * 3);
 .fi
 .PP
-.\"O The
-.\"O .IR ac_utime ,
-.\"O .IR ac_stime ,
-.\"O and
-.\"O .I ac_etime
-.\"O fields measure time in "clock ticks"; divide these values by
-.\"O .I sysconf(_SC_CLK_TCK)
-.\"O to convert them to seconds.
-¥Õ¥£¡¼¥ë¥É
-.IR ac_utime ,
-.IR ac_stime ,
-.I ac_etime
-¤Ï "clock ticks" Ã±°Ì¤Ç·×¬¤·¤¿»þ´Ö¤Ç¤¢¤ë¡£
-¤³¤ì¤é¤ÎÃͤò
-.I sysconf(_SC_CLK_TCK)
-¤Ç³ä¤ë¤È¡¢ÉäËÊÑ´¹¤Ç¤­¤ë¡£
-.\"O .SS Version 3 Accounting File Format
-.SS ¥Ð¡¼¥¸¥ç¥ó 3 ¤Î¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥Õ¥¡¥¤¥ë¤Î¥Õ¥©¡¼¥Þ¥Ã¥È
-.\"O Since kernel 2.6.8,
-.\"O an optional alternative version of the accounting file can be produced
-.\"O if the
-.\"O .B CONFIG_BSD_PROCESS_ACCT_V3
-.\"O option is set when building the kernel.
-.\"O With this option is set,
-.\"O the records written to the accounting file contain additional fields,
-.\"O and the width of
-.\"O .I c_uid
-.\"O and
-.\"O .I ac_gid
-.\"O fields is widened from 16 to 32 bits
-.\"O (in line with the increased size of UID and GIDs in Linux 2.4 and later).
-.\"O The records are defined as follows:
-¥«¡¼¥Í¥ë 2.6.8 °Ê¹ß¤Ç¤Ï¡¢
-Ê̤ΥС¼¥¸¥ç¥ó¤Î¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥Õ¥¡¥¤¥ë¤òÀ¸À®¤¹¤ë¤³¤È¤¬¤Ç¤­¡¢
-¤³¤ì¤ò»È¤¦¤Ë¤Ï¥«¡¼¥Í¥ë¹½ÃÛ»þ¤Ë
-.B CONFIG_BSD_PROCESS_ACCT_V3
-¥ª¥×¥·¥ç¥ó¤¬Í­¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ëɬÍפ¬¤¢¤ë¡£
-¤³¤Î¥ª¥×¥·¥ç¥ó¤¬ÀßÄꤵ¤ì¤ë¤È¡¢¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥Õ¥¡¥¤¥ë¤Ë½ñ¤­¹þ¤Þ¤ì¤ë
-¥ì¥³¡¼¥É¤Ë¥Õ¥£¡¼¥ë¥É¤¬Äɲ䵤ì¤ë¡£
-¤Þ¤¿¡¢¥Õ¥£¡¼¥ë¥É
-.I c_uid
-¤È
-.I ac_gid
-¤ÎÉý¤¬ 16 ¥Ó¥Ã¥È¤«¤é 32 ¥Ó¥Ã¥È¤Ë³ÈÄ¥¤µ¤ì¤ë
-(¤³¤ì¤Ï Linux 2.4 °Ê¹ß¤Ç UID ¤È GID ¤Î¥µ¥¤¥º¤¬Áý¤¨¤Æ¤¤¤ë¤Î¤Ë
-Âбþ¤·¤¿¤â¤Î¤Ç¤¢¤ë)¡£
-¤³¤Î¥ì¥³¡¼¥É¤Ï°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
+フィールド \fIac_utime\fP, \fIac_stime\fP, \fIac_etime\fP は "clock ticks" 単位で計測した時間である。
+これらの値を \fIsysconf(_SC_CLK_TCK)\fP で割ると、秒に変換できる。
+.SS "バージョン 3 のアカウンティングファイルのフォーマット"
+カーネル 2.6.8 以降では、 別のバージョンのアカウンティングファイルを生成することができ、 これを使うにはカーネル構築時に
+\fBCONFIG_BSD_PROCESS_ACCT_V3\fP オプションが有効になっている必要がある。
+このオプションが設定されると、アカウンティングファイルに書き込まれる レコードにフィールドが追加される。 また、フィールド \fIc_uid\fP と
+\fIac_gid\fP の幅が 16 ビットから 32 ビットに拡張される (これは Linux 2.4 以降で UID と GID
+のサイズが増えているのに 対応したものである)。 このレコードは以下のように定義されている。
 
 .in +4n
 .nf
@@ -195,56 +127,25 @@ struct acct_v3 {
     comp_t    ac_swaps;     /* Number of swaps (unused) */
     char      ac_comm[ACCT_COMM]; /* Command name */
 };
-
 .fi
 .in
-.\"O .SH VERSIONS
-.SH ¥Ð¡¼¥¸¥ç¥ó
-.\"O The
-.\"O .I acct_v3
-.\"O structure is defined in glibc since version 2.6.
-.I acct_v3
-¹½Â¤ÂΤϥС¼¥¸¥ç¥ó 2.6 °Ê¹ß¤Î glibc ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
-.\"O .SH CONFORMING TO
-.SH ½àµò
-.\"O Process accounting originated on BSD.
-.\"O Although it is present on most systems, it is not standardized,
-.\"O and the details vary somewhat between systems.
-¥×¥í¥»¥¹¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¤Ï BSD Í³Íè¤Ç¤¢¤ë¡£
-¤³¤Îµ¡Ç½¤Ï¤Û¤È¤ó¤É¤Î¥·¥¹¥Æ¥à¤Ë¸ºß¤¹¤ë¤¬¡¢É¸½à²½¤µ¤ì¤Æ¤ª¤é¤º¡¢
-¤½¤Î¾ÜºÙ¤Ï¥·¥¹¥Æ¥à¤Ë¤è¤ê¤¤¤¯¤é¤«°Û¤Ê¤ë¡£
-.\"O .SH NOTES
-.SH Ãí°Õ
-.\"O Records in the accounting file are ordered by termination time of
-.\"O the process.
-¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥Õ¥¡¥¤¥ë¤Î¥ì¥³¡¼¥É¤Ï¡¢¥×¥í¥»¥¹¤Î½ªÎ»»þ¹ï¤Î½ç½ø¤È¤Ê¤ë¡£
+.SH バージョン
+\fIacct_v3\fP 構造体はバージョン 2.6 以降の glibc で定義されている。
+.SH 準拠
+プロセスアカウンティングは BSD 由来である。 この機能はほとんどのシステムに存在するが、標準化されておらず、
+その詳細はシステムによりいくらか異なる。
+.SH 注意
+アカウンティングファイルのレコードは、プロセスの終了時刻の順序となる。
 
-.\"O In kernels up to and including 2.6.9,
-.\"O a separate accounting record is written for each thread created using
-.\"O the NPTL threading library;
-.\"O since Linux 2.6.10,
-.\"O a single accounting record is written for the entire process
-.\"O on termination of the last thread in the process.
-¥Ð¡¼¥¸¥ç¥ó 2.6.9 °ÊÁ°¤Î¥«¡¼¥Í¥ë¤Ç¤Ï¡¢
-NPTL ¥¹¥ì¥Ã¥É¥é¥¤¥Ö¥é¥ê¤ò»È¤Ã¤ÆºîÀ®¤µ¤ì¤¿¥¹¥ì¥Ã¥É¤Ç¤Ï
-¥¹¥ì¥Ã¥ÉËè¤ËÊÌ¡¹¤Î¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥ì¥³¡¼¥É¤¬½ñ¤­¹þ¤Þ¤ì¤Æ¤¤¤¿¡£
-Linux 2.6.10 °Ê¹ß¤Ç¤Ï¡¢¥×¥í¥»¥¹Æâ¤ÎºÇ¸å¤Î¥¹¥ì¥Ã¥É¤¬½ªÎ»¤¹¤ë¤È¡¢
-¥×¥í¥»¥¹Á´ÂΤˤĤ¤¤Æ¤Î¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¥ì¥³¡¼¥É¤¬°ì¤Ä¤À¤±½ñ¤­¹þ¤Þ¤ì¤ë¡£
+バージョン 2.6.9 以前のカーネルでは、 NPTL スレッドライブラリを使って作成されたスレッドでは
+スレッド毎に別々のアカウンティングレコードが書き込まれていた。 Linux 2.6.10 以降では、プロセス内の最後のスレッドが終了すると、
+プロセス全体についてのアカウンティングレコードが一つだけ書き込まれる。
 
-.\"O The
-.\"O .I proc/sys/kernel/acct
-.\"O file, described in
-.\"O .BR proc (5),
-.\"O defines settings that control the behavior of process accounting
-.\"O when disk space runs low.
-.I proc/sys/kernel/acct
-¥Õ¥¡¥¤¥ë
-.RB ( proc (5)
-¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë) ¤Ï¡¢¥Ç¥£¥¹¥¯ÍÆÎ̤λĤ꤬¾¯¤Ê¤¯¤Ê¤Ã¤¿ºÝ¤Î
-¥×¥í¥»¥¹¡¦¥¢¥«¥¦¥ó¥Æ¥£¥ó¥°¤ÎÆ°ºî¤òÀ©¸æ¤¹¤ëÀßÄê¤òÊÝ»ý¤·¤Æ¤¤¤ë¡£
-.\"O .SH SEE ALSO
-.SH ´ØÏ¢¹àÌÜ
-.BR lastcomm (1),
-.BR acct (2),
-.BR accton (8),
-.BR sa (8)
+\fIproc/sys/kernel/acct\fP ファイル (\fBproc\fP(5)  で説明されている) は、ディスク容量の残りが少なくなった際の
+プロセスアカウンティングの動作を制御する設定を保持している。
+.SH 関連項目
+\fBlastcomm\fP(1), \fBacct\fP(2), \fBaccton\fP(8), \fBsa\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。