Which services are critical?

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
charliefoxtrot
Posts: 2
Joined: 2007/12/09 15:03:02

Which services are critical?

Post by charliefoxtrot » 2007/12/09 17:59:51

Hi,

I am fairly new to CentOS and haven't done very many new installs of Linux in the past few years. I just recently installed CentOS 5 on a new box that is meant to be a bare bones server to be used for some development. I went with CentOS because I want an enterprise worthy OS that was designed for servers. When I installed I deselected damn near everything from the menus because I want as little as I can get away with. The problem is that the installer still put tons of crap on by default anyway. I am in the process of trying to identify which services I can safely uninstall.

Currently I have `chkconfig --list` showing:

anacron: 2345
atd: 345
crond: 2345
exim: 2345 (only using for local smtp relay out to remote_smtp)
firstboot: 35
gpm: 2345
ip6tables: 2345
iptables: 2345
irqbalance: 2345
kudzu: 345
lvm2-monitor: 12345
mcstrans: 2345
messagebus: 345
microcode_ctl: 2345
netfs: 345
network: 2345
pcscd: 2345
restorecond: 2345
sshd: 2345
syslog: 2345
xfs: 2345
xinetd: 345
yum-updatesd: 345

And `service --status-all|grep running` returns:

atd (pid 2607) is running...
crond (pid 2553) is running...
exim (pid 25837) is running...
gpm (pid 2538) is running...
mcstransd (pid 2253) is running...
dbus-daemon (pid 2362) is running...
pcscd (pid 2409) is running...
restorecond (pid 2179) is running...
sshd (pid 32137 32135 32118 32116 26011) is running...
syslogd (pid 2214) is running...
klogd (pid 2217) is running...
xfs (pid 2578) is running...
xinetd (pid 2502) is running...
yum-updatesd (pid 2622) is running...

I have removed a bunch of stuff already. I disabled haldaemon, is it critical? What about dbus?

Does anyone see anything I can safely disable or remove?

Does anyone see anything that is missing that is critical?

Thanks

User avatar
WhatsHisName
Posts: 1549
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Which services are critical?

Post by WhatsHisName » 2007/12/09 18:37:46

You can use ?yum whatprovides ...? to identify the service packages and ?yum info ...? to see what each service does.

For example:

[code]# [b]yum whatprovides haldaemon[/b]

hal.x86_64 0.5.8.1-25.el5_1.1 installed
Matched from:
/etc/rc.d/init.d/haldaemon

# [b]yum info hal[/b]

Installed Packages
Name : hal
Arch : x86_64
Version: 0.5.8.1
Release: 25.el5_1.1
Size : 1.1 M
Repo : installed
Summary: Hardware Abstraction Layer

Description: HAL is daemon for collection and maintaining information from several sources
about the hardware on the system. It provides a live device list through D-BUS.[/code]

When the info isn't clear to you, it can often be clarified using [url=http://wikipedia.org/]Wikipedia[/url].

For example: [url=http://en.wikipedia.org/wiki/Hardware_Abstraction_Layer]Hardware abstraction layer[/url]

charliefoxtrot
Posts: 2
Joined: 2007/12/09 15:03:02

Re: Which services are critical?

Post by charliefoxtrot » 2007/12/09 19:26:31

Yeah, I did look into them. I spent an entire day on Google with a list of the services and daemons trying to figure out what was absolutely necessary. For instance the HAL, I know what it does, but don't know what is relying on it. For all I can tell I don't need it. That is why I'm coming here for some expertise. Similar issue with dbus.

Thanks

User avatar
WhatsHisName
Posts: 1549
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: Which services are critical?

Post by WhatsHisName » 2007/12/09 21:49:41

Picking services to shut down is a lot like configuring your filesystems, in that they both come down to personal preferences.

There probably is an ?absolute minimum? of services that you can get by with, but that's not usually my target.

Maybe someone else can help you with that list.

yyagol
Posts: 1015
Joined: 2006/06/10 18:27:44
Location: 32 4′N 34 47′E
Contact:

Re: Which services are critical?

Post by yyagol » 2007/12/10 06:44:11

critical service are only what you call critical . if you look at runlevel 1 you will see
about 3 services running , i would say that this are critical for the OS to operate
any other services you may run depend on what you really need from the server to do.
looking at the list of you're you can safely remove this :

firstboot
xfs (if not running X)
xinetd
yum-updatesd
mcstrans, restorecond (if not running SELinux)
kudzu
lvm2-monitor (if not using LVM)
ip6tables (if not using IPV6)
pcscd (if not using smart cards)

and to learn witch one you do need ,just google them up, and read .

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Which services are critical?

Post by scottro » 2007/12/20 03:54:34

mjmwired.net has a list of services--though it's Fedora based, it's pretty helpful. He has it for various versions of Fedora, so pick whatever's closest--Fedora 5?


There is some GUI tool for configuring services that helps a bit--it gives a brief explanation of what each service does. It's probably something like system-config-services.


Coming back to Linux, due to a job change, from FreeBSD, I'm a bit surprised that it's still so poorly documented. One shouldn't have to google and use wikipedia to figure out what each startup service does. FreeBSD's docs aren't perfect of course, but such config files are either well commented or documented in an easy to find man page.

My favorite example, when I get into this rant, is ConsoleKit and Fedora. Recent updates have tied ConsoleKit into sound, and disabling ConsoleKit will now break sound for non-root users. As ConsoleKit is a Gnome app, and they're infamous for poor docs at the user level, there's no man page. There's no info page. There's a one paragraph README in /usr/share/doc that makes it seem as if it's an unnecessary service for many people.


My complaint about the docs is not aimed at the CentOS folks. They do a heck of a good job documenting. This is an upstream problem, but personally, I think one should be able to do man for any service in /etc/init.d/ and get an explanation.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Which services are critical?

Post by AlanBartlett » 2007/12/26 21:00:40

[quote]
scottro wrote:

[b] . . . [/b], I think one should be able to do man for any service in /etc/init.d/ and get an explanation.[/quote]

I would agree with that opinion but it's just one of those little problems that result from living in an unideal world (I guess)! :-)

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Which services are critical?

Post by scottro » 2007/12/26 22:05:14

There's another problem that I thought of as I chuckled at your answer--that is the fact that so many things are actually 3rd party apps (the CentOS stuff usually has good docs.)
FreeBSD solves this by putting all of them in their equivalent of rc.local (/usr/local/etc/rc.d) and it's up to them to document or not. CentOS includes far more 3rd party stuff in the default.

Oh well, as you said, not an ideal world. :)

bigal
Posts: 80
Joined: 2009/10/16 19:51:26

Re: Which services are critical?

Post by bigal » 2012/01/04 20:31:37

Yes, I know that this an old topic but I have just found it.

I agree that it is usually perfectly possible search around and usually find a lot of useful information about all the services that are available. I am sorry, but to me that doesn't actually help much. There are a lot of instances where there is more than one way to achieve a desired result. As WhatsHisName wrote it will often come down to personal preference. Some ways might be better than others, some might be used in preference to another. Frequently the information you find does not say which OS it is relevant to. Rarely do you find out if it has superseded some other service that is no longer required. It is unusual to find out that this should, at least in the writers opinion, be used in preference to some other service (and why) and the thing I find most frustrating is that lot of the time information on the web is not dated so yuou have absolutely no idea how current it is.

I said useful. Yes, it is useful in an educational sense and perhaps that is what we should be aiming at. The caveat, the but, is if you want to do something now. Suppose you want to access another machine, try a new program or piece of hardware. It would be nice if there was somewhere you could go reasonably quickly to find out how to do it. Not to set out on a three month learning curve where you will end up so far away from the woods that there are no trees at all. I agree, that the long term goal is to learn what is going on ?under the hood?. The short term goal is to use it. And without, to paraphrase a long time advocate and devotee of Centos, breaking it and keeping the pieces.

By the way, I found this post while searching to find out if is the cups-config-daemon and cups-lpd should be running as well as cups. I have read up on both. I am none the wiser though..

Cheers

Alan

sturdyworks
Posts: 22
Joined: 2011/06/12 23:35:19
Location: Orange County, CA area
Contact:

Re: Which services are critical?

Post by sturdyworks » 2012/01/07 20:02:38

I am interested in finding these ' critial services as well

[quote]@yyagol ...if you look at runlevel 1 you will see about 3 services running , i would say that this are critical...[/quote]

This sounds interesting. Can you tell how to view services running on both runlevel 1 & 3. I include 3 because it is my understanding that 1 is single user mode (not network at all?) and 3 is typical server mode?

Post Reply