diff --git a/ja_JP.eucJP/man/man8/sysctl.8 b/ja_JP.eucJP/man/man8/sysctl.8 index 85db9b14d6..33dacbccbf 100644 --- a/ja_JP.eucJP/man/man8/sysctl.8 +++ b/ja_JP.eucJP/man/man8/sysctl.8 @@ -1,253 +1,253 @@ .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" 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. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. 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. .\" .\" From: @(#)sysctl.8 8.1 (Berkeley) 6/6/93 .\" %FreeBSD: src/sbin/sysctl/sysctl.8,v 1.23.2.6 2001/03/05 19:33:58 ru Exp % -.\" $FreeBSD$ +.\" $FreeBSD: doc/ja_JP.eucJP/man/man8/sysctl.8,v 1.15 2001/05/14 01:10:00 horikawa Exp $ .\" .Dd September 23, 1994 .Dt SYSCTL 8 .Os .Sh 名称 .Nm sysctl .Nd カーネル状態の取得や設定 .Sh 書式 .Nm .Op Fl bn .Ar name ... .Nm .Op Fl bn .Fl w .Ar name Ns = Ns Ar value ... .Nm .Op Fl bn .Fl aAX .Sh 解説 .Nm はカーネル状態を取り出し、適切な権限があれば プロセスがカーネル状態を設定することを許します。取り出され たり、設定されたりした状態は、``Management Information Base''(``MIB'') 形式を使って記述されます。この形式では、要素はドット ``.'' で 接続されます。 .Pp 以下のオプションを使用可能です: .Bl -tag -width indent .It Fl a 現在有効な文字列や整数値をすべて表示します。 .It Fl A データ形式を知らないもの(以下、形式不明の変数と称する) を含めて、 存在している全ての MIB を表示します。 .Fl a フラグ同様、文字列や整数値も表示されます。 形式不明の変数に関しては、 そのフォーマットおよび長さに関する情報と、その変数の内容の最初の数バイトを 16 進数でダンプします。 .It Fl X フラグは、形式不明の変数の全ての内容が 16 進数でダンプされる以外は .Fl A と同じです。 .It Fl n フィールド名の出力は抑制されて、値 だけが表示されます。これはシェル変数を設定するのに役に 立ちます。たとえば、ページサイズを変数 psize に保存する には、以下のようにします: .Bd -literal -offset indent -compact set psize=`sysctl -n hw.pagesize` .Ed .Pp .It Fl b 変数の値を加工せずに、バイナリ形式で表示します。 変数名や、最後の改行文字は出力されません。これは、単一の変数に対して 操作する際に便利でしょう。 .It Fl w Xo .Ar name Ns = Ns Ar value ... .Xc MIB の .Ar name を新しい値 .Ar value に設定します。 MIB 形式 .Ar name だけが指定された場合、その名前に対応する値が得られます。 .El .Nm で得られる情報は、整数、文字列、形式不明の変数です。 .Nm はいくつかの形式不明の変数の形式を知っているだけで、それ以外のものに 対しては 16 進ダンプに頼ります。 形式不明の変数の情報は、 .Nm ps や .Nm systat , .Nm netstat などの特別な目的のプログラムによって取得された場合に、より効果的です。 .Pp 文字列と整数の情報を簡単にまとめて以下に示します。これらの 変数の詳細な説明は、 .Xr sysctl 3 を参照してください。 .Pp -changeable の列は、適切な権限を持つプロセスがその値を変更 +変更可能の列は、適切な権限を持つプロセスがその値を変更 できるかどうかを示しています。 .Bl -column net.inet.ip.forwardingxxxxxx integerxxx .It Sy "名称 型 変更可能 .It "kern.ostype 文字列 no .It "kern.osrelease 文字列 no .It "kern.osrevision 整数 no .It "kern.version 文字列 no .It "kern.maxvnodes 整数 yes .It "kern.maxproc 整数 no .It "kern.maxprocperuid 整数 yes .It "kern.maxfiles 整数 yes .It "kern.maxfilesperproc 整数 yes .It "kern.argmax 整数 no .It "kern.securelevel 整数 増やすのみ .It "kern.hostname 文字列 yes .It "kern.hostid 整数 yes .It "kern.clockrate struct no .It "kern.posix1version 整数 no .It "kern.ngroups 整数 no .It "kern.job_control 整数 no .It "kern.saved_ids 整数 no .It "kern.boottime struct no .It "kern.domainname 文字列 yes .It "kern.filedelay 整数 yes .It "kern.dirdelay 整数 yes .It "kern.metadelay 整数 yes .It "kern.osreldate 文字列 no .It "kern.bootfile 文字列 yes .It "kern.corefile 文字列 yes .It "kern.logsigexit 整数 yes .It "vm.loadavg struct no .It "hw.machine 文字列 no .It "hw.model 文字列 no .It "hw.ncpu 整数 no .It "hw.byteorder 整数 no .It "hw.physmem 整数 no .It "hw.usermem 整数 no .It "hw.pagesize 整数 no .It "hw.floatingpoint 整数 no .It "hw.machine_arch 文字列 no .It "machdep.console_device dev_t no .It "machdep.adjkerntz 整数 yes .It "machdep.disable_rtc_set 整数 yes .It "user.cs_path 文字列 no .It "user.bc_base_max 整数 no .It "user.bc_dim_max 整数 no .It "user.bc_scale_max 整数 no .It "user.bc_string_max 整数 no .It "user.coll_weights_max 整数 no .It "user.expr_nest_max 整数 no .It "user.line_max 整数 no .It "user.re_dup_max 整数 no .It "user.posix2_version 整数 no .It "user.posix2_c_bind 整数 no .It "user.posix2_c_dev 整数 no .It "user.posix2_char_term 整数 no .It "user.posix2_fort_dev 整数 no .It "user.posix2_fort_run 整数 no .It "user.posix2_localedef 整数 no .It "user.posix2_sw_dev 整数 no .It "user.posix2_upe 整数 no .It "user.stream_max 整数 no .It "user.tzname_max 整数 no .El .Pp .Sh 使用例 たとえば、システム中で許されている最大のプロセス数を知りたい ときは、以下のようにします: .Bd -literal -offset indent -compact sysctl kern.maxproc .Ed .Pp システム中で許されている最大のプロセス数を 1000 に設定する には、以下のようにします: .Bd -literal -offset indent -compact sysctl -w kern.maxproc=1000 .Ed .Pp システムのクロックレートに関する情報を得るには、以下の ようにします: .Bd -literal -offset indent -compact sysctl kern.clockrate .Ed .Pp システム負荷(ロード・アベレージ)の履歴に関する情報を 得るには、以下のようにします: .Bd -literal -offset indent -compact sysctl vm.loadavg .Ed .Pp ここに挙げたもの以外の変数も存在します。それらに関するより深い意味を知る もっとも良く、かつ、おそらく唯一の方法は、それらを定義しているソースコードを みる事であることは疑いのない事実でしょう。 .Sh 関連ファイル .Bl -tag -width -compact .It Pa トップレベルの識別子、第 2 レベルのカーネル/ハードウェア識別子、 そしてユーザレベル識別子の定義 .It Pa 第 2 レベルのネットワーク識別子の定義 .It Pa 第 3 レベルのプロファイル識別子の定義 .It Pa 第 2 レベルの仮想メモリ識別子の定義 .It Pa 第 3 レベルのインターネット識別子と 第 4 レベルの IP 識別子の定義 .It Pa 第 4 レベルの ICMP 識別子の定義 .Xr blackhole 4 .It Pa 第 4 レベルの UDP 識別子の定義 .El .Sh 関連項目 .Xr sysctl 3 , .Xr blackhole 4 , .Xr sysctl.conf 5 .Sh バグ 現状では .Nm は、sysctl ツリーの追跡、および、形式と名前の情報を得る際に、 文書化されていないカーネルの sysctl 機能へのインタフェースを使用しています。 この方法に関する正しいインタフェースは、現在検討中です。 .Sh 歴史 .Nm は .Bx 4.4 ではじめて登場しました。 .Pp .Fx 2.2 の .Nm は著しく改良されています。