Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rendicott
Created January 3, 2017 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rendicott/6b697ee48e5cef79ce1328a234e70def to your computer and use it in GitHub Desktop.
Save rendicott/6b697ee48e5cef79ce1328a234e70def to your computer and use it in GitHub Desktop.
bash one-liner to search for ps aux pid by name and get memory usage
pid=$(ps aux | grep [s]nmpd | awk -F' ' '{print $2}') && pmap -x $pid | grep total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment