DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Bash Process Status For Ruby

03.13.2006
| 4442 views |
  • submit to reddit
        This is nothing ground-breaking, I'm just tired of delving into MAN every time I want to get exact information about my ruby (or any other) processes... so here's a simple ps that gets the process' (in this case ruby, but easily subsitutable by changing the grep) owner,pid,real memory size (in 1024 byte chunks), cpu, memory and full command name (in that order).

ps -er -o "user,pid,rss,%cpu,%mem,command" | grep ruby