Logging for process swap in/out....

I had a virtual machine with limited RAM(4GB RAM+4GB swap partition,and 90M swap used). When I connect to it,some service might suffer tremendous lag for initial response(about 7-8sec). But once I got initial response,the following activity seems just fine. So I suspect that some process had been paged in/out. Is it possible to log which process has been swapped in or out?? Thanks anyway!!
 
Do you mean connecting over ssh? Could it be sshd trying to resolve the IP address that gives the delay and not swapping?
 
Back
Top