java


Java kill 3 thread dump output redirect


Is it possible to redirect kill 3 <java_pid> thread dump output?
I have huge system_out.log files on servers with many lines (>500mb), it's very hard to parse and look for dump.
Instead of trying to figure out how to redirect just use a tool that does what you want. Any of these:
jstack
jcmd (using Thread.print)
astack
Please append following JVM arguments to your application. Thread dump should be captured at dump.log.
-XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=dump.log
Please note it does not redirect, but enables JVM diagnostic logging. So, there could be possible over head as well.
As suggested by Matt, you can use jstack (etc) to capture thread dump in a file. For that you can simply copy the JDK directory in your server. But, if you want to package & ship JDK with your application (for debugging later) please check if there is any licensing implication or not.

Related Links

Finding Largest Number in an Array From User Input
Search DirContext without name
How to check if an element is a subclass of element in a lists of classes
JPA Locking in a Webapp
System.out.println prints out of order in Play Framework console
What private fields does java have?
Trouble with retrieving data with prepared statement in DAO [closed]
Android Studio- Counting Down (If Loops) Array Errors
How to display the total price from class in driver?
JSON to java unmarshelling in JAX-RS returning { } in POST
Get latest object from S3 bucket?
HashMap || How hashcode lookup is constant
How to add back button on ActionBar in Android Studio?
Java.util.Arrays.sort - what type? [duplicate]
Large memory footprint on simple Java code
Exception InInitializer Error for public static integer

Categories

HOME
client
variables
deployment
omnet++
gis
amazon-ecs
graphql
webpack-2
wamp
gitpitch
google-cloud-spanner
commonmark
fortumo
transformation
ef-migrations
crystal-reports-2008
xlsxwriter
kudan
wijmo
crosstab
buildbot
fopen
large-file-upload
srcset
google-rich-snippets
binary-data
data-manipulation
contact-form
siesta-swift
gtrendsr
perlin-noise
stringtemplate
repo
rotational-matrices
mpmediaquery
picasso
hexo
devextreme
web-mining
space-complexity
dynamics-crm-2013
jna
angularjs-factory
lumberjack
gulp-sourcemaps
texmaker
angular2-meteor
apple-news
diagnostics
knockout-components
gcsfuse
django-scheduler
webdriverjs
sonarlint-vs
messenger
deadbolt-2
sdf
wapiti
iad
comobject
jmeter-maven-plugin
fouc
deis
tableau-online
splash
oberon
python-green
block-device
oxwall
jsonpickle
codeigniter-url
socketexception
xojo
typo3-neos
multiprocessor
ms-project-server-2010
web2py-modules
dotnetnuke-5
gridcontrol
padarn
distutils
gdata-api
javaspaces
tridion-worldserver
uiviewanimation-curve
zpt
xdomainrequest
recent-documents
calling-convention
krl
pyinotify
suppress
photoshop-cs4
ti-dsp
aquaticprime
mediarss

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App