https://github.com/heapstats/heapstats-shell
HeapStats parser for JShell
https://github.com/heapstats/heapstats-shell
java9 jshell
Last synced: 4 months ago
JSON representation
HeapStats parser for JShell
- Host: GitHub
- URL: https://github.com/heapstats/heapstats-shell
- Owner: HeapStats
- License: gpl-2.0
- Created: 2017-09-30T12:42:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-12T13:06:23.000Z (about 6 years ago)
- Last Synced: 2025-02-22T23:12:52.005Z (12 months ago)
- Topics: java9, jshell
- Language: Shell
- Size: 12.7 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HeapStats Shell
## Requirements
* JDK 11 or later
* Maven (if need)
* `heapstats-core.jar`
* https://github.com/HeapStats/heapstats/packages/44263
* `heapstats-shell` will download this JAR via Maven.
## How to use
```
$ heapstats-shell
```
or
```
$ jshell --module-path target/dependency --add-module heapstats.core --feedback heapstats heapstats.jsh
```
## Command reference
* Resource Log (CSV)
* `openResourceLog(String file)`
* Open HeapStats CSV file.
* `openResourceLogList(List files)`
* Open HeapStats CSV files.
* `resourceLogList()`
* Show all log entries.
* `javaCPU()`
* `javaCPUWithRange(LocalDateTime start, LocalDateTime end)`
* Show all Java CPU usage.
* `systemCPU()`
* `systemCPUWithRange(LocalDateTime start, LocalDateTime end)`
* Show all system CPU usage.
* `memories()`
* `memoriesWithRange(LocalDateTime start, LocalDateTime end)`
* Show all memory usage.
* `safepoints()`
* `safepointsWithRange(LocalDateTime start, LocalDateTime end)`
* Show all safepoints.
* `monitors()`
* `monitorsWithRange(LocalDateTime start, LocalDateTime end)`
* Show all monitor events.
* `threads()`
* `threadsWithRange(LocalDateTime start, LocalDateTime end)`
* Show all number of live threads.
* SnapShot
* `openSnapShot(String file)`
* Open HeapStats SnapShot.
* `openSnapShotList(List files)`
* Open HeapStats SnapShots.
* `snapshotList()`
* Show SnapShot list.
* `snapshotSummary()`
* `snapshotSummaryWithRange(LocalDateTime start, LocalDateTime end)`
* Show SnapShot summary.
* `classHisto()`
* `classHistoWithRange(LocalDateTime start, LocalDateTime end)`
* Show class histogram.
* `diffHisto(SnapShotHeader from, SnapShotHeader to)`
* Show class histogram differences between `from` and `to` .
* `classReference(SnapShotHeader header, long tag, boolean isParent)`
* Show class references.
* Thread Recorder
* `openThreadRecord(String file)`
* Open HeapStats Thread Recorder file.
* `showThreadIdMap()`
* Show thread ID and name map.
* `showSuspendEvents()`
* Show thread suspend events.
* `showLockEvents()`
* Show thread locking event.
* `showIOEvents()`
* Show IO events.
## TODO
* Currently, We cannot define jshell command. We will define current methods in `heapstats.jsh` as commands if it can.
* [JDK-8157208](https://bugs.openjdk.java.net/browse/JDK-8157208): jshell tool: pluggable commands
* [JDK-8129843](https://bugs.openjdk.java.net/browse/JDK-8129843) reports we cannot define overload method(s). After this bug is fixed, we will define `*WithRange` methods as overloaded methods.
## License
GNU General Public License, version 2