Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- tenant="$(cut -d "=" -f 2 <<< $(cat /upis/app/server/config/distcfg/upis.properties | grep upis.tenant))"
- echo $tenant
- testfile2=$tenant"_$(date +"%d_%m_%Y_%H-%M-%S").hprof"
- jcmd $(pgrep -f "java -classpath") GC.heap_dump $script_path/$testfile2
- echo "heap dump file" $testfile2
- user='threaddump'
- pass='Heslo123.'
- server='https://cloud.simpleway.global'
- echo "zipping file" $testfile2
- zip $script_path/$testfile2.zip $script_path/$testfile2
- rm $script_path/$testfile2
- echo "starting upload of " $testfile2
- curl -X PUT -u $user:$pass --cookie "XDEBUG_SESSION=MROW4A;path=/;" --data-binary @"$script_path/$testfile2.zip" "$server/remote.php/webdav/threaddump/$testfile2.zip" --progress-bar -o upload.txt
- cat upload.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement