Last active
December 17, 2015 06:48
-
-
Save andrewh/5567668 to your computer and use it in GitHub Desktop.
Useful ps commands
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
# Tested on Ubuntu 12.04 | |
# | |
# Prints full commands, with environment, with wrapping | |
ps -efww ef | |
# Prints all commands with CPU and memory usage, sorted by memory in ascending order | |
ps -eo cmd,%cpu,%mem --sort +%mem | |
# Same with descending order | |
ps -eo cmd,%cpu,%mem --sort -%mem | |
# Prints all commands with pid and thread count, sorted by thread count | |
ps -eo cmd,pid,thcount --sort thcount | |
# How long have python processes been running? | |
ps -C python -o cmd,etime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment