diff --git a/deploy/docker/fs/opt/appsmith/record-heap-dump.sh b/deploy/docker/fs/opt/appsmith/record-heap-dump.sh new file mode 100755 index 000000000000..4148a1c45ac4 --- /dev/null +++ b/deploy/docker/fs/opt/appsmith/record-heap-dump.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o nounset +set -o noglob + +location=/appsmith-stacks/heap_dumps/ad-hoc/$(date "+%Y_%m_%d_%H_%S")/heap-profile; +mkdir -p $location; +jcmd $(pgrep -f -- "-jar\sserver.jar") GC.heap_dump filename=$location/${HOSTNAME}.log \ No newline at end of file diff --git a/deploy/docker/fs/opt/appsmith/record-thread-dump.sh b/deploy/docker/fs/opt/appsmith/record-thread-dump.sh new file mode 100755 index 000000000000..0b44d56d9474 --- /dev/null +++ b/deploy/docker/fs/opt/appsmith/record-thread-dump.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o nounset +set -o noglob + +location=/appsmith-stacks/heap_dumps/ad-hoc/$(date "+%Y_%m_%d_%H_%S")/thread-profile; +mkdir -p $location; +jcmd $(pgrep -f -- "-jar\sserver.jar") Thread.print > $location/trace-${HOSTNAME}.log \ No newline at end of file diff --git a/deploy/docker/fs/opt/appsmith/thread-profile-start.sh b/deploy/docker/fs/opt/appsmith/thread-profile-start.sh new file mode 100755 index 000000000000..f7aed6c2c4c6 --- /dev/null +++ b/deploy/docker/fs/opt/appsmith/thread-profile-start.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o nounset +set -o noglob + +location=/appsmith-stacks/heap_dumps/ad-hoc/$(date "+%Y_%m_%d_%H_%S")/thread-profile; +mkdir -p $location; +jcmd $(pgrep -f -- "-jar\sserver.jar") JFR.start name=profile filename=$location/profile-${HOSTNAME}.jfr \ No newline at end of file diff --git a/deploy/docker/fs/opt/appsmith/thread-profile-stop.sh b/deploy/docker/fs/opt/appsmith/thread-profile-stop.sh new file mode 100755 index 000000000000..b4d77507e155 --- /dev/null +++ b/deploy/docker/fs/opt/appsmith/thread-profile-stop.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o nounset +set -o noglob + +jcmd $(pgrep -f -- "-jar\sserver.jar") JFR.dump name=profile \ No newline at end of file