doc/documentation/manual-pages/ja/man1/truss.1
Sergio Carlavilla Delgado 989d921f5d Migrate doc to Hugo/AsciiDoctor
I'm very pleased to announce the release of
our new website and documentation using
the new toolchain with Hugo and AsciiDoctor.

To get more information about the new toolchain
please read the FreeBSD Documentation Project Primer[1],
Hugo docs[2] and AsciiDoctor docs[3].

Acknowledgment:
Benedict Reuschling <bcr@>
Glen Barber <gjb@>
Hiroki Sato <hrs@>
Li-Wen Hsu <lwhsu@>
Sean Chittenden <seanc@>
The FreeBSD Foundation

[1] https://docs.FreeBSD.org/en/books/fdp-primer/
[2] https://gohugo.io/documentation/
[3] https://docs.asciidoctor.org/home/

Approved by:    doceng, core
2021-01-26 00:31:29 +01:00

95 lines
2 KiB
Groff

.\" %FreeBSD: src/usr.bin/truss/truss.1,v 1.15 2002/11/26 17:33:36 ru Exp %
.\"
.\" $FreeBSD$
.Dd November 23, 1997
.\"
.\" WORD: trace トレース(する)[ktrace.1, mtrace.8]
.\"
.Dt TRUSS 1
.Os
.Sh 名称
.Nm truss
.Nd システムコールをトレースする
.Sh 書式
.Nm
.Op Fl faedDS
.Op Fl o Ar file
.Fl p Ar pid
.Nm
.Op Fl faedDS
.Op Fl o Ar file
command
.Op args
.Sh 解説
.Nm
ユーティリティは、指定したプロセスやプログラムが呼び出すシステムコールを
トレースします。出力は指定した出力ファイルか、デフォルトでは
標準エラー出力へ送られます。処理は
.Xr procfs 5
でプロセスを監視し、それを停止させたり再開させて行なわれます。
.Pp
オプションは以下のとおりです :
.Bl -tag -width indent
.It Fl f
元々のトレース対象プロセスが
.Xr fork 2 ,
.Xr vfork 2
等で作成した子孫プロセスを
トレースします。
.It Fl a
.Xr execve 2
システムコールで渡された引数文字列を表示します。
.It Fl e
.Xr execve 2
システムコールで渡された環境文字列を表示します。
.It Fl d
出力中に、トレース開始からの経過時間を示す、
タイムスタンプを含めます。
.It Fl D
出力中に、最後に記録されたイベントからの経過時間を示す、
タイムスタンプを含めます。
.It Fl S
プロセスが受信するシグナルについての情報は表示しません。
(通常、
.Nm
はシステムコールイベントと同様、シグナル情報も表示します。)
.It Fl o Ar file
出力を標準エラー出力ではなく、指定したファイル
.Ar file
へ送ります。
.It Fl p Ar pid
新しくコマンドを起動するのではなく、指定したプロセス ID
.Ar pid
のプロセスを追います。
.It Ar command Op args
コマンド
.Ar command
を実行し、そのシステムコールをトレースします。
(オプション
.Fl p
.Ar command
は互いに排他的にしか使用できません。)
.El
.Sh 使用例
# "hello" を echo する際に使われるシステムコールを追います
.Dl $ truss /bin/echo hello
# 同じことをしますが、出力をファイルに書き込みます
.Dl $ truss -o /tmp/truss.out /bin/echo hello
# すでに動作しているプロセスを追います
.Dl $ truss -p 1
.Sh 関連項目
.Xr kdump 1 ,
.Xr ktrace 1 ,
.Xr procfs 5
.Sh 歴史
.Nm
コマンドは
.An Sean Eric Fagan
.Fx
用に作成しました。
System V Release 4 や SunOS で利用可能な
類似のコマンドをモデルにしました。