-
Notifications
You must be signed in to change notification settings - Fork 17
Home
Live graph of the Memory and CPU usage.
The graph uses a recursive call to refresh data every 2 seconds, its a lightweight webscript that will execute a JMX bean operation so minimal impact may be noticed on serverside and then returns a json to the caller.
Graph tracing is done using Smoothie library with some minor modifications that I added, this library does not work on IE8.
Change live and easily one class to debug and tail system log remotely with a nice UI and only 2 clicks.
There is one requirement for the "Tail" operation, this relies on a custom log4 appender called "JMXLogger" that I took from log4j and added 2 new jmx bean operations, "settailsize" and "tail", you can see them through Jconsole Mbeans tab.
In order to work this requires to add to the file [tomcat]/webapps/alfresco/WEB-INF/clasees/log4j.properties
this configuration:
log4j.rootLogger=error, Console, File, jmxlogger1
log4j.appender.jmxlogger2=jmxlogger.integration.log4j.JmxLogAppender
log4j.appender.jmxlogger2.layout=org.apache.log4j.PatternLayout
log4j.appender.jmxlogger2.layout.ConversionPattern=%-5p %c[1] - %m%n
log4j.appender.jmxlogger2.ObjectName=jmxlogger:type=LogEmitterAlfresco
log4j.appender.jmxlogger2.threshold=debug
log4j.appender.jmxlogger2.serverSelection=platform
And copy the file /lib/jmxlogger-log4j-0.1.0-AlfrescoPatched.jar
to [tomcat]/webapps/alfresco/WEB-INF/lib/
Same is needed if you want to tail Share log
To configure this you have to add to the file [tomcat]/webapps/share/WEB-INF/clasees/log4j.properties
this configuration:
log4j.rootLogger=error, Console, File, jmxlogger2
log4j.appender.jmxlogger2=jmxlogger.integration.log4j.JmxLogAppender
log4j.appender.jmxlogger2.layout=org.apache.log4j.PatternLayout
log4j.appender.jmxlogger2.layout.ConversionPattern=%-5p %c[1] - %m%n
log4j.appender.jmxlogger2.ObjectName=jmxlogger:type=LogEmitterShare
log4j.appender.jmxlogger2.threshold=debug
log4j.appender.jmxlogger2.serverSelection=platform
And copy the file [tomcat]/webapps/alfresco/WEB-INF/lib/jmxlogger-log4j-0.1.0-AlfrescoPatched.jar
to [tomcat]/webapps/share/WEB-INF/lib/
Default tail size is 25000 characters, any older messages will be trimmed out.
Thread-dump generation and comparator to troubleshoot performance problems and deadlocks
You can generate as many as you need and navigate through them to compare. Save all and study later (this may not work on IE8 due the functions used to save, copy and paste manually).
I've formated the output to lookalike the Jstack output but I actually take the thread information from the jvm and format it... some deferences on the headers and syntax are expected.
Checks your db pool usage and allows you to check active usernames.
This actually traces sys activity on db side and the current list of logged users, the graphs refresh every 2 seconds using same method as the "Performance graph" (Smoothie and a Json call).
You can click on a username to get extra details or kick one of them, note that this does not work in share because the with the cookie it may renegotiate the session.
Transformation settings and test transformations.
Transformations limits can be changed from here and also add and configure an extra transformer.
To test some dummy files are added internally but not all mimetypes, is expected to miss the uncommon ones.
Review last execution times and cron settings of your jobs, can manually trigger one.
Note that the Alfresco cron expression differs from the ISO one in one extra field (seconds).
Manually triggering one job will not count as "last execution", this only applies for normal executions.
Use carefully, i.e.: triggering a Lucene backup may cause a sys outage for a couple of minutes.
To detect which thread is consuming more CPU time. It analyzes during 1 second the cpu time consumed by every thread.
The 5 most consuming threads will be displayed with a stacktrace of the thread.
You can generate as many as you need and navigate through them to compare. Save all and study later (this may not work on IE8 due the functions used to save, copy and paste manually).
To find which beans have values overridden from the DB and revert them to the values on the properties files, use with care
This new feature allows you to see what each thread on the system is doing, every 5 seconds a threadump is taken and displayed as a new column, threads are colored depending on their status and clicking on one of them displays the stacktrace. If a thread has not changed since the previous call it will display the "<" symbol. Threadumps can be saved on json format to send them to a support ticket or loaded later using the same page to analyze them. I'm aware of some issues on the Load/save buttons on ie7.
A standalone version of this HTML for offline analisys of the jsons generated with this has been added to the project so engineers can use it to review them easily : https://github.com/Alfresco/alfresco-support-tools/blob/master/Thread%20Sampler%20Standalone.htm
Home page of the project:
https://github.com/Alfresco/alfresco-support-tools/
Downloads page https://github.com/Alfresco/alfresco-support-tools/releases
License
Copyright (c) 2013, Alfresco Software Ltd. October 2013
Author: Antonio Soler, [email protected]