Code Repositories
Find and share code repositories
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Cloudera Employee
Repo Description

You can use this script to automatically take jstacks. Copy the script and just execute something like: <./>. Please let me know if this helps. It works on the basis of jstack -F , for systems which are very busy you can replace it with kill -3 pid.

[root@node1 ~]# ./
Which component are you looking to take a jstack for:
Process name is :   namenode
Process id for namenode is: 15046
How many jstack required:
Sleep between each jstack
Process Id for Namenode: 15046
Taking a jstack now
Process Id for Namenode: 15046
Taking a jstack now
Repo Info
Github Repo URL
Github account name sarunsingla/admin_utilities/blob/master
Repo name
Super Guru

@ssingla - Taking jstack with the user who is running a daemon would be more effective. Just a suggestion! :)

"Make sure to run jstack as the same user that's running Jenkins itself instead of using the root user" -

One more reference -

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎01-05-2017 03:23 PM
Updated by:
Top Kudoed Authors