This is a discussion on Useless services in CentOS VDS/VPS within the Web servers forums, part of the Mastering Servers category; I'm trying to minimize memory and CPU usage on my VPS. here's what I really need in init.d: crond firewall ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
I'm trying to minimize memory and CPU usage on my VPS.
here's what I really need in init.d: crond firewall httpd postfix dovecot clamd clamsmtpd named network sshd syslog vsftpd webmin xinetd /etc/rc.d/rc.local And this is my pstree output: Code:
init-+-clamd
|-clamsmtpd
|-crond
|-dbus-daemon-1
|-dovecot-+-dovecot-auth
| |-imap-login
| |-imap-login
| |-imap-login
| |-imap-login
| |-pop3-login
| |-pop3-login
| |-pop3-login
| `-pop3-login
|-httpd-+-httpd
| |-httpd
| |-httpd---pstree
| |-httpd
| |-httpd
| |-httpd
| |-httpd
| `-httpd
|-master-+-anvil
| |-pickup
| |-qmgr
| |-smtpd
| |-smtpd
| `-trivial-rewrite
|-miniserv.pl
|-miniserv.pl---miniserv.pl
|-miniserv.pl---miniserv.pl
|-miniserv.pl---miniserv.pl
|-miniserv.pl---miniserv.pl
|-sshd---sshd---bash---mc---bash
|-syslogd
`-xinetd
but I'm not sure if I can safely move it out: auditd dc_client haldaemon kudzu netplugd rdisc dc_server halt lm_sensors saslauthd vzquota messagebus nscd smartd cpuspeed irqbalance microcode_ctl functions killall netfs rawdevices Is there somebody using a VPS under virtuozzo who can tell me which of all the services I can switch off/remove ? Also, what exactly happens when I do a reboot in a VPS? When I do # shutdown -r now it used to show me it was stopping and starting all services in messages log, but all I get now is just 1 entry where it says I did a shutdown. It looks like shutdown is broken somehow. Any idea? |
| Sponsored Links | ||
|
|
|
||||
|
VPS/VDS are not actual server they are are virtual thingy, so you cannot shutdown it using shutdown command. You can reboot the vps or kill vps from host server only using CP. So when you type shutdown command it will just kill all running services and restart everything again.
Most of these services needed to run different apps. You can disable following services as those are not used by VPS: auditd kudzu rdisc dc_server lm_sensors smartd cpuspeed irqbalance microcode_ctl Use ntsysv to disable above services. Mostly they may be in disabled state. If you use Plesk/Cpanel then don't play much at OS level it will break something somewhere. If it is a plain VPS then you can modify services.
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
OK, so now I have it set like this:
Code:
clamd Yes Clam AntiVirus Daemon is a TCP/IP or socket protocol server. clamsmtpd Yes clamav antivirus internal exchange with postfix crond Yes cron is a standard UNIX program that runs user-specified programs at periodic scheduled times. vixie cron adds a number of features to the basic UNIX cron, including better security and more powerful configuration options. dc_client No Distcache is a Distributed SSL Session Cache Client Proxy. dovecot Yes Dovecot Imap Server firewall Yes My iptables interface script 2007 haldaemon Yes This is a daemon for collecting and maintaing information about hardware from several sources. See http://www.freedesktop.org/Software/hal halt No httpd Yes Apache is a World Wide Web server. It is used to serve HTML files and CGI. killall No messagebus Yes This is a daemon which broadcasts notifications of system events and other messages. See http://www.freedesktop.org/software/dbus/ netfs No Mounts and unmounts all Network File System (NFS), SMB/CIFS (Lan Manager/Windows), and NCP (NetWare) mount points. network Yes Activates/Deactivates all network interfaces configured to start at boot time. nscd No This is a daemon which handles passwd and group lookups for running programs and cache the results for the next query. You should start this daemon if you use slow naming services like NIS, NIS+, LDAP, or hesiod. postfix Yes Postfix is a Mail Transport Agent, which is the program that moves mail from one machine to another. rawdevices Yes This scripts assignes raw devices to block devices (such as hard drive partitions). This is for the use of applications such as Oracle. You can set up the raw device to block device mapping by editing the file /etc/sysconfig/rawdevices. Note that the use of raw devices is deprecated, and applications should open regular block devices with O_DIRECT instead. saslauthd Yes saslauthd is a server process which handles plaintext authentication requests on behalf of the cyrus-sasl library. sshd Yes OpenSSH server daemon syslog Yes Syslog is the facility by which many daemons use to log messages to various system log files. It is a good idea to always run syslog. vsftpd No Vsftpd is a ftp daemon, which is the program that answers incoming ftp service requests. webmin Yes Start/stop Webmin xinetd Yes xinetd is a powerful replacement for inetd. xinetd has access control mechanisms, extensive logging capabilities, the ability to make services available based on time, and can place limits on the number of servers that can be started, among other things. halt killall netfs nscd dc_client vsftpd vsftpd is the only one I deliberately disabled booting for. The rest is probably useless on a VDS too.. And here's what messages log now says for a reboot (I fixed it using vzreboot with some help from my hoster, and it actually reboots with shutdown -r now, takes about 20 second :
Code:
May 23 19:56:16 new shutdown: shutting down for system reboot May 23 19:56:16 new init: Switching to runlevel: 6 May 23 19:56:16 new haldaemon: haldaemon shutdown failed May 23 19:56:16 new messagebus: messagebus -TERM succeeded May 23 19:56:16 new saslauthd[8017]: server_exit : master exited: 8017 May 23 19:56:16 new saslauthd: saslauthd shutdown succeeded May 23 19:56:16 new webmin: Stopping Webmin server in /usr/libexec/webmin May 23 19:56:16 new rc: Stopping webmin: succeeded May 23 19:56:16 new httpd: httpd shutdown succeeded May 23 19:56:16 new sshd: sshd -TERM succeeded May 23 19:56:16 new postfix: Shutting down postfix: May 23 19:56:16 new postfix: succeeded May 23 19:56:16 new postfix: May 23 19:56:17 new rc: Stopping postfix: succeeded May 23 19:56:17 new dovecot: dovecot shutdown succeeded May 23 19:56:17 new clamsmtpd: clamsmtpd shutdown succeeded May 23 19:56:17 new clamd: clamd shutdown succeeded May 23 19:56:17 new xinetd[7891]: Exiting... May 23 19:56:17 new xinetd: xinetd shutdown succeeded May 23 19:56:17 new crond: crond shutdown succeeded May 23 19:56:17 new syslog: klogd succeeded May 23 19:56:17 new exiting on signal 15 May 23 19:56:29 new syslogd 1.4.1: restart. May 23 19:56:29 new syslog: syslogd startup succeeded May 23 19:56:29 new syslog: klogd succeeded May 23 19:56:29 new rc: Starting firewall: succeeded May 23 19:56:29 new sshd: succeeded May 23 19:56:29 new xinetd[11669]: xinetd Version 2.3.13 started with libwrap loadavg options compiled in. May 23 19:56:29 new xinetd[11669]: Started working: 0 available services May 23 19:56:29 new xinetd: xinetd startup succeeded May 23 19:56:29 new clamd: Running as user clamav (UID 100, GID 101) May 23 19:56:29 new clamd: clamd startup succeeded May 23 19:56:29 new clamsmtpd: clamsmtpd startup succeeded May 23 19:56:29 new dovecot: dovecot startup succeeded May 23 19:56:30 new postfix: succeeded May 23 19:56:31 new httpd: httpd startup succeeded May 23 19:56:31 new crond: crond startup succeeded May 23 19:56:28 new rc.sysinit: -e May 23 19:56:28 new sysctl: net.ipv4.ip_forward = 0 May 23 19:56:28 new rc.sysinit: Configuring kernel parameters: succeeded May 23 19:56:28 new date: Wed May 23 19:56:28 CEST 2007 May 23 19:56:28 new rc.sysinit: Setting clock : Wed May 23 19:56:28 CEST 2007 succeeded May 23 19:56:28 new rc.sysinit: Setting hostname xxxxx.net: succeeded May 23 19:56:28 new mount: mount: none already mounted or /dev/pts busy May 23 19:56:28 new rc.sysinit: Mounting local filesystems: failed May 23 19:56:28 new mount: mount: according to mtab, devpts is already mounted on /dev/pts May 23 19:56:28 new rc.sysinit: Enabling local filesystem quotas: succeeded May 23 19:56:28 new rc.sysinit: Enabling swap space: succeeded May 23 19:56:28 new init: Entering runlevel: 3 May 23 19:56:31 new saslauthd[11799]: detach_tty : master pid is: 11799 May 23 19:56:28 new sysctl: net.ipv4.ip_forward = 0 May 23 19:56:31 new saslauthd: saslauthd startup succeeded May 23 19:56:31 new saslauthd[11799]: ipc_init : listening on socket: /var/run/saslauthd/mux May 23 19:56:28 new network: Setting network parameters: succeeded May 23 19:56:29 new network: Bringing up loopback interface: succeeded May 23 19:56:32 new messagebus: messagebus startup succeeded May 23 19:56:29 new ifup: SIOCADDRT: Network is unreachable May 23 19:56:29 new ifup: SIOCADDRT: Network is unreachable May 23 19:56:32 new haldaemon: haldaemon startup succeeded May 23 19:56:29 new ifup: SIOCADDRT: Network is unreachable May 23 19:56:29 new network: Bringing up interface venet0: succeeded May 23 19:56:32 new webmin(pam_unix)[11835]: authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=root May 23 19:56:34 new rc: Starting webmin: succeeded May 23 19:56:34 new init: no more processes left in this runlevel May 23 19:57:05 new sshd(pam_unix)[11854]: session opened for user All is working fine, so it's not really important, but I just like clean logs. I googled some on those two, but there's not much I can go on. Last edited by meowing; 05-24-2007 at 12:20 AM. |
|
|||
|
Here is my VPS info; it runs FC4 and I've no error, it runs
Code:
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dc_client 0:off 1:off 2:off 3:off 4:off 5:off 6:off
dc_server 0:off 1:off 2:off 3:off 4:off 5:off 6:off
gpm 0:off 1:off 2:on 3:off 4:on 5:on 6:off
iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off
lighttpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
lm_sensors 0:off 1:off 2:on 3:off 4:on 5:on 6:off
messagebus 0:off 1:off 2:off 3:off 4:on 5:on 6:off
monit 0:off 1:off 2:off 3:off 4:off 5:off 6:off
named 0:off 1:off 2:off 3:off 4:off 5:off 6:off
netfs 0:off 1:off 2:off 3:off 4:on 5:on 6:off
netplugd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
mysqld 0:off 1:off 2:off 3:on 4:off 5:off 6:off
httpd 0:off 1:off 2:off 3:on 4:off 5:off 6:off
nscd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
portmap 0:off 1:off 2:off 3:off 4:on 5:on 6:off
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rdisc 0:off 1:off 2:off 3:off 4:off 5:off 6:off
saslauthd 0:off 1:off 2:off 3:on 4:off 5:off 6:off
smb 0:off 1:off 2:off 3:off 4:off 5:off 6:off
snmpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
snmptrapd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
squid 0:off 1:off 2:off 3:off 4:off 5:off 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
winbind 0:off 1:off 2:off 3:off 4:off 5:off 6:off
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
yum 0:off 1:off 2:off 3:off 4:off 5:off 6:off
xinetd based services:
chargen: off
chargen-udp: off
daytime: off
daytime-udp: off
echo: off
echo-udp: off
finger: off
ntalk: off
rsync: off
swat: off
talk: off
time: off
time-udp: off
Quote:
Code:
chkconfig netfs on |
|
|||
|
You have
netfs 0:off 1:off 2:off 3:off 4:on 5:on 6:off so yours would actually have been: # chkconfig --level 45 netfs on netfs had no influence on the errors in messages log for me. Could you post your messages log, the part when it's starting up? I have these set in my CentOS 4.5 now, and all is fine with the VPS: Code:
# chkconfig --list
haldaemon 0:off 1:off 2:on 3:on 4:on 5:on 6:off
firewall 0:off 1:off 2:on 3:on 4:on 5:on 6:off
clamd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
clamsmtpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
nscd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
webmin 0:off 1:off 2:on 3:on 4:off 5:on 6:off
syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dovecot 0:off 1:off 2:on 3:on 4:on 5:on 6:off
network 0:off 1:off 2:on 3:on 4:on 5:on 6:off
rawdevices 0:off 1:off 2:on 3:on 4:on 5:on 6:off
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:off
saslauthd 0:off 1:off 2:off 3:on 4:off 5:off 6:off
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off
dc_client 0:off 1:off 2:off 3:off 4:off 5:off 6:off
httpd 0:off 1:off 2:off 3:on 4:off 5:off 6:off
vsftpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
xinetd based services:
chargen-udp: off
rsync: off
chargen: off
daytime-udp: off
daytime: off
echo-udp: off
echo: off
time-udp: off
time: off
ntalk: off
talk: off
finger: off
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| List Services Linux Running | raj | Getting started tutorials | 4 | 03-28-2008 03:55 PM |
| Services need to be stat & stopped on CentOS / RHEL Cluster | raj | Linux software | 0 | 09-01-2007 12:11 PM |
| Monitor Running Services | barrett.wendt@aquila.com | Shell scripting | 2 | 06-25-2007 09:24 PM |
| Removing useless users in CentOS | meowing | Web servers | 3 | 05-15-2007 12:43 PM |
| Enable or disable services in Debian Linux | raj | Linux software | 1 | 01-25-2007 03:00 AM |