Not sure if you can use this, but I had an escalation where a legacy script was taking too long during boot, we suspected the script was in rc2.d, so to timestamp each script , I had the customer change the existing $action case statement within /etc/rc2 as described below::
First make a backup of the file /etc/rc2, then change the start section of the $action case statement from this: start) for f in /etc/rc2.d/S*; do if [ -s $f ]; then case $f in *.sh) /lib/svc/bin/lsvcrun -s $f \ start ;; *) /lib/svc/bin/lsvcrun $f start ;; esac fi done ;; *) echo "Invalid argument" exit 1 esac exit 0 ------------- TO THIS: ------------- start) for f in /etc/rc2.d/S*; do if [ -s $f ]; then case $f in *.sh) echo $f >> /outfile ; /bin/date >> /outfile 2>&1 ; /lib/svc/bin/lsvcrun -s $f st art ;; *) echo $f >> /outfile ; /bin/date >> /outfile 2>&1 ; /lib/svc/bin/lsvcrun $f start ;; esac fi done ;; *) echo "Invalid argument" exit 1 esac exit 0 After reboot the resultant /outfile file will resemble something like this: /etc/rc2.d/S10lu Wed Nov 1 18:44:41 EST 2006 /etc/rc2.d/S20sysetup Wed Nov 1 18:44:45 EST 2006 /etc/rc2.d/S40llc2 Wed Nov 1 18:44:46 EST 2006 /etc/rc2.d/S42ncakmod Wed Nov 1 18:44:46 EST 2006 /etc/rc2.d/S47pppd Wed Nov 1 18:44:46 EST 2006 /etc/rc2.d/S70sckm Wed Nov 1 18:44:47 EST 2006 /etc/rc2.d/S70uucp Wed Nov 1 18:44:47 EST 2006 /etc/rc2.d/S72autoinstall Wed Nov 1 18:44:47 EST 2006 /etc/rc2.d/S72directory Wed Nov 1 18:44:47 EST 2006 /etc/rc2.d/S73cachefs.daemon Wed Nov 1 18:44:47 EST 2006 /etc/rc2.d/S81dodatadm.udaplt Wed Nov 1 18:44:47 EST 2006 /etc/rc2.d/S89PRESERVE Wed Nov 1 18:44:48 EST 2006 /etc/rc2.d/S89bdconfig Wed Nov 1 18:44:48 EST 2006 /etc/rc2.d/S90wbem Wed Nov 1 18:44:48 EST 2006 /etc/rc2.d/S90webconsole Wed Nov 1 18:44:49 EST 2006 /etc/rc2.d/S91afbinit Wed Nov 1 18:44:58 EST 2006 /etc/rc2.d/S91gfbinit Wed Nov 1 18:44:59 EST 2006 /etc/rc2.d/S91ifbinit Wed Nov 1 18:44:59 EST 2006 /etc/rc2.d/S91jfbinit Wed Nov 1 18:45:00 EST 2006 /etc/rc2.d/S91zuluinit Wed Nov 1 18:45:00 EST 2006 /etc/rc2.d/S94ncalogd Wed Nov 1 18:45:00 EST 2006 /etc/rc2.d/S95IIim Wed Nov 1 18:45:00 EST 2006 /etc/rc2.d/S97cc-transport Wed Nov 1 18:45:01 EST 2006 /etc/rc2.d/S98cc-ccragent Wed Nov 1 18:45:02 EST 2006 /etc/rc2.d/S98cc-fwagent Wed Nov 1 18:45:02 EST 2006 /etc/rc2.d/S98deallocate Wed Nov 1 18:45:02 EST 2006 /etc/rc2.d/S99cc-invagent Wed Nov 1 18:45:03 EST 2006 /etc/rc2.d/S99dtlogin Wed Nov 1 18:45:03 EST 2006 /etc/rc2.d/S99vnc Wed Nov 1 18:45:04 EST 2006 After reboot, the script that is taking too long time should be evident. -ED Renaud Manus wrote: > Are you saying that you would like the output of your own rc scripts > to be > displayed on the console rather than in the log files? > If it's the case then the SMF verbose logging option is not going to > help. > > What you should do is modify your rc scripts so they explicitly output > to the > console. > > eg. add the following at the beginning of your scripts: > [ -x /lib/svc/bin/svc.startd ] && exec 1> /dev/sysmsg 2>&1 > > Regards, > Renaud > > Sean Liu wrote: > >> When doing jumpstarts, to install 3rd party softwares, a few RC >> scripts were created and run after the system reboot. A few reboots >> would then be performed at different stages ( adding packages, adding >> patches, encap root, mirror root etc.etc. ) >> >> For solaris 9 and below, you'll see the rc scripts run and know >> instantly when something goes wrong. >> However with Solaris 10 those messages don't show up on console and >> you have to check the logs to find out where you are, which is an >> inconvinience to state the least. >> >> Is there a way to turn on SMF verbose output at the end of >> installation but BEFORE the system reboots? So at the end of all >> reboots the script can simply turn off the verbose output. >> >> Thanks, >> >> Sean >> >> >> This message posted from opensolaris.org >> _______________________________________________ >> smf-discuss mailing list >> smf-discuss at opensolaris.org > > > _______________________________________________ > smf-discuss mailing list > smf-discuss at opensolaris.org