This file contains 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
# Output CPU update, proccess stats, and system ticks/second all at once | |
# Replace newlines with spaces, to be able to analyze the thing as a single line | |
# Using awk, evaluate ((utime + stime)/CLK_TCK)/(uptime - starttime/CLK_TCK) | |
cat /proc/uptime /proc/16901/stat <(getconf CLK_TCK) | tr '\n' ' ' | awk '{print (($16+$17)/$NF) / ($1 - $24/$NF)}' | |
# $16 is utime | |
# $17 is stime | |
# $1 is uptime | |
# $24 is start time | |
# These numbers are from man page for /prod/[pid]/stat, but plus 2 since /proc/uptime is at the start of the line | |
# NF refers to `getconf CLK_TCK` |
This file contains 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
List of PRs reviewed or being reviewed by $GITHUB_USERNAME | |
https://github.com/pulls?q=is:pr+reviewed-by:$GITHUB_USERNAME+archived:false+is:open | |
More search operators for issues and PR's: https://help.github.com/en/articles/using-search-to-filter-issues-and-pull-requests |