当前位置:网站首页>Pstack and dmesg
Pstack and dmesg
2022-06-11 19:10:00 【I want to master C++】
Use while you are alive pstack, Dead look dmesg, Let's see pstack What it looks like :
[[email protected] ~]$ which pstack
/usr/bin/pstack
[[email protected] ~]$ file /usr/bin/pstack
/usr/bin/pstack: symbolic link to `gstack'
[[email protected] ~]$ which gstack
/usr/bin/gstack
[[email protected] ~]$ file /usr/bin/gstack
/usr/bin/gstack: POSIX shell script, ASCII text executable
[[email protected] ~]$ more /usr/bin/gstack
#!/bin/sh
if test $# -ne 1; then
echo "Usage: `basename $0 .sh` <process-id>" 1>&2
exit 1
fi
if test ! -r /proc/$1; then
echo "Process $1 not found." 1>&2
exit 1
fi
# GDB doesn't allow "thread apply all bt" when the process isn't
# threaded; need to peek at the process to determine if that or the
# simpler "bt" should be used.
backtrace="bt"
if test -d /proc/$1/task ; then
# Newer kernel; has a task/ directory.
if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
backtrace="thread apply all bt"
fi
elif test -f /proc/$1/maps ; then
# Older kernel; go by it loading libpthread.
if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
backtrace="thread apply all bt"
fi
fi
GDB=${GDB:-/usr/bin/gdb}
# Run GDB, strip out unwanted noise.
# --readnever is no longer used since .gdb_index is now in use.
$GDB --quiet -nx $GDBARGS /proc/$1/exe $1 <<EOF 2>&1 |
set width 0
set height 0
set pagination no
$backtrace
EOF
/bin/sed -n \
-e 's/^\((gdb) \)*//' \
-e '/^#/p' \
-e '/^Thread/p'
[[email protected] ~]$ which dmesg
/usr/bin/dmesg
[[email protected] ~]$ file /usr/bin/dmesg
/usr/bin/dmesg: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=8b0c53b5d6f76a923ef6b22a266719fd3ab0eb5b, stripped
边栏推荐
- Pymysql uses cursor operation database method to encapsulate!!!
- Expandable type of system
- Realize that you can continue to play
- About my experience of "binary deployment kubernetes cluster"
- Analysis of runtime instantiation of XML view root node in SAP ui5
- Project management of workflow and business service on SAP BTP
- Internet_ Business Analysis Overview
- Gmail: how do I recall an outgoing message?
- The Economist: WTO MC12 restarts the digital economy and becomes the core engine of global economic recovery and growth
- Leetcode: sword finger offer 56 - ii Number of occurrences of numbers in the array II [simple sort]
猜你喜欢

cf:D. Black and White Stripe【连续k个中最少的个数 + 滑动窗口】
![Leetcode: sword finger offer 56 - ii Number of occurrences of numbers in the array II [simple sort]](/img/cf/7879b320720e1b6f98f1a8bd2feae2.png)
Leetcode: sword finger offer 56 - ii Number of occurrences of numbers in the array II [simple sort]

uni-app 慕客热搜项目实战(一)tabBar的制作

The US inflation rate reached a 41 year high of 8.6%! High inflation fever? The stock and encryption markets fell first!

WWDC22 开发者需要关注的重点内容
![[signal denoising] speech adaptive denoising based on nonlinear filter with matlab code](/img/fd/07cee3c51ac44ca40f730dd487aa20.png)
[signal denoising] speech adaptive denoising based on nonlinear filter with matlab code

【Multisim仿真】利用运算放大器产生方波、三角波发生器

【图像分割】基于马尔可夫随机场实现图像分割附matlab代码

Go语言入门(六)——循环语句

Visual slam lecture notes-10-1
随机推荐
Cf:d. black and white stripe
Swagger2 easy to use
The Economist: WTO MC12 restarts the digital economy and becomes the core engine of global economic recovery and growth
Use canvas to add text watermark to the page
Friendly tanks fire bullets
电子商务(njupt)
给你一个项目,你将如何开展性能测试工作?
Database design graduation information management
Project management of workflow and business service on SAP BTP
Replace the backbone of target detection (take the fast RCNN as an example)
实现可以继续上局
今天睡眠质量记录60分
Let our tanks move happily
Dynamic explosion effect
MBA, EMBA, MPa, MEM, pre interview (pre interview) time batch of national colleges and universities has been released (continuously updated) - Wendu Management Institute
Practice of tag recognition based on Huawei cloud image
Make a static tank
[Multisim Simulation] generate square wave and triangular wave generators by operational amplifier
cf:A. Print a Pedestal (Codeforces logo?)【简单遍历模拟】
On Workflow selection