当前位置:网站首页>execsnoop tool
execsnoop tool
2022-07-31 02:40:00 【north is south】
execsnoop
一 前言
execsnoop -- Short-term progress tracking tool,It is capable of grabbing commands that are executed instantaneously on the server,类似 history 但是execsnoop It is a real-time recording of the commands executed by the whole system.
When we run into performance issues,但是通过 vmstat,dstat,top Other tools cannot analyze the process that caused the problem,可以考虑使用 execsnoop .See if you can catch instantaneous command requests. The case mentioned above is 一例. 当机器 cpu 负载持续高涨却抓取不到 top 进程时,可以采用 execsnoop 抓取短时进程.
二 使用
execsnoop 的安装非常简单,其实它就是一个 可执行的 shell .
下载:
https://github.com/brendangregg/perf-tools/blob/master/execsnoop
安装 ,It is to download or copy the content of the file 写到 /usr/bin/execsnoop ,并执行 chmod +x /usr/bin/execsnoop
使用方法:
execsnoop 的参数
[[email protected] ~]# execsnoop -h
USAGE: execsnoop [-hrt] [-a argc] [-d secs] [name]
-d seconds # trace duration, and use buffers
-a argc # max args to show (default 8)
-r # include re-execs
-t # include time (seconds)
-h # this usage message
name # process name to match (REs allowed)
eg,
execsnoop # watch exec()s live (unbuffered)
execsnoop -d 1 # trace 1 sec (buffered)
execsnoop grep # trace process names containing grep
execsnoop 'udevd$' # process names ending in "udevd"
For example, we want to crawl who visited mysql
[[email protected] ~]# execsnoop mysql ## mysql 是指 进程的name
Tracing exec()s issued by process name "mysql". Ctrl-C to end.
Instrumenting sys_execve
PID PPID ARGS
22632 22631 /data/sandboxes/mysql_binary/5.7.31/bin/mysql --defaults-file=/data/msb_5_7_31/my.sandbox.cnf
22661 22660 /data/sandboxes/mysql_binary/5.7.31/bin/mysql --defaults-file=/data/msb_5_7_31/my.sandbox.cnf
22700 22699 /data/sandboxes/mysql_binary/5.7.31/bin/mysql --defaults-file=/data/msb_5_7_31/my.sandbox.cnf -e select now();
^C
Ending tracing...
The tool can only grab commands for one-time execution,If it is a long connection such as throughtcp ip 连接,然后发送SQL The requested situation cannot be fetched.
边栏推荐
猜你喜欢

图解lower_bound&upper_bound

Inter-vlan routing + static routing + NAT (PAT + static NAT) comprehensive experiment

公司官网建站笔记(六):域名进行公安备案并将备案号显示在网页底部

全流程调度——MySQL与Sqoop

Discourse 自定义头部链接(Custom Header Links)

YOLOV5学习笔记(二)——环境安装+运行+训练

Classic linked list OJ strong training problem - fast and slow double pointer efficient solution

Real-time image acquisition based on FPGA

mmdetection训练一个模型相关命令

coldfusion8 background scheduled tasks take shell
随机推荐
Draw Your Cards
execsnoop 工具
MPPT太阳能充放电控制器数据采集-通过网关采集电池电压容量电量SOC,wifi传输
AI software development process in medical imaging field
Basic introduction to ShardingJDBC
英特尔软硬优化,赋能东软加速智慧医疗时代到来
Live Preview | KDD2022 Doctoral Dissertation Award Champion and Runner-up Dialogue
MPPT solar charge controller data collection - through the gateway acquisition capacity battery SOC battery voltage, wi-fi
工程(五)——小目标检测tph-yolov5
完整复制虚拟机原理(云计算)
The difference between link and @import
Intranet Infiltration - Privilege Escalation
The effective square of the test (one question of the day 7/29)
Pythagorean tuple od js
JS 函数 this上下文 运行时点语法 圆括号 数组 IIFE 定时器 延时器 self.备份上下文 call apply
Software Testing Defect Reporting - Definition, Composition, Defect Lifecycle, Defect Tracking Post-Production Process, Defect Tracking Process, Purpose of Defect Tracking, Defect Management Tools
The real CTO is a technical person who understands products
print task sorting js od huawei
Hanyuan Hi-Tech 8-channel HDMI integrated multi-service high-definition video optical transceiver 8-channel HDMI video + 8-channel two-way audio + 8-channel 485 data + 8-channel E1 + 32-channel teleph
Manchester City confuses fans with smart scarf that detects emotions