This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------ | |
# AWK script to print unique user IDs in a folder | |
# containing a collection of CQ's access.logs | |
# ------------------------------------------------ | |
# Usage : gawk -f /opt/scripts/parse-cq-access-logs.awk /opt/aem/crx-quickstart/logs/access.log.* | |
# Author : Jayan Kandathil | |
# Last updated : April 16, 2014 | |
# Version : 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author : Jayan Kandathil | |
// Last Updated : June 18, 2014 | |
// Version : 0.1 | |
// Need following JVM init arguments for JMX access (Windows .bat example) | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote.port=10000 | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote.authenticate=false | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote.ssl=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Author : Jayan Kandathil | |
// Last Updated : June 18, 2014 | |
// Version : 0.1 | |
// Need following JVM init arguments for JMX access (Windows .bat example) | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote.port=10000 | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote.authenticate=false | |
// set CQ_JVM_OPTS=%CQ_JVM_OPTS% -Dcom.sun.management.jmxremote.ssl=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to trigger CQ/AEM heap dump using curl via JMX | |
# Author : Jayan Kandathil | |
# Version : 0.1 | |
# Last updated : January 27, 2015 | |
# Instructions : Copy to CQ/AEM Linux instance's /tmp folder, make necessary changes, enable the execute bit and run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Resource": "arn:aws:s3:::*" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script to trigger AEM 6.0 Blob GC using curl via JMX | |
# Author : Jayan Kandathil | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# This script configures the start information for this server. | |
# | |
# The following variables may be used to override the defaults. | |
# For one-time overrides the variable can be set as part of the command-line; e.g., | |
# | |
# % CQ_PORT=1234 ./start | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.PrintWriter; | |
import java.text.DecimalFormat; | |
import javax.servlet.http.HttpServletResponse; | |
final long lngStart; | |
final long lngEnd; | |
final double dblElapsedTime; | |
// Get timestamp | |
lngStart = System.currentTimeMillis(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import org.apache.http.auth.AuthScope; | |
import org.apache.http.auth.UsernamePasswordCredentials; | |
import org.apache.http.client.ResponseHandler; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.client.utils.URIBuilder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Custom JMX | |
version: 1.0 | |
enabled: true | |
jmx: | |
- object_name: "java.lang:type=Threading" | |
metrics: | |
- attributes: ThreadCount, PeakThreadCount, DeamonThreadCount, TotalStartedThreadCount | |
- object_name: "org.apache.sling:type=queues,name=AllQueues" | |
metrics: |
OlderNewer