alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (jstack.1)

This example Java source code file (jstack.1) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

general, gnu, java, jdk, license, public

The jstack.1 Java example source code

'\" t
.\" Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
.\" Title: jstack
.\" Language: English
.\" Date: 2013年11月21日
.\" SectDesc: トラブルシューティング・ツール
.\" Software: JDK 8
.\" Arch: 汎用
.\"
.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
.\"
.\" This code is free software; you can redistribute it and/or modify it
.\" under the terms of the GNU General Public License version 2 only, as
.\" published by the Free Software Foundation.
.\"
.\" This code is distributed in the hope that it will be useful, but WITHOUT
.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
.\" version 2 for more details (a copy is included in the LICENSE file that
.\" accompanied this code).
.\"
.\" You should have received a copy of the GNU General Public License version
.\" 2 along with this work; if not, write to the Free Software Foundation,
.\" Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
.\"
.\" Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
.\" or visit www.oracle.com if you need additional information or have any
.\" questions.
.\"
.pl 99999
.TH "jstack" "1" "2013年11月21日" "JDK 8" "トラブルシューティング・ツール"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
jstack \- Javaプロセス、コア・ファイルまたはリモート・デバッグ・サーバーに対するJavaスレッドのスタック・トレースを出力します。このコマンドは試験的なもので、サポートされていません。
.SH "概要"
.sp
.if n \{\
.RS 4
.\}
.nf
\fIjstack\fR [ \fIoptions\fR ] \fIpid\fR 
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fIjstack\fR [ \fIoptions\fR ] \fIexecutable\fR \fIcore\fR
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
\fIjstack\fR [ \fIoptions\fR ] [ \fIserver\-id\fR@ ] \fIremote\-hostname\-or\-IP\fR
.fi
.if n \{\
.RE
.\}
.PP
\fIoptions\fR
.RS 4
コマンドライン・オプション。オプションを参照してください。
.RE
.PP
\fIpid\fR
.RS 4
出力するスタック・トレースのプロセスIDです。プロセスはJavaプロセスである必要があります。マシン上で実行しているJavaプロセスの一覧を取得するには、jps(1)コマンドを使用します。
.RE
.PP
\fI実行可能ファイル\fR
.RS 4
コア・ダンプの作成元のJava実行可能ファイル。
.RE
.PP
\fIコア\fR
.RS 4
出力するスタック・トレースのコア・ファイルです。
.RE
.PP
\fIremote\-hostname\-or\-IP\fR
.RS 4
リモート・デバッグ・サーバーの\fIホスト名\fRまたは\fIIP\fRアドレス。jsadebugd(1)を参照してください。
.RE
.PP
\fIserver\-id\fR
.RS 4
複数のデバッグ・サーバーが同一のリモート・ホストで実行している場合の、オプション固有のID。
.RE
.SH "説明"
.PP
\fIjstack\fRコマンドは、指定されたJavaプロセス、コア・ファイルまたはリモート・デバッグ・サーバーに対するJavaスレッドのJavaスタック・トレースを出力します。Javaフレームごとに、フルクラス名、メソッド名、バイトコード・インデックス(bci)、および行番号(利用可能な場合)が出力されます。\fI\-m\fRオプションを使用すると、\fIjstack\fRコマンドは、すべてのスレッドのJavaフレームとネイティブ・フレームの両方を、プログラム・カウンタ(PC)とともに出力します。ネイティブ・フレームごとに、PCに最も近いネイティブ・シンボル(利用可能な場合)が出力されます。C++分解名は分解解除されません。C++名を分解解除するには、このコマンドの出力を\fIc++filt\fRにパイプします。指定されたプロセスが64ビットJava仮想マシン上で実行されている場合は、\fI\-J\-d64\fRオプションを指定する必要があります(例:
\fIjstack \-J\-d64 \-m pid\fR)。
.PP
\fB注意\fR
このユーティリティはサポート対象外であり、将来のJDKのリリースでは利用できなくなる可能性があります。dbgeng\&.dllファイルが存在していないWindowsシステムでは、Debugging Tools For Windowsをインストールしないとこれらのツールが正常に動作しません。また、\fIPATH\fR環境変数には、ターゲット・プロセスによって使用されるjvm\&.dllの場所、またはクラッシュ・ダンプ・ファイルが生成された場所が含まれるようにしてください。次に例を示します。
.sp
.if n \{\
.RS 4
.\}
.nf
set PATH=<jdk>\ejre\ebin\eclient;%PATH%
.fi
.if n \{\
.RE
.\}
.SH "オプション"
.PP
\-F
.RS 4
\fIjstack\fR
[\fI\-l\fR]
\fIpid\fRが応答しない場合にスタック・ダンプを強制します。
.RE
.PP
\-l
.RS 4
長形式のリスト。所有\fIjava\&.util\&.concurrent\fRの所有できるシンクロナイザの一覧など、ロックについての追加情報を印刷します。http://docs\&.oracle\&.com/javase/8/docs/api/java/util/concurrent/locks/AbstractOwnableSynchronizer\&.htmlにある
\fIAbstractOwnableSynchronizer\fRクラス記述を参照してください
.RE
.PP
\-m
.RS 4
JavaおよびネイティブC/C++フレームの両方を持つ混合モードのスタック・トレースを出力します。
.RE
.PP
\-h
.RS 4
ヘルプ・メッセージが出力されます。
.RE
.PP
\-help
.RS 4
ヘルプ・メッセージが出力されます。
.RE
.SH "既知の不具合"
.PP
混合モードのスタック・トレースでは、\fI\-m\fRオプションはリモート・デバッグ・サーバーでは機能しません。
.SH "関連項目"
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
pstack(1)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
C++filt(1)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jps(1)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
jsadebugd(1)
.RE
.br
'pl 8.5i
'bp

Other Java examples (source code examples)

Here is a short list of links related to this Java jstack.1 source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.