Package org.jline.builtins
Class TTop
java.lang.Object
org.jline.builtins.TTop
A terminal-based thread monitoring tool similar to the 'top' Unix command.
This class provides a real-time view of thread activity in the JVM, displaying information such as thread states, CPU usage, blocking, and waiting statistics. Features include:
- Sortable thread list with multiple metrics
- Customizable display columns
- Interactive navigation and filtering
- System resource statistics
- Thread state visualization
The implementation provides a terminal UI for monitoring thread activity, which can be useful for diagnosing performance issues and thread contention.
TODO: option modification at runtime (such as implemented in less) is not currently supported TODO: one possible addition would be to detect deadlock threads and display them in a specific way
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionlong
int
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKeys()
void
run()
static void
ttop
(Terminal terminal, PrintStream out, PrintStream err, String[] argv)
-
Field Details
-
STAT_UPTIME
- See Also:
-
STAT_TID
- See Also:
-
STAT_NAME
- See Also:
-
STAT_STATE
- See Also:
-
STAT_BLOCKED_TIME
- See Also:
-
STAT_BLOCKED_COUNT
- See Also:
-
STAT_WAITED_TIME
- See Also:
-
STAT_WAITED_COUNT
- See Also:
-
STAT_LOCK_NAME
- See Also:
-
STAT_LOCK_OWNER_ID
- See Also:
-
STAT_LOCK_OWNER_NAME
- See Also:
-
STAT_USER_TIME
- See Also:
-
STAT_USER_TIME_PERC
- See Also:
-
STAT_CPU_TIME
- See Also:
-
STAT_CPU_TIME_PERC
- See Also:
-
sort
-
delay
public long delay -
stats
-
nthreads
public int nthreads
-
-
Constructor Details
-
TTop
-
-
Method Details
-
ttop
public static void ttop(Terminal terminal, PrintStream out, PrintStream err, String[] argv) throws Exception - Throws:
Exception
-
getKeys
-
run
- Throws:
IOException
InterruptedException
-