Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2003, 05:59 AM   PM User | #1
Bawy
New Coder

 
Join Date: Sep 2002
Location: eNYCe
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Bawy is an unknown quantity at this point
How do I check the "processes" running on a server via SSH? What am I looking for?!

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.
Bawy is offline   Reply With Quote
Old 01-29-2003, 02:23 PM   PM User | #2
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,234
Thanks: 4
Thanked 81 Times in 80 Posts
Spookster will become famous soon enough
Well to look at the processes you could type 'ps -a' but a nicer way of looking at things is to type 'top'
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 01-29-2003, 07:19 PM   PM User | #3
Bawy
New Coder

 
Join Date: Sep 2002
Location: eNYCe
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Bawy is an unknown quantity at this point
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?
Bawy is offline   Reply With Quote
Old 01-29-2003, 11:56 PM   PM User | #4
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,234
Thanks: 4
Thanked 81 Times in 80 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 01-30-2003, 08:13 AM   PM User | #5
Bawy
New Coder

 
Join Date: Sep 2002
Location: eNYCe
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Bawy is an unknown quantity at this point
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.
Bawy is offline   Reply With Quote
Old 01-30-2003, 02:25 PM   PM User | #6
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,234
Thanks: 4
Thanked 81 Times in 80 Posts
Spookster will become famous soon enough
http://www.ssh.com/support/downloads...ommercial.html
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 01-30-2003, 08:08 PM   PM User | #7
Bawy
New Coder

 
Join Date: Sep 2002
Location: eNYCe
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Bawy is an unknown quantity at this point
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?
Bawy is offline   Reply With Quote
Old 01-30-2003, 08:13 PM   PM User | #8
Spookster
Supreme Overlord


 
Spookster's Avatar
 
Join Date: May 2002
Location: Marion, IA USA
Posts: 6,234
Thanks: 4
Thanked 81 Times in 80 Posts
Spookster will become famous soon enough
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.
__________________
Spookster
CodingForums Supreme Overlord
All Hail Spookster
Who gave you that Ugging infraction? Yeah that's right it was me!
Spookster is offline   Reply With Quote
Old 01-31-2003, 07:41 PM   PM User | #9
Bawy
New Coder

 
Join Date: Sep 2002
Location: eNYCe
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Bawy is an unknown quantity at this point
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.
Bawy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:05 AM.


Advertisement
Log in to turn off these ads.