IBM Support

Automatic startup of dsmcad daemon on system reboot on Red Hat Linux



Automatic startup of daemon on Red Hat Linux may be done by adding an entry in /etc/inittab or via /etc/rc.d script which is executed by the init command at boot time or when changing runlevel. A sample configuration is provided in here.

Resolving The Problem

Starting with the Tivoli Storage Manager V6.3 client level, the client provides a startup script as /etc/init.d/dsmcad and creates a symbolic link. It is not necessary to write a startup script from scratch. For more details, refer to the online Knowledge Center. Information is available in the following section :

For clients at level V6.2 or below, the following information may be used to manually create a script.
The following discussion assumes that the Tivoli Storage Manager client acceptor daemon is responsible for the scheduler and for web client. If it is necessary to control them separately, another script in /etc/init.d would have to be created in the same way as described below, then managedservices option should be adjusted accordingly.

1. Log in as the root user

2. Change to the /opt/tivoli/tsm/client/ba/bin directory

3. Use dsm.sys.smp as the template to create dsm.sys file. Here is an example below which assumes the client node name is tsmlinux and server hostname is tsmserver (must be in /etc/hosts or DNS):

SErvername mytsm
COMMmethod TCPip
TCPPort 1500
TCPServeraddress tsmserver
managedservices webclient schedule
httpport 1581
webports 1582 1583
nodename tsmlinux
passwordaccess generate
errorlogname /var/log/dsmerror.log
schedlogname /var/log/dsmsched.log
errorlogretention 365,S
schedlogretention 365,S

4. Use dsm.opt.smp as template to create dsm.opt file. Here is an example below which follows previous example :


5. Optional. If the RedHat firewall is enabled, use the /etc/sysconfig/redhat-config-securitylevel tool to add the appropriate ports to it. In the above example, the ports would be 1500, 1581, 1582 and 1583. The /etc/sysconfig/redhat-config-securitylevel file would therefore have those additional ports listed, i.e,


Once this is done, configure the client to start from boot using one of the below methods either using the inittab or an init.d script. Either method is valid and choosing one method over the other depends on your system configuration and operational preference. For example, if you use the default installation and options file in default location, using the inittab is suitable. If you have options file in specific locations, it would be necessary to export the DSM_CONFIG environment variable and an init.d script would then be preferable. Also, if you prefer to use the Linux service command to control daemons, then, the init.d script is needed.

Method A Using the inittab

Add the following entry to the /etc/inittab :

cad::once:/opt/tivoli/tsm/client/ba/bin/dsmcad >/dev/null 2>&1 # TSM Webclient

Method B Using an /etc/init.d script

On a Redhat linux system, adding corresponding scripts for the Tivoli Storage Manager client acceptor daemon, dsmcad, is a standard way to perform necessary administrative tasks like starting, stopping or restarting dsmcad and/or dsm scheduler using standard linux service start/stop/restart for automatic or manual operations. The below procedure may be used to configure dsmcad in such a way.

a. Create the following script file /etc/init.d/dsmcad:

# chkconfig: - 91 35
# description: Starts and stops TSM client acceptor daemon
#Source function library.
. /etc/rc.d/init.d/functions

[ -f /opt/tivoli/tsm/client/ba/bin/dsmc ] || exit 0
[ -f /opt/tivoli/tsm/client/ba/bin/dsmcad ] || exit 0


export DSM_DIR=/opt/tivoli/tsm/client/ba/bin
export DSM_CONFIG=/opt/tivoli/tsm/client/ba/bin/dsm.opt

start() {
echo -n $"Starting $prog: "
daemon $DSM_DIR/dsmcad
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/dsmcad
return $RETVAL

stop() {
if test "x`pidof dsmcad`" != x; then
echo -n $"Stopping $prog: "
killproc dsmcad
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dsmcad
return $RETVAL

case "$1" in


status dsmcad
if test "x`pidof dsmcad`" != "x"; then

echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1


exit 0

b. Setup permissions to execute for /etc/init.d/dsmcad file (at least for root user), i.e,

chmod 744 /etc/init.d/dsmcad

c. Create the various links for the runlevels intended. This can be done manually or via the "chkconfig" linux command.

If using the /sbin/chkconfig command,
  • Add dsmcad
    # /sbin/chkconfig --add dsmcad
  • Start dsmcad in runlevels 3 and 5 only
    # /sbin/chkconfig --level 35 dsmcad on
  • Verify what runlevels are enabled for dsmcad
    # /sbin/chkconfig --list dsmcad

This will create the various symbolic links in the proper rc*.d directories based on the runlevels provided.

If done manually, create the following links in directories rc3.d, rc5.d, rc0.d, rc6.d, rc1.d:

# cd /etc/rc.d/rc3.d
# ln -s ../init.d/dsmcad S91dsmcad

# cd /etc/rc.d/rc5.d
# ln -s ../init.d/dsmcad S91dsmcad

# cd /etc/rc.d/rc0.d
# ln -s ../init.d/dsmcad K35dsmcad

# cd /etc/rc.d/rc6.d
# ln -s ../init.d/dsmcad K35dsmcad

# cd /etc/rc.d/rc1.d
# ln -s ../init.d/dsmcad K35dsmcad

The above is valid for default Redhat linux workstation setting, assuming that default init level is 5 or 3; Check default init setting in /etc/inittab, it should be like:


Adjust the above procedure if necessary

The above procedure will allow dsmcad to start automatically at system startup. It is also possible now to start and stop dsmcad using standard linux facility service:
  • To start dsmcad manually run:
    # service dsmcad start
  • To stop dsmcad run:
    # service dsmcad stop
  • To restart dsmcad (for example to refresh daemon after dsm.sys or dsm.opt modification) :
    # service dsmcad restart
  • To check if dsmcad is running run:
    # service dsmcad status
    # ps -ef | grep dsmcad

[{"Product":{"code":"SSGSG7","label":"Tivoli Storage Manager"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Client","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Supported Versions","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Document Information

Modified date:
17 June 2018