Showing posts with label QueryBuilder(SQL. Show all posts
Showing posts with label QueryBuilder(SQL. Show all posts

AEM_How many templates or components are currently used

Solution :

How many templates are currently used


To see the number of templates currently on the server use a repository query; via CRXDE - Tools - Query:
  • Type XPath
  • Path /
  • Query //element(*, cq:Template)

How many components are currently used


To see the number of components currently on the server use a repository query; via CRXDE - Tools - Query:
  • Type XPath
  • Path /
  • Query //element(*, cq:Component)

AEM_What is the average size of the assets

Solution :



  • To determine the total size of the /var/dam folder:
  • Use WebDAV to map the CQ repository to the local file system. 
  • Use the command line:

               cd /Volumes/localhost/var
               du -sh dam/

  • To get the average size, divide the global size by the total number of assets in /var/dam (obtained above).

AEM DAM, how many assets do you currently maintain in CQ DAM

Solution:

To see how many DAM assets you currently maintain, use a repository query; via CRXDE - Tools - Query:
  • Type XPath
  • Path /
  • Query /jcr:root/content/dam//element(*, dam:Asset)

AEM_What is the average number of Live Copies per month

Solution :

To determine the total number of Live Copies made since installation use a repository query; via CRXDE - Tools - Query:
  • Type XPath
  • Path /
  • Query //element(*, cq:LiveSyncConfig)
Again use the number of months that have elapsed since installation to calculate the average.

MSM, what is the average number of rollouts per month

Solution :

To determine the total number of rollouts since installation use a repository query; via CRXDE - Tools - Query:
  • Type XPath
  • Path /
  • Query //element(*, cq:AuditEvent)[@cq:type='PageRolledOut']
Calculate the number of months that have elapsed since installation to calculate the average.

AEM_Find the no of pages

Solution :

To see the number of pages currently on the server use a repository query; via CRXDE - Tools - Query:
Xpath Query:
  • Type XPath
  • Path /
  • Query //element(*, cq:Page)
Query Builder API query :
    type=cq:page
    path=/

AEM_What is the average number of page activations per day

Solution :



To see the total number of page activations since server installation use a repository query; via CRXDE - Tools - Query:
            Type XPath
             Path /
             Query //element(*, cq:AuditEvent)[@cq:type='Activate']


or Same results can be achieved with Quey Builder API


AEM-How many requests per hour do you have on the author or publish system at peak time

Solution :    
      For Author

To determine the total number of requests on Author since installation use the command line:

cd dir>/crx-quickstart/logs
grep -R "\->" request.log | wc -l


 To determine the start and end dates:

vim request.log
G / 1G: for the last/first lines
  • Use these values to calculate the number of hours that have elapsed
  • since installation, then the average number of requests per hour.
For Publisher :
  • How many requests per hour do you have on the publish system at peak time
                cd dir>/crx-quickstart/logs
grep -R "\->" request.log | wc -l


 To determine the start and end dates:

vim request.log
G / 1G: for the last/first lines

AEM-How to find how many authors are working with the system

Statement : find the no of authors

Solution :


Find out the no of  authors that have used the system since installation
  • cd dir>/crx-quickstart/logs
  • cut -d " " -f 3 access.log | sort -u | wc -l

Find out the number of authors working on a given date:

grep "" access.log | cut -d " " -f 3 | sort -u | wc -l

AEM6.3_How to clear or extend the reporting Cache

Statement - Clear or Extend the Report Cache

Solution :

  1. Go to System/console/configmgr
  2. Search for Day CQ reporting Cache and open for edit
Enter the below details :
  • Enable or Disable the cache
  • No of report to  be cached. Max entries=2
  • TTL for reports = 240 in seconds


Advantages in extending the cache:


  1. Reduce i/o disk
  2. No impact on the system performance for the subsequent report creation for same type
  3. Report rendering will be faster
  4. if there is need to see the same report again it will be served from cache



AEM6.3_How to clear the Facet Cache

Statement - Ways to clear the Facet Cache in Query Builder tool in AEM

Issue : change in query result is not displaying an accurate

Solution :


  1. Go to this path http://localhost:4502/system/console/configMgr/com.day.cq.search.impl.builder.QueryBuilderImpl
  2. Enter cache entries=0 as shown in the below screenshot
  3. Save the changes. That's it!.