177 lines
5.4 KiB
Groff
177 lines
5.4 KiB
Groff
.\" Copyright (c) 1990, 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.
|
|
.\"
|
|
.\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93
|
|
.\" %FreeBSD: src/usr.bin/ktrace/ktrace.1,v 1.16 2002/04/20 12:15:02 charnier Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd June 6, 1993
|
|
.Dt KTRACE 1
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm ktrace
|
|
.Nd ¥«¡¼¥Í¥ë¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹¤ò¹Ô¤¦
|
|
.Sh ½ñ¼°
|
|
.Nm
|
|
.Op Fl aCcdi
|
|
.Op Fl f Ar trfile
|
|
.Op Fl g Ar pgrp | Fl p Ar pid
|
|
.Op Fl t Ar trstr
|
|
.Nm
|
|
.Op Fl adi
|
|
.Op Fl f Ar trfile
|
|
.Op Fl t Ar trstr
|
|
.Ar command
|
|
.Sh ²òÀâ
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢»ØÄꤷ¤¿¥×¥í¥»¥¹¤Î¥«¡¼¥Í¥ë¤Î¥È¥ì¡¼¥¹¥í¥°¤ò
|
|
¤È¤ê¤Þ¤¹¡£¥«¡¼¥Í¥ë¥È¥ì¡¼¥¹¾ðÊó¤Ï¥Õ¥¡¥¤¥ë
|
|
.Pa ktrace.out
|
|
¤ËµÏ¿¤µ¤ì¤Þ¤¹¡£
|
|
¥È¥ì¡¼¥¹¤µ¤ì¤ë¥«¡¼¥Í¥ëÆ°ºî¤Ë¤Ï¡¢
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¡¢namei ÊÑ´¹¡¢¥·¥°¥Ê¥ë½èÍý¡¢
|
|
.Tn I/O
|
|
½èÍý¤¬´Þ¤Þ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
¤¤¤Ã¤¿¤ó¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹¤ò¹Ô¤¦¤è¤¦¤Ë¤¹¤ë¤È¡¢¥È¥ì¡¼¥¹¥Ç¡¼¥¿¤Ï
|
|
¥×¥í¥»¥¹¤¬½ªÎ»¤¹¤ë¤«¡¢¥È¥ì¡¼¥¹¥Ý¥¤¥ó¥È¤¬¥¯¥ê¥¢¤µ¤ì¤ë¤Þ¤ÇµÏ¿¤µ¤ì³¤±¤Þ¤¹¡£
|
|
¥È¥ì¡¼¥¹¤·¤¿¥×¥í¥»¥¹¤ÏËÄÂç¤ÊÎÌ¤Î¥í¥°¤òµÞ®¤Ëºî¤ë¤¿¤á¡¢¥æ¡¼¥¶¤Ï¥×¥í¥»¥¹¤Î
|
|
¥È¥ì¡¼¥¹¤ò¹Ô¤¦Á°¤Ë¥È¥ì¡¼¥¹¤ò¼è¤ê¾Ã¤¹ÊýË¡¤ò³Ð¤¨¤Æ¤ª¤¯¤³¤È¤ò¶¯¤¯¤ª´«¤á¤·¤Þ¤¹¡£
|
|
¥æ¡¼¥¶¤¬¼Â¹Ô¤·¤Æ¤¤¤ëÁ´¤Æ¤Î¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹Æ°ºî¤ò¼è¤ê¾Ã¤¹¤Ë¤Ï¡¢
|
|
°Ê²¼¤Î¥³¥Þ¥ó¥É¤Ç½½Ê¬¤Ç¤¹¡£¤³¤Î¥³¥Þ¥ó¥É¤¬ root ¸¢¸Â¤Ç¼Â¹Ô¤µ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢
|
|
Á´¤Æ¤Î¥×¥í¥»¥¹¤ËÂФ·¤Æ¥È¥ì¡¼¥¹¤Î¼è¾Ã¤·¤¬¹Ô¤ï¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
.Dl \&$ ktrace -C
|
|
.Pp
|
|
¥È¥ì¡¼¥¹¥Õ¥¡¥¤¥ë¤Ï¤½¤Î¤Þ¤Þ¤Ç¤ÏÆɤá¤Þ¤»¤ó¤Î¤Ç¡¢
|
|
.Xr kdump 1
|
|
¤ò»È¤Ã¤Æ²òÀϤ·¤Æ¤¯¤À¤µ¤¤¡£
|
|
.Pp
|
|
¥ª¥×¥·¥ç¥ó¤È¤·¤Æ¤Ï¡¢°Ê²¼¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£
|
|
.Bl -tag -width indent
|
|
.It Fl a
|
|
´û¸¤Î¥È¥ì¡¼¥¹¥Õ¥¡¥¤¥ë¤òºÆ¹½ÃÛ¤·¤Ê¤¤¤Ç¡¢¸å¤í¤ËÄɲ䷤Ƥ¤¤¤Þ¤¹¡£
|
|
.It Fl C
|
|
¥æ¡¼¥¶¤¬¼Â¹Ô¤·¤Æ¤¤¤ëÁ´¤Æ¤Î¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹Æ°ºî¤ò¥ª¥Õ¤Ë¤·¤Þ¤¹¡£
|
|
root ¤¬¼Â¹Ô¤·¤¿¾ì¹ç¤Ï¥·¥¹¥Æ¥à¤Î¤¹¤Ù¤Æ¤Î¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹¤¬¥ª¥Õ¤Ë¤Ê¤ê¤Þ¤¹¡£
|
|
.It Fl c
|
|
»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤ä¥×¥í¥»¥¹¤ËÂФ¹¤ë¥È¥ì¡¼¥¹¥Ý¥¤¥ó¥È¤ò¥¯¥ê¥¢¤·¤Þ¤¹¡£
|
|
.It Fl d
|
|
»ØÄꤷ¤¿¥×¥í¥»¥¹¤Î¸½ºß¤Î»Ò¥×¥í¥»¥¹¤¹¤Ù¤Æ¤ËÂФ·¤Æ¥È¥ì¡¼¥¹¤ò¹Ô¤¤¤Þ¤¹¡£
|
|
.It Fl f Ar trfile
|
|
¥È¥ì¡¼¥¹µÏ¿¤ò
|
|
.Pa ktrace.out
|
|
¤Î¤«¤ï¤ê¤Ë
|
|
.Ar trfile
|
|
¤ËµÏ¿¤·¤Þ¤¹¡£
|
|
.It Fl g Ar pgid
|
|
¥×¥í¥»¥¹¥°¥ë¡¼¥×Æâ¤ÎÁ´¤Æ¤Î¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹¤ò¥ª¥ó (¥ª¥Õ) ¤Ë¤·¤Þ¤¹(
|
|
.Fl g
|
|
¥Õ¥é¥°¤Ï 1 ¤Ä¤·¤«»ØÄê¤Ç¤¤Þ¤»¤ó)¡£
|
|
.It Fl i
|
|
»ØÄꤷ¤¿¥×¥í¥»¥¹¤¬º£¸åÀ¸À®¤¹¤ë¤¹¤Ù¤Æ¤Î»Ò¥×¥í¥»¥¹¤ËÂФ·¡¢¥È¥ì¡¼¥¹¥Õ¥é¥°¤ò
|
|
·Ñ¾µ¤µ¤»¤Þ¤¹¡£
|
|
.It Fl p Ar pid
|
|
»ØÄꤷ¤¿¥×¥í¥»¥¹ ID ¤Î¥È¥ì¡¼¥¹¤ò¹Ô¤¤¤Þ¤¹ (¤Þ¤¿¤Ï ¼è¤ê¾Ã¤·¤Þ¤¹) (
|
|
.Fl p
|
|
¥Õ¥é¥°¤Ï 1 ¤Ä¤·¤«»ØÄê¤Ç¤¤Þ¤»¤ó)¡£
|
|
.It Fl t Ar trstr
|
|
¤³¤Îʸ»úÎó°ú¿ô¤Ï¡¢¥«¡¼¥Í¥ë¥È¥ì¡¼¥¹¥Ý¥¤¥ó¥È¤Î 1 ¤Ä¤ò 1 ʸ»ú¤Çɽ¸½¤·¤Æ¤¤¤Þ¤¹¡£
|
|
°Ê²¼¤Îɽ¤Ï¡¢Ê¸»ú¤È¥È¥ì¡¼¥¹¥Ý¥¤¥ó¥È¤ÎÂбþ´Ø·¸¤òɽ¤·¤Æ¤¤¤Þ¤¹¡£
|
|
.Pp
|
|
.Bl -tag -width flag -compact
|
|
.It Cm c
|
|
¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¥È¥ì¡¼¥¹
|
|
.It Cm n
|
|
namei ÊÑ´¹¤Î¥È¥ì¡¼¥¹
|
|
.It Cm i
|
|
.Tn I/O
|
|
¤Î¥È¥ì¡¼¥¹
|
|
.It Cm s
|
|
¥·¥°¥Ê¥ë½èÍý¤Î¥È¥ì¡¼¥¹
|
|
.It Cm u
|
|
¥æ¡¼¥¶¤Ç¤Î¥È¥ì¡¼¥¹
|
|
.It Cm w
|
|
¥³¥ó¥Æ¥¥¹¥È¥¹¥¤¥Ã¥Á
|
|
.It Cm +
|
|
¥È¥ì¡¼¥¹¥Ý¥¤¥ó¥È¤Î¥Ç¥Õ¥©¥ë¥È½¸¹ç¡¢¤¹¤Ê¤ï¤Á
|
|
.Cm c , n , i , s , u
|
|
¤ò¥È¥ì¡¼¥¹¤·¤Þ¤¹¡£
|
|
.El
|
|
.It Ar command
|
|
»ØÄꤷ¤¿¥È¥ì¡¼¥¹¥Õ¥é¥°¤Ç
|
|
.Ar command
|
|
¤ò¼Â¹Ô¤·¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
.Fl p ,
|
|
.Fl g ,
|
|
.Ar command
|
|
¤ÏÁê¸ß¤ËÇÓ¾Ū¤Ç¤¹¡£Æ±»þ¤ËÍøÍѤ¹¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£
|
|
.Sh »ÈÍÑÎã
|
|
# ¥×¥í¥»¥¹ ID 34 ¤Î¥×¥í¥»¥¹¤¹¤Ù¤Æ¤Î¥«¡¼¥Í¥ëÆ°ºî¤Î¥È¥ì¡¼¥¹¤ò¹Ô¤¤¤Þ¤¹¡£
|
|
.Dl $ ktrace -p 34
|
|
.Pp
|
|
# ¥×¥í¥»¥¹¥°¥ë¡¼¥× ID 15 ¤Î¤¹¤Ù¤Æ¤Î¥×¥í¥»¥¹¤Î¥«¡¼¥Í¥ëÆ°ºî¤Î¥È¥ì¡¼¥¹¤ò¹Ô¤¤¡¢
|
|
¸½ºß¤ª¤è¤Ó̤Íè¤Î»Ò¥×¥í¥»¥¹¤¹¤Ù¤Æ¤Ë¥È¥ì¡¼¥¹¥Õ¥é¥°¤òÅϤ·¤Þ¤¹¡£
|
|
.Dl $ ktrace -idg 15
|
|
.Pp
|
|
# ¥×¥í¥»¥¹ ID 65 ¤Î¥×¥í¥»¥¹¤Î¤¹¤Ù¤Æ¤Î¥È¥ì¡¼¥¹¤ò¼è¤ê¾Ã¤·¤Þ¤¹¡£
|
|
.Dl $ ktrace -cp 65
|
|
.Pp
|
|
# ¥×¥í¥»¥¹ ID 70 ¤Î¥×¥í¥»¥¹¤È¤½¤Î¤¹¤Ù¤Æ¤Î»Ò¥×¥í¥»¥¹¤Î¡¢¥·¥°¥Ê¥ë¤Ë´Ø¤¹¤ë
|
|
¥È¥ì¡¼¥¹¤ò¼è¤ê¾Ã¤·¤Þ¤¹¡£
|
|
.Dl $ ktrace -t s -cdp 70
|
|
.Pp
|
|
# ¥×¥í¥»¥¹ ID 67 ¤Î¥×¥í¥»¥¹¤Î
|
|
.Tn I/O
|
|
¤Ë´Ø¤¹¤ë¥È¥ì¡¼¥¹¤ò͸ú¤Ë¤·¤Þ¤¹¡£
|
|
.Dl $ ktrace -ti -p 67
|
|
.Pp
|
|
# ¥³¥Þ¥ó¥É "w" ¤ò¼Â¹Ô¤·¡¢¥·¥¹¥Æ¥à¥³¡¼¥ë¤Î¤ß¤Î¥È¥ì¡¼¥¹¤ò¹Ô¤¤¤Þ¤¹¡£
|
|
.Dl $ ktrace -tc w
|
|
.Pp
|
|
# "tracedata" ¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë¤¹¤Ù¤Æ¤Î¥È¥ì¡¼¥¹¤ò¼è¤ê¾Ã¤·¤Þ¤¹¡£
|
|
.Dl $ ktrace -c -f tracedata
|
|
.Pp
|
|
# ¥æ¡¼¥¶¤¬½êͤ·¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥×¥í¥»¥¹¤Î¥È¥ì¡¼¥¹¤ò¼è¤ê¾Ã¤·¤Þ¤¹¡£
|
|
.Dl $ ktrace -C
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr kdump 1
|
|
.Sh ¥Ð¥°
|
|
.Ar trfile
|
|
¤¬ÉáÄ̤Υե¡¥¤¥ë¤Î¾ì¹ç¤À¤±Æ¯¤¤Þ¤¹¡£
|
|
.Sh Îò»Ë
|
|
.Nm
|
|
¥³¥Þ¥ó¥É¤Ï
|
|
.Bx 4.4
|
|
¤«¤é¼ÂÁõ¤µ¤ì¤Þ¤·¤¿¡£
|