Linux环境下通过gstack命令查看进程的运行堆栈信息
2013-01-07 23:07
876 查看
gstack命令的说明如下:
它的用法很简单,只要在gstack命令后面跟上某个进程pid就可以,例如查询一个newthread进程的运行堆栈信息:
NAME gstack - print a stack trace of a running process SYNOPSIS gstack pid DESCRIPTION gstack attaches to the active process named by the pid on the command line, and prints out an execution stack trace. If ELF sym‐bols exist in the binary (usually the case unless you have run strip(1)), then symbolic addresses are printed as well. If the process is part of a thread group, then gstack will print out a stack trace for each of the threads in the group.
它的用法很简单,只要在gstack命令后面跟上某个进程pid就可以,例如查询一个newthread进程的运行堆栈信息:
[yuanping@Linux ~]$ gstack `pgrep newthread | head -1` Thread 2 (Thread 0xb77d7b40 (LWP 4165)): #0 0x00e13424 in __kernel_vsyscall () #1 0x4ebf79c6 in nanosleep () from /lib/libc.so.6 #2 0x4ebf77df in sleep () from /lib/libc.so.6 #3 0x0804853a in thread () #4 0x4ed27cd3 in start_thread () from /lib/libpthread.so.0 #5 0x4ec324de in clone () from /lib/libc.so.6 Thread 1 (Thread 0xb77d8900 (LWP 4164)): #0 0x00e13424 in __kernel_vsyscall () #1 0x4ed28dd5 in pthread_join () from /lib/libpthread.so.0 #2 0x080485bd in main () [yuanping@Linux ~]$
相关文章推荐
- linux 查看进程的运行堆栈信息命令-gstack
- Linux 下查看某个进程运行的堆栈信息
- gstack 查看进程运行堆栈信息
- linux 查看进程启动时间、运行时间、进程名、运行命令等信息
- Linux 环境下查看硬件信息的命令
- linux查看系统进程信息命令 px,top详解
- Linux环境下查看服务器硬件配置信息以及服务占用资源命令
- Linux 查看系统信息命令 cpu、内存、进程、硬盘、网卡
- 查看进程占用内存cpu信息,Linux命令—TOP
- Linux常用命令 查看进程信息时 copy的-----温故而知新
- Linux ps 命令用于查看当前正在运行的进程
- Linux用户和组管理,查看软件缓存,通过命令查看硬件信息(cpu,版本,序列号,内存,主板,内核等)
- 常用的linux进程信息查看命令总结
- lsof很好用的命令,Linux通过端口查看进程
- Linux查看环境变量当前信息和查看命令
- linux 常用命令之查看进程信息
- linux下使用top命令查看系统运行状态和进程运行状态
- linux通过进程号查看进程信息
- linux 查看进程信息以及防火墙的设置命令