Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to get the proceses of the actual terminal which are blocked, running, or ready for execution. I cant figure out to use ps or top... Can someone tell where to get that info from?

share|improve this question

migrated from Sep 24 '12 at 19:59

This question came from our site for professional and enthusiast programmers.

by "terminal" you mean the window (xterm/rxvt/kterm/etc.)? Or the shell that's running in that window (or remote session)? Actual TTY's/PTY's don't use a process. – Jon Lin Sep 24 '12 at 18:40

1 Answer 1

 ps auwx|grep $terminal|grep -v "grep"|awk '{print $NF ": PID:" $2 " CPU USED:" $3 " MEM USED:" $4 }'
/usr/bin/konsole: PID:3550 CPU USED:0.0 MEM USED:0.7

 ps auwx|grep $terminal|grep -v "grep"|awk '{print $NF ": PID:" $2 " CPU USED:" $3 " MEM USED:" $4 }'
/usr/bin/terminator: PID:3616 CPU USED:0.7 MEM USED:0.7
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.