Created
April 1, 2020 19:08
-
-
Save dominiksalvet/1b50bbfcb98804567645e0145c3975bc to your computer and use it in GitHub Desktop.
Count system calls of a process on Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # for each system call line, print its line number instead | |
| strace -f -p "$1" 2>&1 | awk '{ print NR }' # PID should be in $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment