cancel
Showing results for 
Search instead for 
Did you mean: 

SMD AGENT

Former Member
0 Kudos

How to setup - restart/stop the SMD agent automatically when the server is restarted.

Thanks in advance

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

thanks

markus_doehr2
Active Contributor
0 Kudos

What OS are you using?

Markus

Former Member
0 Kudos

Unix, solaris

markus_doehr2
Active Contributor
0 Kudos

You can write a small script and put that in your legacy init sequence like

#!/bin/ksh
# /etc/init.d/startsaponboot
#
# start sap system on BOOT
#
# 29.06.2005    md      initial version
#

LOGFILE=/var/adm/startsaponboot.log
LINE="-----------------------------------------------"
DATE=`date`

echo $LINE >> $LOGFILE
echo $LINE >> $LOGFILE
echo $DATE >> $LOGFILE
echo "Starting Listener..." >> $LOGFILE
su - orapai -c "lsnrctl start"

echo $LINE >> $LOGFILE
echo "Starting SAP-System..." >> $LOGFILE
su - paiadm -c "startsap"

put that as "startsaponboot" to /etc/init.d and then link it to the runlevels:

cd /etc/rc3.d
ln -s ../init.d/startsaponboot S99startsaponboot

Then do a

touch /var/adm/startsaponboot.log

and reboot the machine to check if it works

Markus

markus_doehr2
Active Contributor
0 Kudos

Of course, this is for a SAP system - you can adapt it for smd with appropriate user and start commands.

Markus

Former Member
0 Kudos

is there any possibility that we can set it in inittab

markus_doehr2
Active Contributor
0 Kudos

If it's Solaris 9 or lower - yes, if it's Solaris 10 or you plan an upgrade to it, it will work - once. On Solaris 10 the inittab is managed by the SMF framework and will get overwritten each time the machine boots.

Why do you want to put that in inittab? Any special reason for this?

Markus

Former Member
0 Kudos

like for example CCMS agents in order to restart automatically when the system is restarted, we will update /etc/inittab

/usr/sap/..... -DCCMS pf /usr/sap....

in same way is there any way we can automate the restart process without script.

markus_doehr2
Active Contributor
0 Kudos

Are you on Solaris 10?

Markus

Former Member
0 Kudos

Yes, solaris 10

markus_doehr2
Active Contributor
0 Kudos

In that case the start of the ccms agents will also work until the next reboot - when inittab is rebuilt.

Solaris 10 has the SMF framework to do exactly that - starting and controlling services, restart them on failure etc.

A good example is here:

http://www.sun.com/bigadmin/features/articles/smf_example.jsp?feed=RSS

It's a bit of work to set that up initially but you have a very good control about the services.

Markus