Skip to content

Instantly share code, notes, and snippets.

@deevis
Last active March 12, 2021 00:50
Show Gist options
  • Save deevis/05cf1e381f141e2f0d0d3dd902c2d1e8 to your computer and use it in GitHub Desktop.
Save deevis/05cf1e381f141e2f0d0d3dd902c2d1e8 to your computer and use it in GitHub Desktop.
List processes with time running and total memory used
IFS=$'\n'
for line in `ps -o pid,etime,%mem,command ax | grep launch | grep -v "grep"`; do echo "---------------------------------"; echo $line; echo $line | awk '{print $1}' | xargs pmap | grep "total"; done; echo ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment