EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: iocStats reboot question
From: "Shen, Guobao" <[email protected]>
To: <[email protected]>
Date: Fri, 17 Apr 2015 10:32:05 -0400
Hi Geyang,
The reboot function used in iocStats has been redefined as for example "#define reboot(x) epicsExit(0)" on any posix system.
You can find full definition in file for example devIocStats/os/posix/devIocStatsOSD.h
Therefore, the reboot is a alias name of epicsExit() instead of not a linux OS reboot, and does accept parameter.

I hope this is your question.

Guobao

On 4/17/15 9:20 AM, Silver wrote:
hi, Ralph:

Thanks a lot for your reply. 
maybe you misunderstand my question for my poor english. I think reboot function should restart the whole machine, but why the reboot function here just kill the IOC process?
In the man help about reboot function, I didn't see any parameters for just rebooting the process?
 
  
 
 
 
 

Best wishes
Geyang 2015-04-17
 
 
 
Date: 2015-04-17 16:44
Subject: Re: iocStats reboot question
Hi Geyang,

Under Linux (and the other host-type OSs), an IOC is a single multi-threaded process.
So, naturally, "rebooting" an IOC means restarting the IOC process, which is usually done by shutting down or killing the current process and letting the wrapper (e.g. procServ) handle the restart.

Very often, many Linux IOCs are run on a single host: 20-30 are quite common, I have seen up >300 IOCs on a server-class Solaris machine.
I am sure you understand that allowing to reboot the server from any of these IOCs would be a bad idea.

Also, rebooting a server usually needs root access. IOCs should not be run as root.

Cheers,
~Ralph


On 17/04/2015 09:36, Silver wrote:
hi, 

in IOC Status and Control (devIocStats), it has an reboot function in subroutine record, that is ,in devIocStatsSub.c file, it calls reboot function of linux.
I am wandering why this call just kill the ioc process instead of rebooting the machine? as in manual of reboot function (http://man7.org/linux/man-pages/man2/reboot.2.html)
Thanks a lot for your help.

  
 
 
 
 

Best wishes
Geyang 2015-04-17
 
 



Replies:
Re: iocStats reboot question Pete Jemian
References:
iocStats reboot question Silver
Re: iocStats reboot question Ralph Lange

Navigate by Date:
Prev: Re: Re: iocStats reboot question Silver
Next: Re: iocStats reboot question Pete Jemian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Re: iocStats reboot question Silver
Next: Re: iocStats reboot question Pete Jemian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·