mirror of
https://github.com/trimstray/the-book-of-secret-knowledge.git
synced 2024-12-18 17:36:14 +00:00
added new 'strace' one-liners
- signed-off-by: trimstray <trimstray@gmail.com>
This commit is contained in:
parent
072c416632
commit
4d518af3b7
18
README.md
18
README.md
@ -890,6 +890,24 @@ ___
|
|||||||
|
|
||||||
##### Tool: [strace](https://en.wikipedia.org/wiki/Strace)
|
##### 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
|
###### Track the open request of a network port
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user