Last active
December 4, 2017 10:41
-
-
Save mtparet/60679c5de398136cca9ceb1121bb3800 to your computer and use it in GitHub Desktop.
Useful OPS commands
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
find swap process | |
find /proc -maxdepth 2 -path "/proc/[0-9]*/status" -readable -exec awk -v FS=":" '{process[$1]=$2;sub(/^[ \t]+/,"",process[$1]);} END {if(process["VmSwap"] && process["VmSwap"] != "0 kB") printf "%10s %-30s %20s\n",process["Pid"],process["Name"],process["VmSwap"]}' '{}' \; | awk '{print $(NF-1),$0}' | sort -hr | |
find parent of process | |
pstree -aps | |
display docker pid and name | |
docker ps -q | xargs docker inspect --format '{{.State.Pid}}, {{.Name}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment