get_stack_trace
Retrieve and analyze thread stack traces from Java processes to diagnose performance issues, identify blocking threads, and monitor JVM application behavior.
Instructions
获取线程堆栈信息
Args:
pid (str): 进程ID,使用字符串形式(如:"12345")
thread_id (str): 线程ID,使用字符串形式。支持十六进制(如:"0x2c03")
top_n (str): 显示前N个线程,使用字符串形式(如:"5"),默认值为"5"
find_blocking (bool): 是否只查找阻塞线程(BLOCKED状态或等待锁的线程)
interval (str): 采样间隔,使用字符串形式(如:"1000"表示1秒)
show_all (bool): 是否显示所有信息
Returns:
Dict: 包含线程堆栈信息的字典,包含以下字段:
- threads (List[Dict]): 线程信息列表
- thread_count (int): 线程数量
- raw_output (str): 原始输出
- timestamp (float): 时间戳
- success (bool): 是否成功
- error (Optional[str]): 错误信息
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | No | ||
| thread_id | No | ||
| top_n | No | 5 | |
| find_blocking | No | ||
| interval | No | ||
| show_all | No |