I´m a newbie at AIX, but i need to create a deamon on AIX.
How can i do this?
Has anybody a good manual or "How-to" for this?
Thanks
Uli
If the "daemon" not detaches, it is started (and in case of dying
immediatly restarted) by the SRC.
man mkssys
man startsrc
man stopsrc
--
Uli Link
HI,
thanks for your answer.
What are the steps i have to do, when i want to "daemonize" an
exceutable sh-file (e.g. test.sh)
Thanks for your help
Uli
>>> Has anybody a good manual or "How-to" for this?
>> On AIX every executable can be "daemonized" by the SRC (System Resource
>> Controller).
>>
>> If the "daemon" not detaches, it is started (and in case of dying
>> immediatly restarted) by the SRC.
>>
>> man mkssys
>> man startsrc
>> man stopsrc
>>
>
> What are the steps i have to do, when i want to "daemonize" an
> exceutable sh-file (e.g. test.sh)
Create an entry in SRC with mkssys and then start it startsrc -s <entryname>
Syntax
mkssys {-p Path -s Subsystem -u UserID }
[ -a Arguments ] [ -e StandardError ]
[-i StandardInput ] [ -o StandardOutput ]
[ -t Synonym ] [ -O | -R ] [ -d | -D ]
[ -q | -Q]
[-K | [ -I MessageQueue -m MessageMType |
-f StopForce -n StopNormal -S ] ]
[ -E Nice ] [-G Group ] [ -w Wait ]
For example I start the sshd with
mkssys -p /usr/sbin/sshd -s sshd -u 0 \
-a " -D" -e /dev/null -i /dev/null -o /dev/null \
-R -S -f 9 -n 15 -G tcpip
So the "/usr/sbin/sshd -D" isn't detached so that the SRC can watch the
process id.
SSHD is started with "startsrc -s sshd"
look at /etc/rc.tcpip script or /etc/inittab how it is started at boot time.
--
Uli Link
Further reading: http://www.redbooks.ibm.com/abstracts/sg244946.html?Open