SlideShare a Scribd company logo
CRaSH the shell for the JVM
An extensible command line for
              the JVM




     Julien Viet           Alain Defrance
Senior software engineer   Software engineer
     eXo Platform            eXo Platform
    @julienviet            @alaindefrance
@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
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)
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!
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
Usage
 Runtime modes                  Get it from
 ■ Standalone                   ■ crashub download
 ■ Embedded (web app, Spring,   ■ Maven Central dependency
   …)
 ■ Attach




                                                             7
Simple stack

                    Native Client


   SSH   Telnet     Web    Console   Attach   VisualVM

                    Connectors

                      CRaSH


                  Groovy Commands
What you can do with CRaSH
  Swiss army knife
  Embed in your runtime
  Create your commands
  Monitoring tool
  Scripting
  And more…
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 access Spring beans
  Add options and arguments to the command
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>   <Map, Map>
Wrap up
Multi facet, powerful and extensible
Reach us
 crash-users@googlegroups.com
 @crashub
 http://www.crashub.org
Hackergarten hands on coding Tuesday
Q&A

More Related Content

What's hot (19)

ODP
Rex - Lightning Talk yapc.eu 2013
Jan Gehring
 
PDF
Ansible
gnosek
 
PDF
Multi-provider Vagrant and Chef: AWS, VMware, and more
Chef Software, Inc.
 
PDF
BitTorrent on iOS
CocoaHeads France
 
PDF
[MeetUp][2nd] 컭on턺
InfraEngineer
 
ODP
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
PDF
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
iXsystems
 
PDF
Vagrant presentation
Mahmudur Rahman
 
PDF
S&T What I know about Node 110817
Dan Dineen
 
PPTX
Vagrant
ProfessionalVMware
 
PDF
Introduction to Vagrant
Marcelo Pinheiro
 
PPTX
Docker 101 & Workshop
Elton Stoneman
 
ODP
From Test to Live with Rex
Jan Gehring
 
ODP
See Hudson Run, Run Hudson, Run [SELF 2010]
Vincent Batts
 
PDF
Using Nagios to monitor your WO systems
WO Community
 
PDF
Simplestack
Willian Molinari
 
PPTX
Vagrant
Benoit Borrel
 
PPTX
nginx + uwsgi emperor + bottle
Jordi Soucheiron
 
PDF
Cloud forensics putting the bits back together
Shakacon
 
Rex - Lightning Talk yapc.eu 2013
Jan Gehring
 
Ansible
gnosek
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Chef Software, Inc.
 
BitTorrent on iOS
CocoaHeads France
 
[MeetUp][2nd] 컭on턺
InfraEngineer
 
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
iXsystems
 
Vagrant presentation
Mahmudur Rahman
 
S&T What I know about Node 110817
Dan Dineen
 
Introduction to Vagrant
Marcelo Pinheiro
 
Docker 101 & Workshop
Elton Stoneman
 
From Test to Live with Rex
Jan Gehring
 
See Hudson Run, Run Hudson, Run [SELF 2010]
Vincent Batts
 
Using Nagios to monitor your WO systems
WO Community
 
Simplestack
Willian Molinari
 
Vagrant
Benoit Borrel
 
nginx + uwsgi emperor + bottle
Jordi Soucheiron
 
Cloud forensics putting the bits back together
Shakacon
 

Similar to CRaSH the shell for the JVM (20)

PDF
CRaSH the shell for the Java Virtual Machine
GR8Conf
 
PDF
CRaSH the shell for the Java Virtual Machine
eXo Platform
 
KEY
Jmxtrans presentation
Jon Stevens
 
PDF
Project Zero JavaOne 2008
Robert Nicholson
 
PPTX
Provisioning Heterogenous Bare Metal with Stacki
StackIQ
 
PPTX
CRaSH: the shell for the Java Platform
jviet
 
KEY
Eclipse Virgo
glynnormington
 
PDF
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
PDF
Iz Pack
Inria
 
PDF
Bshmanual
涛 相
 
PDF
Cli jbug
maeste
 
PDF
AS7 and CLI
JBug Italy
 
KEY
Introduction to EclipseRT (JAX 2010)
Chris Aniszczyk
 
KEY
JMX Management Tools
SEA Tecnologia
 
PPTX
Are you ready for cloud-native Java?
Graham Charters
 
POTX
Splunking the JVM (Java Virtual Machine)
Damien Dallimore
 
PDF
Apache Continuum Build, Test, and Release
elliando dias
 
PDF
Bringing Jenkins Remote Access API To The Masses
Cliffano Subagio
 
PPTX
Vert.x devoxx london 2013
Stuart (Pid) Williams
 
KEY
All out on the Cloud - PloneConf 2012
Jan Jongboom
 
CRaSH the shell for the Java Virtual Machine
GR8Conf
 
CRaSH the shell for the Java Virtual Machine
eXo Platform
 
Jmxtrans presentation
Jon Stevens
 
Project Zero JavaOne 2008
Robert Nicholson
 
Provisioning Heterogenous Bare Metal with Stacki
StackIQ
 
CRaSH: the shell for the Java Platform
jviet
 
Eclipse Virgo
glynnormington
 
Powering the Next Generation Services with Java Platform - Spark IT 2010
Arun Gupta
 
Iz Pack
Inria
 
Bshmanual
涛 相
 
Cli jbug
maeste
 
AS7 and CLI
JBug Italy
 
Introduction to EclipseRT (JAX 2010)
Chris Aniszczyk
 
JMX Management Tools
SEA Tecnologia
 
Are you ready for cloud-native Java?
Graham Charters
 
Splunking the JVM (Java Virtual Machine)
Damien Dallimore
 
Apache Continuum Build, Test, and Release
elliando dias
 
Bringing Jenkins Remote Access API To The Masses
Cliffano Subagio
 
Vert.x devoxx london 2013
Stuart (Pid) Williams
 
All out on the Cloud - PloneConf 2012
Jan Jongboom
 
Ad

More from jviet (6)

PPTX
Annotations pour les Geeks
jviet
 
PPT
Crash
jviet
 
PDF
Navigation Service
jviet
 
PPT
GateIn Frameworks
jviet
 
PPTX
Good GateIn Stuff
jviet
 
PDF
What's new and cool in Portlet 2.0
jviet
 
Annotations pour les Geeks
jviet
 
Crash
jviet
 
Navigation Service
jviet
 
GateIn Frameworks
jviet
 
Good GateIn Stuff
jviet
 
What's new and cool in Portlet 2.0
jviet
 
Ad

Recently uploaded (20)

PDF
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
PDF
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PDF
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
TrustArc Webinar - Navigating APAC Data Privacy Laws: Compliance & Challenges
TrustArc
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Hello I'm "AI" Your New _________________
Dr. Tathagat Varma
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
Understanding The True Cost of DynamoDB Webinar
ScyllaDB
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
How to Comply With Saudi Arabia’s National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 

CRaSH the shell for the JVM

  • 2. An extensible command line for the JVM Julien Viet Alain Defrance Senior software engineer Software engineer eXo Platform eXo Platform @julienviet @alaindefrance
  • 3. @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
  • 4. 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)
  • 5. 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!
  • 6. 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
  • 7. Usage Runtime modes Get it from ■ Standalone ■ crashub download ■ Embedded (web app, Spring, ■ Maven Central dependency …) ■ Attach 7
  • 8. Simple stack Native Client SSH Telnet Web Console Attach VisualVM Connectors CRaSH Groovy Commands
  • 9. What you can do with CRaSH  Swiss army knife  Embed in your runtime  Create your commands  Monitoring tool  Scripting  And more…
  • 10. Out of the box
  • 11. Out of the box  Install CRaSH  Run CRaSH standalone  CLI basics  JVM base commands  Test it online
  • 13. The Swiss Knife  Attach CRaSH to JBoss Application Server  Execute commands in the Application Server
  • 15. 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
  • 17. Monitoring  Attach to Tomcat with VisualVM  Use JMX command pipes  Create pipes  Assemble in custom dashboard
  • 18. Pipelined object stream jmx jmx get sort find <Void, ObjectName> <ObjectName, Map> <Map, Map>
  • 19. Wrap up Multi facet, powerful and extensible Reach us [email protected] @crashub http://www.crashub.org Hackergarten hands on coding Tuesday
  • 20. Q&A

Editor's Notes

  • #7: 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
  • #8: 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
  • #9: 1/ attach to JBoss AS2/ JDBC example3/ JPA example
  • #10: 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
  • #11: 1/ take an existing command and clone it2/ show some real time stuff3/ program the Twitter command
  • #12: 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
  • #13: 1/ introduce more advanced CRaSH concepts : dashboards Command pipes Aggregation &amp; Streaming
  • #14: 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