Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way to easily find exactly which processes are currently "swapped out" (i.e. currently taking up my swap space).

I know that processes are dynamically swapped in and out as needed, but I'm interested in the current state they are in.

I am talking about FreeBSD here but would also be interested in a general answer for other OSs.

share|improve this question

2 Answers 2

In FreeBSD you can run top and it will say <swapped> in the "command" field of an processes that are fully swapped out. This is rare however, as it's usually just some of the memory pages for the process, not the whole process.

share|improve this answer

with pstree -clap your swapped processes are between brackets

[...]
│       ├─{mysqld},31010
│       ├─{mysqld},31011
│       ├─{mysqld},31012
[...]
share|improve this answer
    
Note: pstree is a port in the "sysutils" category. –  Chris S Oct 19 '10 at 15:49
    
According to the man page: "If the command line of a process is swapped out, that process is shown in parentheses." I read that quite literally and it does not tell me whether or not the whole process is swapped out...just the command line for the process. –  Corey S. Apr 25 '11 at 13:46

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.