jstackparser

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JavaThread

type JavaThread struct {
	Name           string   `json:"name"`
	InternalNumber string   `json:"internalNumber"`
	IsDaemon       bool     `json:"isDaemon"`
	Status         string   `json:"status"`
	Prio           int      `json:"prio"`
	OSPrio         int      `json:"osPrio"`
	ThreadID       int64    `json:"threadId"`
	TID            string   `json:"tid"`
	NID            string   `json:"nid"`
	Stack          []string `json:"stack"`
	StackHash      string   `json:"stackHash"`
	StackDepth     int      `json:"stackDepth"`
	LocksOwned     []string `json:"locksOwned"`
	LocksWaiting   []string `json:"locksWaiting"`
}

JavaThread represents the information parsed for a single thread

func (*JavaThread) ToJSON

func (jt *JavaThread) ToJSON() string

ToJSON get the json string of JavaThread struct.

type JavaThreadDump

type JavaThreadDump struct {
	Date          string                 `json:"date"`
	VersionString string                 `json:"versionString"`
	ByStack       map[string]int         `json:"byStack"`
	ByStatus      map[string]int         `json:"byStatus"`
	LockOwners    map[string]string      `json:"lockOwners"`
	Threads       map[string]*JavaThread `json:"threads"`
	TotalThreads  int                    `json:"totalThreads"`
	Problems      []string               `json:"problems"`
}

JavaThreadDump represents all the information parsed for the complete stacktrace

func ParseJStack

func ParseJStack(jstackStr string) (*JavaThreadDump, error)

ParseJStack receives a jstack command output and parse it to extract the JavaThreadDump structure.

func (*JavaThreadDump) ToJSON

func (jtd *JavaThreadDump) ToJSON() string

ToJSON get the json string of JavaThreadDump struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL