Skip to content

Instantly share code, notes, and snippets.

@wildone
Forked from jayankandathil/cq_trigger_blobgc.sh
Last active August 29, 2015 14:24
Show Gist options
  • Select an option

  • Save wildone/07b502d5a4d0f57d4bd3 to your computer and use it in GitHub Desktop.

Select an option

Save wildone/07b502d5a4d0f57d4bd3 to your computer and use it in GitHub Desktop.

Revisions

  1. Jayan Kandathil revised this gist May 14, 2015. 1 changed file with 5 additions and 2 deletions.
    7 changes: 5 additions & 2 deletions cq_trigger_blobgc.sh
    Original file line number Diff line number Diff line change
    @@ -35,8 +35,11 @@ LOG_FILE=/tmp/trigger_blobgc.log
    # Log timestamp
    date | tee -a $LOG_FILE

    # Initiate Blob GC using curl (MongoMK example using Document NodeStore, TarMK is slightly different)
    # Initiate Blob GC using curl (MongoMK example using Document NodeStore)
    curl -u $CQ_USER:$CQ_USER_PASSWORD -X POST http://$HOST:$PORT/system/console/jmx/org.apache.jackrabbit.oak%3Aid%3D7%2Cname%3D%22Document+node+store+blob+garbage+collection%22%2Ctype%3D%22BlobGarbageCollection%22/op/startBlobGC/ | tee -a $LOG_FILE


    # Initiate Blob GC using curl (TarMK example using Segment NodeStore)
    #curl -u $CQ_USER:$CQ_USER_PASSWORD -X POST http://$HOST:$PORT/system/console/jmx/org.apache.jackrabbit.oak%3Aid%3D3%2Cname%3D%22Segment+node+store+blob+garbage+collection%22%2Ctype%3D%22BlobGarbageCollection%22/op/startBlobGC/ | tee -a $LOG_FILE

    echo "Triggered Blob GC, check error.log"
    echo $'\n'
  2. Jayan Kandathil revised this gist May 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cq_trigger_blobgc.sh
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ LOG_FILE=/tmp/trigger_blobgc.log
    # Log timestamp
    date | tee -a $LOG_FILE

    # Initiate Blob GC using curl (MongoMK example)
    # Initiate Blob GC using curl (MongoMK example using Document NodeStore, TarMK is slightly different)
    curl -u $CQ_USER:$CQ_USER_PASSWORD -X POST http://$HOST:$PORT/system/console/jmx/org.apache.jackrabbit.oak%3Aid%3D7%2Cname%3D%22Document+node+store+blob+garbage+collection%22%2Ctype%3D%22BlobGarbageCollection%22/op/startBlobGC/ | tee -a $LOG_FILE

    echo "Triggered Blob GC, check error.log"
  3. Jayan Kandathil revised this gist May 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cq_trigger_blobgc.sh
    Original file line number Diff line number Diff line change
    @@ -35,7 +35,7 @@ LOG_FILE=/tmp/trigger_blobgc.log
    # Log timestamp
    date | tee -a $LOG_FILE

    # Initiate Blob GC using curl
    # Initiate Blob GC using curl (MongoMK example)
    curl -u $CQ_USER:$CQ_USER_PASSWORD -X POST http://$HOST:$PORT/system/console/jmx/org.apache.jackrabbit.oak%3Aid%3D7%2Cname%3D%22Document+node+store+blob+garbage+collection%22%2Ctype%3D%22BlobGarbageCollection%22/op/startBlobGC/ | tee -a $LOG_FILE

    echo "Triggered Blob GC, check error.log"
  4. Jayan Kandathil revised this gist May 14, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cq_trigger_blobgc.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    # Bash script to trigger AEM 6.0 Blob GC using curl via JMX

    # Author : Jayan Kandathil (Adobe Managed Services)
    # Author : Jayan Kandathil
    # Version : 0.1
    # Last updated : May 14, 2015

  5. Jayan Kandathil created this gist May 14, 2015.
    42 changes: 42 additions & 0 deletions cq_trigger_blobgc.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,42 @@
    #!/bin/bash

    # Bash script to trigger AEM 6.0 Blob GC using curl via JMX

    # Author : Jayan Kandathil (Adobe Managed Services)
    # Version : 0.1
    # Last updated : May 14, 2015

    # Instructions : Copy to CQ/AEM Linux instance's /tmp folder, make necessary changes, enable the execute bit and run

    # Echo on (for debugging purposes)
    # set -x verbose

    # Host that CQ runs on
    HOST=localhost

    # TCP port CQ listens on
    PORT=4502

    # CQ Admin user ID
    CQ_USER=admin

    # CQ Admin user password
    CQ_USER_PASSWORD=admin

    DATE_TIME=$(date "+%Y.%m.%d-%H.%M.%S")

    # rsync log file
    LOG_FILE=/tmp/trigger_blobgc.log

    # ------------------------------------------------
    # Do not configure below this point
    # ------------------------------------------------

    # Log timestamp
    date | tee -a $LOG_FILE

    # Initiate Blob GC using curl
    curl -u $CQ_USER:$CQ_USER_PASSWORD -X POST http://$HOST:$PORT/system/console/jmx/org.apache.jackrabbit.oak%3Aid%3D7%2Cname%3D%22Document+node+store+blob+garbage+collection%22%2Ctype%3D%22BlobGarbageCollection%22/op/startBlobGC/ | tee -a $LOG_FILE

    echo "Triggered Blob GC, check error.log"
    echo $'\n'