I suspect the slurm init script doesn’t use the `status` command because it is 
specific to upstart, and not necessarily available in all init systems (e.g., 
in sysvinit).

The slurmd pid file on one of our compute nodes appears to be 
non-root-readable.[1] What error were you having when trying to check the 
slurmd status before modifying the init script?

~jonathon


[1]: # stat /var/run/slurmd.pid 
  File: `/var/run/slurmd.pid'
  Size: 5               Blocks: 8          IO Block: 4096   regular file
Device: 1h/1d   Inode: 108568      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-02-10 12:34:39.959156252 -0700
Modify: 2016-02-08 11:23:10.517122210 -0700
Change: 2016-02-08 11:23:10.517122210 -0700


> On Feb 10, 2016, at 10:56 PM, jupiter <[email protected]> wrote:
> 
> Hi Jonathon,
> 
> I figured out, the problem is not the root owner ship but the way 
> /etc/init.d/slurm implements the "service slurm status", it checks the pid 
> file and caused permission issue. Why did it simply run "status slurmd" which 
> works perfectly?
> 
> I've modified the status and works fine now, thanks for your response.
> 
>     status)
>         prog="${0##*/}d"
>         status ${prog}
>         ;;
> 
> 
> 
> 
> On Thu, Feb 11, 2016 at 1:05 PM, Jonathon A Anderson 
> <[email protected]> wrote:
> slurmd must run as root because it forks and execs processes on behalf of 
> other users using the job owner’s uid.
> 
> I don’t understand what trouble you’re having monitoring slurm with nagios. 
> Could you give an example of what you’re trying to do, what you expect it to 
> do, and what it does in stead?
> 
> ~jonathon
> 
> 
> > On Feb 10, 2016, at 6:30 PM, jupiter <[email protected]> wrote:
> >
> > Hi,
> >
> > I am running slurm on CentOS 6. One thing I've just noticed is that the 
> > slurmctld is running under the user slurm but the slurmd is running under 
> > the root. Not quite sure why those daemons in different owner ships, any 
> > inside explanation please? Further looked at both slurm daemon configure in 
> > /etc/init.d and slurm.conf, they are identiccal, how could they behave 
> > differently? Anyway, can the owner ship of slurmd be changed to the user 
> > slurm?
> >
> > The problem I've got now is I am running nagios monitoring via ssh, it can 
> > check all other application daemon status, but it always failed to check 
> > slrum daemon status due to the slurmd root access restriction.
> >
> > Thanks.
> >
> >
> 
> 

Reply via email to