listing of daemons running on a unix server

Lance S. Nehring lnehrin at
Wed Dec 9 22:21:10 GMT 1998

Luke Kenneth Casson Leighton wrote:

> On Wed, 9 Dec 1998, Greg Dickie wrote:
> > Maybe I'm missing something but most of these scripts simply start the programs
> > or do a killall to stop them. Could you not simply get a process list from
> > /proc and "do the right thing" ?>

It's problematic at best to ask the UNIX system for daemon status via the process
list (or /proc - which not all UNIX's support.....).    First, you have to know the
exact spelling of the daemon executable - there's no guarantee that each UNIX vendor
will call everything the same.  Second, I don't think there's a standard way of
extracting process info from a UNIX OS  (maybe there's a POSIX or UNIX98 spec - does
anyone know?) .  I've used the HPUX pstat API which is nothing like Solaris........

Anyway,  to start a daemon you will need to either use the RC script for that
service or, (gack!)  duplicate everything the RC script does (which is normally
setting daemon command line args and setting up an appropriate execution

I agree with some of the other responses to this question --- don't let samba manage
the UNIX OS daemons.   At the very least it introduces yet another security risk.
MS clients should not be allowed to compromise the integrity on a mission critical
UNIX system.........

> > 'course that UNIX wpuld need procfs and you wouldn't have all the options to
> > start... nevermind...
> need to restart, too.  what about killall smbd (which i do all the time)?
> what happens then!

More information about the samba-technical mailing list