Skip to content

Commit 905b0f7

Browse files
committed
Add -c option for libertyperf and twasperf if javacore directory is non-standard
Signed-off-by: Kevin Grigorenko <kevin.grigorenko@us.ibm.com>
1 parent e72bb22 commit 905b0f7

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

containerdiag.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
SETLOCAL ENABLEDELAYEDEXPANSION
2323

24-
set "VERSION=0.1.20220628"
24+
set "VERSION=0.1.20221108"
2525
set "SCRIPTNAME=%~nx0"
2626

2727
goto :start

containerdiag.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ EOF
3535
exit 22
3636
}
3737

38-
VERSION="0.1.20220628"
38+
VERSION="0.1.20221108"
3939
NAMESPACE=""
4040
VERBOSE=0
4141
APPEND=1

scripts/javathreaddumps.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
usage() {
2020
printf "Usage: %s [OPTIONS] [PODNAME]...\n" "$(basename "${0}")"
2121
cat <<"EOF"
22+
-c: Path to javacores (default /output/javacore*)
2223
-d: DELAY (for run.sh)
2324
-n: No download necessary (for run.sh)
2425
-v: verbose output to stderr
@@ -31,10 +32,14 @@ DELAY=""
3132
NODOWNLOAD=""
3233
SKIPSTATS=""
3334
VERBOSE=""
35+
JAVACORE_PATH="/output/javacore*"
3436

3537
OPTIND=1
36-
while getopts "d:nvz?" opt; do
38+
while getopts "c:d:nvz?" opt; do
3739
case "$opt" in
40+
c)
41+
JAVACORE_PATH="${OPTARG}"
42+
;;
3843
d)
3944
DELAY="-d ${OPTARG}"
4045
;;
@@ -69,4 +74,4 @@ for ARG in "${@}"; do
6974
PODARGS="${PODARGS} -p ${ARG}"
7075
done
7176

72-
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "kill -3 $(podinfo.sh ${VERBOSE} -j -p ${@}); podfscp.sh ${VERBOSE} -s ${PODARGS} /output/javacore* ; podfsrm.sh ${VERBOSE} ${PODARGS} /output/javacore*"
77+
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "kill -3 $(podinfo.sh ${VERBOSE} -j -p ${@}); sleep 2; podfscp.sh ${VERBOSE} -s ${PODARGS} ${JAVACORE_PATH} ; podfsrm.sh ${VERBOSE} ${PODARGS} ${JAVACORE_PATH}"

scripts/libertyperf.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
usage() {
2020
printf "Usage: %s [OPTIONS] [PODNAME]...\n" "$(basename "${0}")"
2121
cat <<"EOF"
22+
-c: Path to javacores (default /output/javacore*)
2223
-d: DELAY (for run.sh)
2324
-j: JAVACORE_INTERVAL for linperf.sh
2425
-m: VMSTAT_INTERVAL for linperf.sh
@@ -43,10 +44,14 @@ SCRIPT_SPAN=""
4344
TOP_INTERVAL=""
4445
TOP_DASH_H_INTERVAL=""
4546
VMSTAT_INTERVAL=""
47+
JAVACORE_PATH="/output/javacore*"
4648

4749
OPTIND=1
48-
while getopts "d:hj:m:nps:t:u:vz?" opt; do
50+
while getopts "c:d:hj:m:nps:t:u:vz?" opt; do
4951
case "$opt" in
52+
c)
53+
JAVACORE_PATH="${OPTARG}"
54+
;;
5055
d)
5156
DELAY="-d ${OPTARG}"
5257
;;
@@ -100,7 +105,7 @@ for ARG in "${@}"; do
100105
done
101106

102107
if [ "${SKIPSERVERDUMP}" -eq "0" ]; then
103-
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "linperf.sh -q ${SCRIPT_SPAN} ${JAVACORE_INTERVAL} ${TOP_INTERVAL} ${TOP_DASH_H_INTERVAL} ${VMSTAT_INTERVAL} $(podinfo.sh ${VERBOSE} -j -p ${@}) && DUMPS=\"\$(libertydump.sh ${VERBOSE} ${PODARGS})\"; podfscp.sh ${VERBOSE} -s ${PODARGS} /logs /config /output/javacore* \${DUMPS} ; podfsrm.sh ${VERBOSE} ${PODARGS} /output/javacore* \${DUMPS}"
108+
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "linperf.sh -q ${SCRIPT_SPAN} ${JAVACORE_INTERVAL} ${TOP_INTERVAL} ${TOP_DASH_H_INTERVAL} ${VMSTAT_INTERVAL} $(podinfo.sh ${VERBOSE} -j -p ${@}) && DUMPS=\"\$(libertydump.sh ${VERBOSE} ${PODARGS})\"; podfscp.sh ${VERBOSE} -s ${PODARGS} /logs /config ${JAVACORE_PATH} \${DUMPS} ; podfsrm.sh ${VERBOSE} ${PODARGS} ${JAVACORE_PATH} \${DUMPS}"
104109
else
105-
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "linperf.sh -q ${SCRIPT_SPAN} ${JAVACORE_INTERVAL} ${TOP_INTERVAL} ${TOP_DASH_H_INTERVAL} ${VMSTAT_INTERVAL} $(podinfo.sh ${VERBOSE} -j -p ${@}) && podfscp.sh ${VERBOSE} -s ${PODARGS} /logs /config /output/javacore* ; podfsrm.sh ${VERBOSE} ${PODARGS} /output/javacore*"
110+
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "linperf.sh -q ${SCRIPT_SPAN} ${JAVACORE_INTERVAL} ${TOP_INTERVAL} ${TOP_DASH_H_INTERVAL} ${VMSTAT_INTERVAL} $(podinfo.sh ${VERBOSE} -j -p ${@}) && podfscp.sh ${VERBOSE} -s ${PODARGS} /logs /config ${JAVACORE_PATH} ; podfsrm.sh ${VERBOSE} ${PODARGS} ${JAVACORE_PATH}"
106111
fi

scripts/twasperf.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
usage() {
2020
printf "Usage: %s [OPTIONS] [PODNAME]...\n" "$(basename "${0}")"
2121
cat <<"EOF"
22+
-c: Path to javacores (default /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/javacore*)
2223
-d: DELAY (for run.sh)
2324
-j: JAVACORE_INTERVAL for linperf.sh
2425
-m: VMSTAT_INTERVAL for linperf.sh
@@ -41,10 +42,14 @@ SCRIPT_SPAN=""
4142
TOP_INTERVAL=""
4243
TOP_DASH_H_INTERVAL=""
4344
VMSTAT_INTERVAL=""
45+
JAVACORE_PATH="/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/javacore*"
4446

4547
OPTIND=1
46-
while getopts "d:hj:m:ns:t:u:vz?" opt; do
48+
while getopts "c:d:hj:m:ns:t:u:vz?" opt; do
4749
case "$opt" in
50+
c)
51+
JAVACORE_PATH="${OPTARG}"
52+
;;
4853
d)
4954
DELAY="-d ${OPTARG}"
5055
;;
@@ -94,4 +99,4 @@ for ARG in "${@}"; do
9499
PODARGS="${PODARGS} -p ${ARG}"
95100
done
96101

97-
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "linperf.sh -q ${SCRIPT_SPAN} ${JAVACORE_INTERVAL} ${TOP_INTERVAL} ${TOP_DASH_H_INTERVAL} ${VMSTAT_INTERVAL} $(podinfo.sh ${VERBOSE} -j -p ${@}) && podfscp.sh ${VERBOSE} -s ${PODARGS} /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/ /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/javacore* ; podfsrm.sh ${VERBOSE} ${PODARGS} /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/javacore*"
102+
run.sh ${DELAY} ${NODOWNLOAD} ${VERBOSE} ${SKIPSTATS} sh -c "linperf.sh -q ${SCRIPT_SPAN} ${JAVACORE_INTERVAL} ${TOP_INTERVAL} ${TOP_DASH_H_INTERVAL} ${VMSTAT_INTERVAL} $(podinfo.sh ${VERBOSE} -j -p ${@}) && podfscp.sh ${VERBOSE} -s ${PODARGS} /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/ /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/ ${JAVACORE_PATH} ; podfsrm.sh ${VERBOSE} ${PODARGS} ${JAVACORE_PATH}"

0 commit comments

Comments
 (0)