Sponsored Content
Operating Systems AIX Q: how to start a service when system start Post 302302734 by acerlinux on Tuesday 31st of March 2009 09:11:44 PM
Old 03-31-2009
Q: how to start a service when system start

As topic, assume we have a service called "blahservice"

and we can start it by:

startsrc -s blahservice

what is the best practice to run such command when system start?

- directly use mkitab to add it into /etc/inittab

or

- drop startup scripts in /etc/rc.d/rcX.d

I know they are all possible ways, but I am really keen to know which is the AIX native way and why, pros and cons will be appreciated.

Thanks in advance.

[edit] I am targeting for AIX 5.2, 5.3 and 6.1 [/edit]
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

AIX 5.3: Start Service on System startup

Hi, I'm new to AIX, and have to make some services start at system startup. The IBM-Redbook says I have to edit /etc/inittab. As a long time (Debian)-Linux Admin I'm a bit confused. Is there something like /etc/init.d/$SERVICE in AIX? Greetings, Dennis (1 Reply)
Discussion started by: dennis.kuehl
1 Replies

2. UNIX for Dummies Questions & Answers

Making a Script to Start as a Service

Hi, I have a shell script t1.sh. on my solaris box. So, what are the steps required to make this script run as a Service, when the system re-starts. (for ex:- at run level 3). I know that I should use the rc.d folders. But I don't know the exact steps. Kindly explain, Thanks in... (3 Replies)
Discussion started by: S.Vishwanath
3 Replies

3. Shell Programming and Scripting

Start a service as user

Hi I need a service to be start as user after a reboot. My script in /etc/init.d contain the following: start() { su - $USER cd ${INSTALL_PATH}/bin ./MyApp -X exit return 0 } This function stops after su - $USER, I get user shell, and only if I manualy... (5 Replies)
Discussion started by: potro
5 Replies

4. Programming

MySQL service start error

Hi, I have installed MySql version 5.0.67 in RedHat LINUX version 5. The installation completed successfully. When I am trying to start the service an error occured the error shown below ".......Manager of pid-file quit without updating file" Can anyone help me to fix the problem.... (4 Replies)
Discussion started by: saravanakumar
4 Replies

5. Solaris

StartUP file to start a service

Hi guys: i have a Solaris 10 development server and a Solaris 9 production server. The entire task must be done in the dev. server. When it's done and all the testing is OK, the script or files are transfer to prod. Server. All right. Now I have to figure out a way to put a script to initiate... (2 Replies)
Discussion started by: bmathiasf
2 Replies

6. Red Hat

vsftpd service failed to start

hi, i am using RHEL 5 and i am not able to on the vsftp i have tried to on the vsftp service using command service vsftpd start Starting vsftpd for vsftpd: i am posting the content of my /etc/xinetd.d/vsftpd file # description: The vsftpd FTP... (2 Replies)
Discussion started by: u.n.i.x
2 Replies

7. Red Hat

Can't start NTOP service/daemon

I have installed version of ntop 4.0.3 by guide. But I can't start ntop daemon/service. I didn't find a service file for starting. During the installation there was no problem only want to RRDTool so I installed that. Now there is no necessary package required. I didn't find in /etc/init.d/... (9 Replies)
Discussion started by: getrue
9 Replies

8. Ubuntu

start service when get login prompt

Hi Team, I am using DRBL environment on Ubuntu. When my machine starts some times it's not starting lxdm & nslcd service. Because of that i didn't get graphic mode & also not able to authenticate user as nslcd is also stops. I have to login as root and restart these two services, then i am able... (0 Replies)
Discussion started by: paragnehete
0 Replies

9. Solaris

How to make SMF service start last?

I need to start a service among the last on a freshly booted system. Via the manifest, I've made it dependent on very milestone on the computer yet the service still comes back with an error that a kstat variable in the kernel does not exist. I run it right the service process right there... (6 Replies)
Discussion started by: JWH
6 Replies

10. Solaris

Not able to start cron service in Solaris 10

Hi, This is Solaris-10 x86. I am not able to start cron service, configured in FMRI. It is in maintenance and when I clear it, it seems like calling and failing on /etc/init.d/tcs-rtm script. I am not able to figure out, why cron is calling that script, if this failure is because of that. Cron... (5 Replies)
Discussion started by: ron323232
5 Replies
INIT.D(7)						       The SuSE boot concept							 INIT.D(7)

NAME
INIT.D - The SuSE boot concept SYNOPSIS
/etc/init.d/* /etc/sysconfig DESCRIPTION
The scripts for controlling the system are placed in /etc/init.d/ (they have been moved according to the Linux Standard Base (LSB) specifi- cation). These scripts are executed directly or indirectly by /sbin/init, the father of all processes. The configuration of /sbin/init is given by the file /etc/inittab (see inittab(5)). At boot time, the boot level master script /etc/init.d/boot is called to initialise the system (e.g. file system check, ...). It also exe- cutes some hardware init scripts linked into /etc/init.d/boot.d/. Then it calls /etc/init.d/boot.local, which executes the local commands. After system startup, /sbin/init will normally switch on the default run level given in /etc/inittab. It calls the run level master script /etc/init.d/rc to start or stop services provided by the other scripts under /etc/init.d/. Both scripts, then boot level master script /etc/init.d/boot and the the run level master script /etc/init.d/rc starts all other boot or runlevel scripts either sequential or partial parallel within their dependencies order. To control the services of a run level, the corresponding scripts are linked into run level directories /etc/init.d/rc<X>.d/, where <X>=0,1,2,3,4,5,6,S is the run level number. There are two kinds of symbolic link: start links, which are called when entering a run level, and stop links, which are called when leav- ing a run level. Note that each service in the run levels 2, 3, 4, and 5 consists of a start and a stop link. Within SuSE boot concept a differential link scheme is used to be able to change a runlevel in comparision with the former level. If parallel executing of the boot scripts is enabled (see /etc/sysconfig/boot variable RUN_PARALLEL) then both master scripts uses the pro- gram startpar(8) which starts or stops multiple services in parallel. Startpar(8) will look for the files /etc/init.d/.depend.boot, /etc/init.d/.depend.start, and /etc/init.d/.depend.stop to get the dependencies for each service. The files will be written, beside the symbolic links in the boot and runlevel directories, by the program insserv(8). To avoid redundant starts when changing run levels, only those services are started which have no start link in the previous run level. And to avoid redundant stops when changing run levels, only those services are stopped which have no start link in the current level. To control this behaviour, the names of the scripts are added on the names of the start and stop links. To control the order of service starts and stops, the start and stop links include a number in their link name. The system configuration files in /etc/sysconfig contain most of the variables used to configure the installed services. These variables can easily be changed by YaST or by using an editor. After using an editor, the script /sbin/SuSEconfig must be called to distribute the settings into the system. Some details The script /etc/init.d/lpd starts or stops the line printer daemon for the printing service, according to the flag used: /etc/init.d/lpd start and /etc/init.d/lpd stop To do this automatically in run level 3, this script is linked into /etc/init.d/rc3.d/ with these two symbolic links /etc/init.d/rc3.d/S20lpd -> ../lpd and /etc/init.d/rc3.d/K20lpd -> ../lpd The corresponding link with the letter S is used to start a service. For the printing service the number between the letter S and the name should be greater than the number of the start link of the network service. The corresponding link with the letter K is used to stop a service. The number of the stop link for the printing service should be less than that of the stop link for the network service so that the printer daemon is stopped before shutting down the network service. Run levels and their services 0 This level is used for halting the system. The only valid service for this level is the script halt, which is linked into /etc/init.d/rc0.d/. The script halt executes /etc/init.d/halt.local. Special system issues for halt or reboot should be added there. 6 This level is used for rebooting the system. The only valid service for this level is the script reboot, which is linked into /etc/init.d/rc6.d/. The script reboot executes /etc/init.d/halt.local. Specials system issues for halt or reboot should be added there. S This mode is used to switch from boot phase into single user mode. The last valid service for this mode is the script single, which is linked into /etc/init.d/rcS.d/. In this mode you have only one console. 1 According to the Linux Standard Base (LSB) specification this runlevel is used to switch from normal runlevel into single user mode. This is different from former SuSE Linux versions! 2 The run level 2 is without remote networking. Note that on some other systems this is identical with the single user mode. This run level can have more than one virtual console. 3 The run level 3 is with network. This run level is for server stations not automatically running X. 5 The level 5 is with network and xdm(1). You should have a configured and perfectly running X Window System for this work station run level. 4 The run level 4 is not (yet) used. /etc/init.d/skeleton This script is a model for writing your own. You can use insserv(8) to include your own script into a run level. FILES
/etc/init.d/* /etc/init.d/boot /etc/init.d/boot.local /etc/init.d/halt /etc/init.d/halt.local /etc/init.d/rc /etc/init.d/reboot /etc/init.d/skeleton /etc/init.d/single /etc/init.d/boot.d/S[0-9][0-9]* /etc/init.d/rc0.d/{K,S}[0-9][0-9]* /etc/init.d/rc1.d/{K,S}[0-9][0-9]* /etc/init.d/rc2.d/{K,S}[0-9][0-9]* /etc/init.d/rc3.d/{K,S}[0-9][0-9]* /etc/init.d/rc4.d/{K,S}[0-9][0-9]* /etc/init.d/rc5.d/{K,S}[0-9][0-9]* /etc/init.d/rc6.d/{K,S}[0-9][0-9]* /etc/init.d/rcS.d/{K,S}[0-9][0-9]* /etc/init.d/.depend.boot /etc/init.d/.depend.start /etc/init.d/.depend.stop /etc/inittab /etc/sysconfig/boot /etc/sysconfig SEE ALSO
insserv(8), startpar(8), init(8), inittab(5), and the SuSE Linux handbook, chapter The SuSE boot concept. COPYRIGHT
1996-2005 SuSE Linux AG, Nuernberg, Germany. AUTHORS
Florian La Roche <http://www.suse.de/feedback>, Werner Fink <werner@suse.de>, Burchard Steinbild <http://www.suse.de/feedback>. 4.4 Berkeley Distribution Nov 15, 2000 INIT.D(7)
All times are GMT -4. The time now is 04:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy