You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: show-busy-java-threads
+8-5Lines changed: 8 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -87,7 +87,7 @@ Output control:
87
87
default from all java process.
88
88
-c, --count <num> set the thread count to show, default is 5.
89
89
-a, --append-file <file> specifies the file to append output as log.
90
-
-S, --jstack-file-dir <path> specifies the dir for storing jstack output files, and keep files.
90
+
-S, --jstack-file-dir <path> specifies the directory for storing jstack output files, and keep files.
91
91
default store jstack output files at tmp dir, and auto remove after run.
92
92
use this option to keep files so as to review jstack later.
93
93
delay the delay between updates in seconds.
@@ -189,9 +189,13 @@ count=${count:-5}
189
189
use_ps=${use_ps:-false}
190
190
top_delay=${top_delay:-0.5}
191
191
192
-
if [ -n"$jstack_file_dir"-a-e"$jstack_file_dir" ];then
193
-
[ !-d"$jstack_file_dir" ] && fatal "Error: $jstack_file_dir(specified by option -S, the dir for storing jstack output files) exists but is not a directory!"
194
-
[ !-w"$jstack_file_dir" ] && fatal "Error: directory $jstack_file_dir(specified by option -S, the dir for storing jstack output files) exists but is not writable!"
192
+
if [ -n"$jstack_file_dir" ];then
193
+
if [ -e"$jstack_file_dir" ];then
194
+
[ !-d"$jstack_file_dir" ] && fatal "Error: $jstack_file_dir(specified by option -S, for storing jstack output files) exists but is not a directory!"
195
+
[ !-w"$jstack_file_dir" ] && fatal "Error: directory $jstack_file_dir(specified by option -S, for storing jstack output files) exists but is not writable!"
196
+
else
197
+
mkdir -p "$jstack_file_dir"&& fatal "Error: fail to create directory $jstack_file_dir(specified by option -S, for storing jstack output files)!"
0 commit comments