I've just got a vserver running debian 7 and whenever I start the server and call the top command, there are very many processes that were started automatically on startup.Can I kill them or are they critical for general functionality of the vserver?
Is killing processes created on startup safe?
linux;debian;process;startup;kill
As always it depends...Typically when I install Debian I start with a minimal installation and add to that what I need and want to run. Anything that gets started automatically then is supposed to be running.You may have installed and enabled (much) more than YOU need, but randomly killing things is the wrong way to reduce any potential overhead. Check what is installed, which services get started automatically at system boot and determine if you need those.Then stop that particular service gracefully (e.g. traditionally with /etc/init.d/servicename stop) and if nothing breaks, prevent that service from starting automatically or remove the package completely. A lot of what you see in top may be kernel-threads you simply can't kill anyway. For example on this mostly idle system:   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND25878 <me>      20   0 15036 1172  912 R    0  0.0   0:00.09 top    1 root      20   0 19356 1516 1196 S    0  0.0   0:02.01 init    2 root      20   0     0    0    0 S    0  0.0   0:00.21 kthreadd    3 root      RT   0     0    0    0 S    0  0.0   0:01.03 migration/0    4 root      20   0     0    0    0 S    0  0.0   0:00.20 ksoftirqd/0    5 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0    6 root      RT   0     0    0    0 S    0  0.0   0:01.75 watchdog/0    7 root      RT   0     0    0    0 S    0  0.0   0:00.36 migration/1    8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1    9 root      20   0     0    0    0 S    0  0.0   0:00.36 ksoftirqd/1   10 root      RT   0     0    0    0 S    0  0.0   0:01.72 watchdog/1   11 root      20   0     0    0    0 S    0  0.0   0:37.92 events/0   12 root      20   0     0    0    0 S    0  0.0   0:43.73 events/1you see only two real applications top and init and the remainder have a 0 memory footprint indication they're part of the kernel. Killing init, which is the parent of all processes on the system and is responsible for starting all other processes, is a sure way to kill your system and something to be avoided...