Giter Club home page Giter Club logo

housemd's Introduction

中文使用指南

HouseMD is a interactive command-line tool for dianosing Java process in runtime. It's inspiration came from BTrace, but more easier to use.

Features

  • Display loaded classes information
    • name
    • source file(.class or .jar)
    • classloaders
  • Display invocation trace summary
    • method full name and sign
    • class loader of method declaring class
    • total invoked times
    • avg elapse millis
  • Output invocation detail
    • timestamp
    • elapse millis
    • call thread
    • class name
    • method name
    • arguments
    • result or exception
  • Output invocation stack trace
  • Awesome features you can provide by forking me

Getting started

Pre-requirement

  • JDK 6 +

One-command install (On Linux or MacOSX)

> curl -Lk https://raw.github.com/zhongl/HouseMD/master/bin/install | bash
  • Please try normal install on Window.

Normal install

  • Click here download executable jar

  • Run it as:

    java -Xbootclasspath/a:$JAVA_HOME/lib/tools.jar -jar housemd-assembly-x.x.x.jar

Caution: In Mac OSX, the -Xbootclasspath is no needed.

How to use

First all, type:

> housemd -h

A help infomation shows up like:

Usage: housemd [OPTIONS] pid
	a runtime diagnosis tool of JVM.
Options:
	-h, --help
		show help infomation of this command.
	-p, --port=[INT]
		set console local socket server port number.
		default: 54321
Parameters:
	pid
		id of process to be diagnosing.

Suppost your target pid is 1234 (you can use jps or ps get it), and then input:

> housemd 1234

After seen prompt housemd>, input help then you get help infomation like this:

housemd> help

quit      terminate the process.
help      display this infomation.
trace     display or output infomation of method invocaton.
loaded    display loaded classes information.

You can also input help loaded and get help infomation of loaded as blow:

housemd> help loaded
Usage: loaded [OPTIONS] name
    display loaded classes information.
Options:
    -h, --classloader-hierarchies
        display classloader hierarchies of loaded class.
Parameters:
    name
        class name without package name.

Trace schemas

Summary statistics

| method full name         | class loader                              | invoked   |  avg elapse|
TraceTarget.addOne(int)    sun.misc.Launcher$AppClassLoader@1cde100            2           34ms

Detail line

| date     | time   | elapse | thread name | method full name  | arguemnt(s) |result or exception
2012-06-07 14:30:57  67ms      [main]       TraceTarget.addOne  [0]           1
  • The delimiter is one white space,
  • method full name contains: package, class name and method name

Having fun!

housemd's People

Contributors

zhongl avatar

Stargazers

DongQiYu avatar

Watchers

James Cloos avatar DongQiYu avatar

Forkers

xiangyong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.