View previous topic :: View next topic |
Author |
Message |
msh n00b

Joined: 17 Jun 2002 Posts: 39 Location: Denmark
|
Posted: Mon Apr 07, 2003 11:30 am Post subject: Deamons |
|
|
How do I see which deamons that are running on my gentoo system? And how do I turn them on and off? |
|
Back to top |
|
 |
Kulfaangaren! Apprentice

Joined: 11 Jan 2003 Posts: 176 Location: Borås, Sweden
|
Posted: Mon Apr 07, 2003 2:35 pm Post subject: Re: Deamons |
|
|
msh wrote: | How do I see which deamons that are running on my gentoo system? And how do I turn them on and off? |
You can check the folders under /etc/runlevels for start scripts, if that is not enough....
Started daemon often means listening on som port...do a:
Code: | netstat -lnp |grep -E 'udp|tcp|Proto Recv-Q'|less |
The grep is just to remove lines that we are not interested in, and the p switch makes netstat print the PID and the program name of the program owning the socket at the end of every line.
Unfortunately it does not always work...dunnu why but it doesn't even show the PID of my courier-imap on my system, but it does show most other services.
As to how you turn them on and off...you can add the services to your startup process by first checking that a start script exists for the service under /etc/init.d/ and then using rc-update to add them to your boot-up process. Just type rc-update to get a brief help on how to use the command.
For example to add the Samba services to the boot-up process just do...
Code: | rc-update add samba default |
...where add is the command that should be done, samba refers to the name of the start script under /etc/init.d/ and default is the runlevel you want to add it too. The runlevel names are the same as the directories under /etc/runlevels and default is the most frequently used.
// Fredrik |
|
Back to top |
|
 |
Decibels Veteran


Joined: 16 Aug 2002 Posts: 1630 Location: U.S.A.
|
Posted: Mon Apr 07, 2003 3:56 pm Post subject: |
|
|
As root:
Running daemons are shown in folder: /mnt/.init.d/started
Start daemon: /etc/init.d/daemon_name start
Stop daemon: /etc/init.d/daemon_name stop
Status of daemon: /etc/init.d/daemon_name status |
|
Back to top |
|
 |
|