How do I check the "processes" running on a server via SSH? I have been given the task of discovering the culprit causing a server to crawl to a snail's pace.
How do I connect via SSH (what they said is available)? How do I view the processes? What am I looking for? How do I stop them?
If needed, how could I reboot the server?
I think it is a Linux server.
01-29-2003, 02:23 PM
Well to look at the processes you could type 'ps -a' but a nicer way of looking at things is to type 'top'
Could you dummy it down a bit please? Where do I get an SSH client? I guess I just login with the client and type "top" or "ps -a" and that will show me the processes running? Is that like looking at the services/tasks running in Windows? How do I kill one off? Does it warn me if killing the process will down the system as Windows does?
01-29-2003, 11:56 PM
You can get THE ssh client from http://www.ssh.com/ SSH is just a program very similar to the telnet program that cones with windows except this one is more secure and easier to use and comes with many additional features like drag and drop file transfer
Assuming you have a login for the macine you want to login to then connect to the server and login. Once logged in type in ps -A (note that should be capital A) to see all processes running. Typing in top will show you more the kind of information you will need to see to determine what process is bringing down the server.
As far as killing processes you won't be able to kill any processes other than your own unless the administrator has given you permissions otherwise.
To kill a process you type kill and the process id such as
If you dont specify a specific signal to send to the process it send the default signal of TERM (ternminate).
You can read more about it by typing in
at the prompt. Linux has an extensive manual so type
and it will display all you need to know.
I wouldn't recommend killing processes if you don't know what you are doing. If you have adminstrator privileges you could end up damaging or taking the server down yourself.
Thanks, very helpful! ssh.com seems to have servers, but no client-only program. I really don't want to start sticking servers I don't need on my machine just to use the client login, any ideas? Can you install the thing to only function as client? I could not find the info on the ssh.com site.
01-30-2003, 02:25 PM
Thanks. I tried it, pretty easy. Figuring out to press "q" took a bit of frustraion when I wanted the prompt back, lol. Any idea why I can't change directories?
I type ls and get the names of directories then I attempt
and it says no such file or directory?! I also tried:
No matter what I stay in the same directory?
cd .. and cd . don't give any error, but directory path stays the same. I am in some subdirectory when I login (not at root.) It is not a shared server though?!
Also, if a web-access logging program is eating up 50+% of Virtual Ram (using 250+mb, machine only has 128mb physical and 512virtual) that would likely be the cause of bottleneck ehh?
01-30-2003, 08:13 PM
Oh yeah I guess I should have mentioned how to quit the top program. lol :)
Here is a quick reference of linux commands:
Well are you sure those are not files instead of directories? also they must be typed in exactly. Linux commands/filenames/directorynames are also case senstive.
That linked page is great! I printed it for reference... It also answered my original question about rebooting, duh, type "reboot"!
I am typing them case-sensitive and I know they are directories, I have FTP access to the same filesystem.