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

ArrayIndexOutOf BoundsException while trying to read pixels from an image
got 403 when trying to deploy war to tomcat with maven
maven dependency not resolved
Android converting string to array string [closed]
Ensuring unique serial numbers in a Hibernate session
Opening url with æøå, using URL.openStream (Java)
Unable to pass “|” in HttpGet() Class
Java Gui empty frame
Is it possible to make an array with dynamic memory using while loop without asking the size of memory from user?
Set a Value for JAXBElement<String>
what is the logic of the term 'object' in certain situations
Strange outOfBoundsException when iterating through lists
Error pages in Grails app hosted using IIS 7 / Tomcat connector
Java generics: Calling generic Method “…is not applicable for the arguments…”
Getting hWnd from current process
Move a value from one key to another in HashMap

Categories

HOME
java
twitter
server
homebrew
session
mean-stack
malloc
jpeg
fancybox
mouse
swagger-ui
vaadin7
libtiff
crystal-reports-2008
object-detection
riot.js
blazemeter
dxf
qhull
react-css-modules
virtualdub
pingfederate
webkitspeechrecognition
c++-amp
delicious-api
nat
skia
jspresso
grails-3.1
mmenu
mpmediaquery
bower-install
host
git-merge
dynamics-crm-2013
xenforo
ssjs
android-fingerprint-api
janrain
http-live-streaming
glew
estimote
mime
flashair
menuitem
dotcover
parentheses
filepicker
dandelion
ionicons
sage-one
rdfs
jxcore
capacity
mcafee
spring-mongodb
topbeat
color-picker
ubuntu-10.04
hill-climbing
itextpdf
independentsoft
comobject
ibaction
arcanist
sailfish-os
graph-api-explorer
npapi
python-green
operator-precedence
dd
nstableviewcell
codeigniter-routing
java-metro-framework
aapt
marmalade
transcoding
algebraic-data-types
listings
cos
type-equivalence
ocunit
dice
pysimplesoap
enter
adk
eclipse-templates
cinema-4d
rfc1123
netbeans-7.1
file-comparison
disclosure
inotifycollectionchanged
pyinotify
sql-server-profiler
w3wp.exe
infrastructure
routedevent
multi-tier
kdbg
adrotator
phonon

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