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

Android : Dependency added gives DEX error in Gradle.
Java. Adding colours to cells in Jtable
Local session bean JNDI lookup in WebLogic - NameNotFoundException
Problems with sleep() in combination with a network task on Android
Delete temporary locked files
Defining model in Camel-swagger
JPA - Select ManyToMany field
rto create an instance of class ByteBuffer but getting error saying "cannot instantiate type ByteBuffer
Axis 1 : How to log Request and Response xml
how to redirect submit button another servlet
Any way to sort listed files in ArrayList? [duplicate]
Media type in REST API for validation
How to add timePicker using fragment?
ActiveMQ Producer resend if destination not available
Add Java Annotations programatically
JMockit - expectation returns old value instead of value associated with private field

Categories

HOME
cloud
nullpointerexception
routes
gis
razor
malloc
rdf
jpeg
alpha
medical
google-apps-marketplace
task
size
try-catch
undefined
beyondcompare
textfield
nodatime
jasonette
autosys
buildbot
react-css-modules
phpfox
minitab
xacml
c++-amp
bluestacks
fabric8
bcd
pim
usbserial
avcapturesession
catalog
nssegmentedcontrol
space-complexity
hue
leading-zero
sql-server-agent
jvm-languages
angular2-meteor
smartcontracts
prolog-setof
logparser
paxos
rdfs
jxcore
csound
nodebb
feeds
google-perftools
flutterwave
sqldf
redundancy
messenger
angular-cache
etsy
persist
prettytensor
ready-api
dataview
xpath-1.0
msys
simple-framework
purge
service-accounts
php-ci
graph-drawing
apache-commons-fileupload
iiviewdeckcontroller
graph-api-explorer
geonetwork
java.util.concurrent
asp.net-web-api-odata
neolane
onactivityresult
phpthumb
cloud-connect
gnu-smalltalk
cdc
spring-io
excel-2003
trusted
frameset
objective-c-2.0
appconkit
windows-phone-7.1.1
gwt-ext
hamachi
invite
yslow
infrastructure
rescale
mdac

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App