25 February 2011

Computer runs extremely slowly (java.exe problem)

A computer runs extremely slowly. I checked the processes, and found there were dozens of 'java.exe'.

I killed all of them, the computer runs fine now.

I think that when I restart the machine, the problem may happen again.

Solution: 

Install and run Windows 优化大师. Scan and fix all the problems. The computer runs fine now.

31 January 2011

How can root forcefully logout a user?

First, determine the process id (PID) of the shell they are using to login.

Code:
ps aux | grep user
Look for the entry for the login shell. If they are using bash, it will be the line where the last column is -bash. The number in the second column is the PID.
To kill the login shell, type the following:
Code:
kill PID
This should stop the user's login session. I'm not sure if this will also stop any other processes of that user, but if not, you can just use the first command again to find any other processes for the user and kill them.

OR -

Use the who command to see list of logged in users and sudo pkill -KILL -u username to log out user.