CRaSH the shell for the JVM

  • 539 views
Uploaded on

CRaSH is the shell for the Java Virtual Machine

CRaSH is the shell for the Java Virtual Machine

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
539
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
3
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    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 & 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

Transcript

  • 1. An extensible command line for the JVM Julien Viet Alain DefranceSenior software engineer Software engineer eXo Platform eXo Platform @julienviet @alaindefrance
  • 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. 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. 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. 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. Usage Runtime modes Get it from ■ Standalone ■ crashub download ■ Embedded (web app, Spring, ■ Maven Central dependency …) ■ Attach 7
  • 7. Simple stack Native Client SSH Telnet Web Console Attach VisualVM Connectors CRaSH Groovy Commands
  • 8. What you can do with CRaSH  Swiss army knife  Embed in your runtime  Create your commands  Monitoring tool  Scripting  And more…
  • 9. Out of the box
  • 10. Out of the box  Install CRaSH  Run CRaSH standalone  CLI basics  JVM base commands  Test it online
  • 11. The Swiss Knife
  • 12. The Swiss Knife  Attach CRaSH to JBoss Application Server  Execute commands in the Application Server
  • 13. Extend your runtime
  • 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. Monitoring
  • 16. Monitoring  Attach to Tomcat with VisualVM  Use JMX command pipes  Create pipes  Assemble in custom dashboard
  • 17. Pipelined object stream jmx jmx get sort find<Void, ObjectName> <ObjectName, Map> <Map, Map>
  • 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. Q&A