Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #!/bin/bash
  2. script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. tenant="$(cut -d "=" -f 2 <<< $(cat /upis/app/server/config/distcfg/upis.properties | grep upis.tenant))"
  4. echo $tenant
  5. testfile2=$tenant"_$(date +"%d_%m_%Y_%H-%M-%S").hprof"
  6. jcmd $(pgrep -f "java -classpath") GC.heap_dump $script_path/$testfile2
  7. echo "heap dump file" $testfile2
  8. user='threaddump'
  9. pass='Heslo123.'
  10. server='https://cloud.simpleway.global'
  11. echo "zipping file" $testfile2
  12. zip $script_path/$testfile2.zip $script_path/$testfile2
  13. rm $script_path/$testfile2
  14. echo "starting upload of " $testfile2
  15. 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
  16. cat upload.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement