I have not had experience looking at this but here is what I found.
I tried JConsole ( in your bin directory ). That gives you a lot of information about various pools, but no specific mention of stack.
I found something that indicates setting the stack size higher may be a problem because each thread gets that amount of space and you can actually run out of memory faster.
I found this HotSpot parameter documentation that mentions some default sizes.
-XX:ThreadStackSize=512 Thread Stack Size (in Kbytes). (0 means use default stack size) [Sparc: 512; Solaris x86: 320 (was 256 prior in 5.0 and earlier); Sparc 64 bit: 1024; Linux amd64: 1024 (was 0 in 5.0 and earlier); all others 0.]
Thank you for your reply. However, what i am looking for is to read whatever the current set -Xss (stack sie) is for a particular JVM i.e PID be it default or set eplicitly from inside a unix shell script or a java program inorder to setup a monitoring alert script.
A third-party tool may also come handy only if we can use its API inorder to read the stack size inside the unix shell script or a java program.
There is no (easy) way of getting the stack size for threads in a Java process.
There is for example no system property that you could get with System.getProperty(...), and even the JVM TI (an API for debugging and profiling tools to get information from and control a running JVM) doesn't seem to have any way to get the stack size.
The pmap command for solaris tells us the current stack usage for a JVM. What is th use of the current stack size that it displays when there should be no way to find the upper limit of stack which that JVM is allowed to run with.
This deprives us for writing a script that alerts as the stack size reaches more than 90% of allocated stack size. Thats why i need it.