...

View Full Version : How do I check the "processes" running on a server via SSH? What am I looking for?!



Bawy
01-29-2003, 06:59 AM
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.

Spookster
01-29-2003, 03: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'

Bawy
01-29-2003, 08:19 PM
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?

Spookster
01-30-2003, 12:56 AM
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

kill 12377

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

man kill

at the prompt. Linux has an extensive manual so type

man commandyouwanttoknowmoreabout

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.

Bawy
01-30-2003, 09:13 AM
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.

Spookster
01-30-2003, 03:25 PM
http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html

Bawy
01-30-2003, 09:08 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

cd directorynamehere

and it says no such file or directory?! I also tried:

cd directorynamehere/
cd /rootdirectorynamehere
cd /directorynamehere/
cd ../directorynamehere
cd ..
cd .

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?

Spookster
01-30-2003, 09: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:
http://www.justlinux.com/nhf/Command_Reference

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.

Bawy
01-31-2003, 08:41 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum