Who is swapping?

Yeah, I know that this has been already posted in other blogs many times before but to keep it more close for my own eyes I’ll re-post it here anyway. So, the following two series of dcmds could help you to figure out what processes have occupied the swap by listing their PIDs or executed commands respectively.

Note. This works in Solaris 10/Opensolaris keeping Solaris 8/9 out of the game.

echo "::walk thread thr |::print kthread_t t_schedflag|::grep .==0|::eval <thr=K|::print -d kthread_t t_procp->p_pidp->pid_id" | mdb -k

echo "::walk thread thr |::print kthread_t t_schedflag|::grep .==0 |::eval <thr=K|::print kthread_t t_procp->p_user.u_comm" | mdb -k

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.