Web Hosting Talk







View Full Version : Top Command - Suggestions Please


JTM
07-21-2002, 01:01 AM
Below is the results of what came up when I ran TOP on my dedicated server. Can somebody tell me if any of these services are not necessary? I would like to stop anything that I don't really need.

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
2515 root 11 0 1928 1884 1428 S 0.3 6.5 0:00 sshd
2572 root 16 0 1048 1048 836 R 0.1 3.6 0:00 top
1 root 8 0 120 72 72 S 0.0 0.2 0:05 init
2 root 9 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 9 0 0 0 0 SW 0.0 0.0 0:00 kapm-idled
4 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 9 0 0 0 0 SW 0.0 0.0 0:00 kswapd
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 kreclaimd
7 root 9 0 0 0 0 SW 0.0 0.0 0:00 bdflush
8 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
9 root -1 -20 0 0 0 SW< 0.0 0.0 0:00 mdrecoveryd
13 root 9 0 0 0 0 SW 0.0 0.0 0:01 kjournald
88 root 9 0 0 0 0 SW 0.0 0.0 0:00 khubd
180 root 9 0 0 0 0 SW 0.0 0.0 0:00 kjournald
605 root 9 0 212 156 156 S 0.0 0.5 0:00 syslogd
610 root 9 0 652 4 4 S 0.0 0.0 0:00 klogd
684 root 9 0 176 4 4 S 0.0 0.0 0:00 safe_mysqld
764 mysql 9 0 484 28 28 S 0.0 0.0 0:00 mysqld
782 root 8 0 60 4 4 S 0.0 0.0 0:00 apmd
815 mysql 9 0 484 28 28 S 0.0 0.0 0:00 mysqld
816 mysql 9 0 484 28 28 S 0.0 0.0 0:00 mysqld
840 root 9 0 404 296 264 S 0.0 1.0 0:04 sshd
873 root 9 0 448 328 284 S 0.0 1.1 0:00 xinetd
897 root 8 0 852 76 60 S 0.0 0.2 0:00 httpd
913 nobody 9 0 2280 1864 1604 S 0.0 6.4 0:00 httpd
914 nobody 9 0 1996 1568 1544 S 0.0 5.4 0:00 httpd
915 nobody 9 0 2132 1680 1468 S 0.0 5.8 0:00 httpd
916 nobody 9 0 2296 1888 1616 S 0.0 6.5 0:00 httpd
917 nobody 9 0 2112 1704 1588 S 0.0 5.9 0:00 httpd
942 root 9 0 828 368 316 S 0.0 1.2 0:00 sendmail
961 root 9 0 212 116 104 S 0.0 0.4 0:00 cucipop
991 root 8 0 156 108 88 S 0.0 0.3 0:00 crond
1039 daemon 9 0 100 44 44 S 0.0 0.1 0:00 atd
1049 root 8 0 3780 1628 1216 S 0.0 5.6 0:01 miniserv.pl
1053 root 9 0 64 4 4 S 0.0 0.0 0:00 mingetty
1054 root 9 0 64 4 4 S 0.0 0.0 0:00 mingetty
1055 root 9 0 64 4 4 S 0.0 0.0 0:00 mingetty
1056 root 9 0 64 4 4 S 0.0 0.0 0:00 mingetty
1057 root 9 0 64 4 4 S 0.0 0.0 0:00 mingetty
1058 root 9 0 64 4 4 S 0.0 0.0 0:00 mingetty
1113 nobody 9 0 2300 1888 1728 S 0.0 6.5 0:00 httpd
1209 nobody 9 0 2052 1616 1576 S 0.0 5.6 0:00 httpd
1216 nobody 9 0 2312 1900 1604 S 0.0 6.6 0:00 httpd
1220 nobody 9 0 2112 1696 1588 S 0.0 5.8 0:00 httpd
1221 nobody 9 0 2120 1704 1592 S 0.0 5.9 0:00 httpd
2516 website 9 0 1268 1268 996 S 0.0 4.4 0:00 bash
2544 root 9 0 0 0 0 Z 0.0 0.0 0:00 cucipop <defunct>
2546 root 10 0 1016 1016 828 S 0.0 3.5 0:00 su
2547 root 10 0 1408 1408 1044 S 0.0 4.8 0:00 bash

Any advice would be greatly appreciated.


JTM

Techark
07-21-2002, 01:04 AM
Maybe stop all those httpd's :D :confused: :cartman: :rolleyes:

JTM
07-21-2002, 01:07 AM
Do you have any idea how or why so many are running?

Does just one need to be ran the whole time?

How can get keep so many of them running in the future?

I take it that crond is a cronjob? If so, how can I tell what it is? I haven't set any of them up on my server and am concerned now.


JTM

Techark
07-21-2002, 01:12 AM
Do you use this server for web hosting? I mean like charge people for it?

ranchoweb
07-21-2002, 02:30 AM
I wouldn't be too concerned about any of those services. When you start your web server it will start a number of processes. crond is the cron daemon that should always be running, unless you are never going to have any cron jobs.

Things to be concerned about are high load (it's nice for the load to be below 1 at all times) and Swap Usage.

bobcares
07-21-2002, 02:53 AM
Hi!
I do not think there is anything to worry.
These processes are regular processes.

Have a great day :)

regards
amar

JTM
07-21-2002, 10:10 AM
Do you use this server for web hosting? I mean like charge people for it?

No way :)

I'm just using it to start learning Linux and to host a few very low traffic websites I have.


JTM

Techark
07-21-2002, 10:21 AM
As the others have said all those are normal processes the httpd are Apache processes you will normally have several open depending on how many people are connected to server viewing web pages etc.

I suggest you get a good book and learn what you machine is doing.

You load looks good so there is no reason to worry about killing any processes now.

JTM
07-21-2002, 10:25 AM
Thanks for the help. As you suggested, I'm going to have to get a good book to learn about this stuff.

Should I be concerned about all those httpd processes running? Is there supposed to be just one running at all times or is there one running for every visitor who is on the server looking at a web page?

Sorry for the stupid questions :)


JTM

Techark
07-21-2002, 10:43 AM
Every visitor will spawn a new one. No concern at all.. I suggest you get Linux Unleashed it covers Apache Bind FTP etc ...

Mike the newbie
07-21-2002, 10:47 AM
Originally posted by JTM
Do you have any idea how or why so many are running?

Does just one need to be ran the whole time?

How can get keep so many of them running in the future?...
JTM



Look in the httpd.conf config file. In the top third you should see section that looks like:
#
# Server-pool size regulation. Rather than making you guess how many
# server processes you need, Apache dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
#
# It does this by periodically checking how many servers are waiting
# for a request. If there are fewer than MinSpareServers, it creates
# a new spare. If there are more than MaxSpareServers, some of the
# spares die off. The default values are probably OK for most sites.
#
MinSpareServers 2
MaxSpareServers 10

#
# Number of servers to start initially --- should be a reasonable ballpark
# figure.
#
StartServers 2

#
# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# the system with it as it spirals down...
#
MaxClients 150


The comments are pretty much self-explanatory.

Your httpd daemons look fine. The only daemon I would question is apmd - does your dedicated server need power management? I know that Linux is rather aggressive in running that daemon, whether it is needed or not. You should look into what it is used for and decide whether or not to keep it.

Also, I notice you're running webmin. Be sure to keep up with the security updates for it. At the very least, move webmin off of its default port, and have it listen on a port of your own choosing. While that won't improve the security of the webmin code, it will at least save you from most of the port scans that are looking to exploit it.