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
SYSTEMD-RUN(1)							    systemd-run 						    SYSTEMD-RUN(1)

NAME
systemd-run - Run programs in transient scope or service units SYNOPSIS
systemd-run [OPTIONS...] COMMAND [ARGS...] DESCRIPTION
systemd-run may be used to create and start a transient .service or a .scope unit and run the specified COMMAND in it. If a command is run as transient service unit, it will be started and managed by the service manager like any other service, and thus show up in the output of systemctl list-units like any other unit. It will run in a clean and detached execution environment. systemd-run will start the service asynchronously in the background and immediately return. If a command is run as transient scope unit, it will be started directly by systemd-run and thus inherit the execution environment of the caller. It is however managed by the service manager similar to normal services, and will also show up in the output of systemctl list-units. Execution in this case is synchronous, and execution will return only when the command finishes. OPTIONS
The following options are understood: -h, --help Prints a short help text and exits. --version Prints a short version string and exits. --user Talk to the service manager of the calling user, rather than the service manager of the system. --system Talk to the service manager of the system. This is the implied default. --scope Create a transient .scope unit instead of the default transient .service unit. --unit= Use this unit name instead of an automatically generated one. --description= Provide description for the unit. If not specified, the command itself will be used as a description. See Description= in systemd.unit(5). --slice= Make the new .service or .scope unit part of the specified slice, instead of the system.slice. --remain-after-exit After the service's process has terminated, keep the service around until it is explicitly stopped. This is useful to collect runtime information about the service after it finished running. Also see RemainAfterExit= in systemd.service(5). --send-sighup When terminating the scope unit, send a SIGHUP immediately after SIGTERM. This is useful to indicate to shells and shell-like processes that the connection has been severed. Also see SendSIGHUP= in systemd.kill(5). All command-line arguments after the first non-option argument become part of the commandline of the launched process. If a command is run as service unit, its first argument needs to be an absolute binary path. EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise. EXAMPLE
The following command will log the environment variables provided by systemd to services: # systemd-run env Running as unit run-19945.service. # journalctl -u run-19945.service Sep 08 07:37:21 bupkis systemd[1]: Starting /usr/bin/env... Sep 08 07:37:21 bupkis systemd[1]: Started /usr/bin/env. Sep 08 07:37:21 bupkis env[19948]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin Sep 08 07:37:21 bupkis env[19948]: LANG=en_US.UTF-8 Sep 08 07:37:21 bupkis env[19948]: BOOT_IMAGE=/vmlinuz-3.11.0-0.rc5.git6.2.fc20.x86_64 SEE ALSO
systemd(1), systemctl(1), systemd.unit(5), systemd.service(5), systemd.scope(5), systemd.slice(5). systemd 208 SYSTEMD-RUN(1)
All times are GMT -4. The time now is 09:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy