소스 검색

updated and fixed strace one-liners

- signed-off-by: trimstray <trimstray@gmail.com>
pull/82/head
trimstray 5 년 전
부모
커밋
74d49eb293
1개의 변경된 파일9개의 추가작업 그리고 3개의 파일을 삭제
  1. +9
    -3
      README.md

+ 9
- 3
README.md 파일 보기

@@ -1438,24 +1438,30 @@ ___

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

###### Track child process
###### Track with child processes

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

###### Track process after 30 seconds
###### Track process with 30 seconds limit

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

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

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

###### Track with print time spent in each syscall and limit length of print strings

```bash
ps auxw | grep '[i]init_policy' | awk '{print " -p " $2}' | xargs strace -f -e trace=network -T -s 10000
```

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

```bash


불러오는 중...
취소
저장