瀏覽代碼

added new 'strace' one-liners

- signed-off-by: trimstray <trimstray@gmail.com>
pull/13/head
trimstray 5 年之前
父節點
當前提交
4d518af3b7
共有 1 個文件被更改,包括 18 次插入0 次删除
  1. +18
    -0
      README.md

+ 18
- 0
README.md 查看文件

@@ -890,6 +890,24 @@ ___

##### Tool: [strace](https://en.wikipedia.org/wiki/Strace)

###### Track child process

```bash
strace -f -p $(pidof glusterfsd)
```

###### Track process after 30 seconds

```bash
timeout 30 strace $(< /var/run/zabbix/zabbix_agentd.pid)
```

###### Track child process and redirect output to a file

```bash
ps auxw | grep 'sbin/[a]pache' | awk '{print " -p " $2}' | xargs strace -o /tmp/strace-apache-proc.out
```

###### Track the open request of a network port

```bash


Loading…
取消
儲存