Package org.jline.builtins
Class TTop
java.lang.Object
org.jline.builtins.TTop
Thread Top implementation.
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 ClassesModifier and TypeClassDescriptionstatic enum
private static class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BindingReader
private final Map<String,
TTop.Column> private Comparator<Map<String,
Comparable<?>>> long
private final Display
private final KeyMap<TTop.Operation>
int
private final Size
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
private final Terminal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
align
(AttributedStringBuilder sb, String val, int width, TTop.Align align) private void
bindKeys
(KeyMap<TTop.Operation> map) private Comparator<Map<String,
Comparable<?>>> buildComparator
(List<String> sort) private void
This is for long running commands to be interrupted by ctrl-cprivate void
display()
getKeys()
private void
handle
(Terminal.Signal signal) private static String
humanReadableByteCount
(long bytes, boolean si) private List<Map<String,
Comparable<?>>> infos()
private static String
memory
(long cur, long max) private static String
millis
(long millis) private static String
nanos
(long nanos) padcut
(int nb) private static String
private void
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 -
columns
-
terminal
-
display
-
bindingReader
-
keys
-
size
-
comparator
-
previous
-
changes
-
widths
-
-
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
-
handle
-
infos
-
align
-
display
- Throws:
IOException
-
buildComparator
-
register
-
nanos
-
millis
-
padcut
-
padcut
-
memory
-
humanReadableByteCount
-
checkInterrupted
This is for long running commands to be interrupted by ctrl-c- Throws:
InterruptedException
-
bindKeys
-