An extensible command line for              the JVM     Julien Viet           Alain DefranceSenior software engineer   Sof...
@julienviet                        @alaindefrance 10 years of Open Source           2 years of Open Source ■ eXo Platform ...
Project  Open source LGPL: http://www.crashub.org  CRaSH 1.0 – April 2012  CRaSH 1.1 – August 2012  CRaSH 1.2 – Soon (...
What/Why?CLI are still relevant Ubiquitous Expressive: find . -name “*.java” -exec grep julien {} ; -   print Made for...
Comparison with UN*X shell Same client interface    But hosted by JVM ■ History                ■ Java threads ■ Completion...
Usage Runtime modes                  Get it from ■ Standalone                   ■ crashub download ■ Embedded (web app, Sp...
Simple stack                    Native Client   SSH   Telnet     Web    Console   Attach   VisualVM                    Con...
What you can do with CRaSH  Swiss army knife  Embed in your runtime  Create your commands  Monitoring tool  Scripting...
Out of the box
Out of the box  Install CRaSH  Run CRaSH standalone  CLI basics  JVM base commands  Test it online
The Swiss Knife
The Swiss Knife  Attach CRaSH to JBoss Application Server  Execute commands in the Application Server
Extend your runtime
Extend your runtime  Embed CRaSH in a Spring web application  Connect using remote protocol  Develop a command to acces...
Monitoring
Monitoring  Attach to Tomcat with VisualVM  Use JMX command pipes  Create pipes  Assemble in custom dashboard
Pipelined object stream     jmx                      jmx get            sort     find<Void, ObjectName> <ObjectName, Map> ...
Wrap upMulti facet, powerful and extensibleReach us crash-users@googlegroups.com @crashub http://www.crashub.orgHack...
Q&A
CRaSH the shell for the JVM
Upcoming SlideShare
Loading in …5
×

CRaSH the shell for the JVM

1,163 views

Published on

CRaSH is the shell for the Java Virtual Machine

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,163
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
8
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • In this part we will show you what you can get withCRaSH out of the box:1/ install crash2/ run crash3/ basic commands : system properties + thread ls
  • 1/ where to download crash2/ how to install standalone3/ standalone layout4/ run standalone5/ single word command : help6/ composite commands7/ system propls8/ filtered system propls with completion9/ thread ls + group + nameA/ thread top
  • 1/ attach to JBoss AS2/ JDBC example3/ JPA example
  • 1/ attach to Jboss AS72/ use log command to show we are executing in AS7 context3/ browse JNDI + filters4/ jdbc open + info + tables + table + select + insert5/ jpa entities + entity + select + where
  • 1/ take an existing command and clone it2/ show some real time stuff3/ program the Twitter command
  • 1/ deploy spring based in tomcat2/ spring ls3/ create commands and display service4/ get twitter from service5/ format output with print6/ turn script into commands with option and parameters
  • 1/ introduce more advanced CRaSH concepts : dashboards Command pipes Aggregation &amp; Streaming
  • 1/ attach to tomcat with visualvm2/ jmx find to list everthing3/ jmx find with filters to get mbean subset4/ jmx get to retrieve statistics5/ jmx sort6/ put command in dashboard7/ add thread ls filtered to retain http threads and jvm ls8/ put load on server
  • CRaSH the shell for the JVM

    1. 1. An extensible command line for the JVM Julien Viet Alain DefranceSenior software engineer Software engineer eXo Platform eXo Platform @julienviet @alaindefrance
    2. 2. @julienviet @alaindefrance 10 years of Open Source 2 years of Open Source ■ eXo Platform 2008 ■ eXo Platform 2010 ■ Red Hat 2006 Various ■ JBoss 2002 ■ Develop social product Various ■ Portal stuff (JBoss / GateIn) ■ JCP a while ago 3
    3. 3. Project  Open source LGPL: http://www.crashub.org  CRaSH 1.0 – April 2012  CRaSH 1.1 – August 2012  CRaSH 1.2 – Soon (in release candidate)
    4. 4. What/Why?CLI are still relevant Ubiquitous Expressive: find . -name “*.java” -exec grep julien {} ; - print Made for us Trends: NoSQL, MS Powershell, Drupal, Jenkins, Cloud, etc…Fun!
    5. 5. Comparison with UN*X shell Same client interface But hosted by JVM ■ History ■ Java threads ■ Completion ■ JVM access ■ Command Line Editing ■ Options & Arguments ■ Pipes 6
    6. 6. Usage Runtime modes Get it from ■ Standalone ■ crashub download ■ Embedded (web app, Spring, ■ Maven Central dependency …) ■ Attach 7
    7. 7. Simple stack Native Client SSH Telnet Web Console Attach VisualVM Connectors CRaSH Groovy Commands
    8. 8. What you can do with CRaSH  Swiss army knife  Embed in your runtime  Create your commands  Monitoring tool  Scripting  And more…
    9. 9. Out of the box
    10. 10. Out of the box  Install CRaSH  Run CRaSH standalone  CLI basics  JVM base commands  Test it online
    11. 11. The Swiss Knife
    12. 12. The Swiss Knife  Attach CRaSH to JBoss Application Server  Execute commands in the Application Server
    13. 13. Extend your runtime
    14. 14. Extend your runtime  Embed CRaSH in a Spring web application  Connect using remote protocol  Develop a command to access Spring beans  Add options and arguments to the command
    15. 15. Monitoring
    16. 16. Monitoring  Attach to Tomcat with VisualVM  Use JMX command pipes  Create pipes  Assemble in custom dashboard
    17. 17. Pipelined object stream jmx jmx get sort find<Void, ObjectName> <ObjectName, Map> <Map, Map>
    18. 18. Wrap upMulti facet, powerful and extensibleReach us crash-users@googlegroups.com @crashub http://www.crashub.orgHackergarten hands on coding Tuesday
    19. 19. Q&A

    ×