I'm trying to pinpoint what process(es) is eating swap on my FreeBSD server.
I can only see how much is being used (top) but not what process is swapping its guts out.
I tried searching Google for this but didn't find anything.
Is there a way to display list of swapped data by process natively or by using some external software to achieve this?
Thanks.
Best Answer
FreeBSD's
ps
command prints aW
in thestate
column to indicate that a process is swapped out. By default,ps
printsstate
as the third column, so this will give you what you want:'NR==1{print}'
will give you the column headers. Omit it if you don't need or want them.Note also that FreeBSD's
top
displays swapped out processes with their name (the final column) surrounded by angle brackets.