On 05/07/09 16:52, Tom Whitten wrote: > Paul Neary writes: > >> I'm setting up debugging of svc.startd (which works) but I can't get at >> the property using svcprop. >> >> o Use svccfg to set the property >> # svccfg >> select svc:/system/svc/restarter:default >> svc:/system/svc/restarter:default> addpg options application >> svc:/system/svc/restarter:default> setprop options/logging = astring: debug >> svc:/system/svc/restarter:default> listprop options/logging >> options/logging astring debug >> svc:/system/svc/restarter:default> quit >> >> o using -p >> # svcprop -p options/logging svc:/system/svc/restarter:default >> svcprop: Couldn't find property group `options' for instance >> `svc:/system/svc/restarter:default' >> >> >> o When I export the SMF Manifest the options just set are visible in the >> xml file. >> >> What's the explanation for this behavior (not being able to successfully >> use the -p option after setting up a property group)? >> >> -paul >> > > SMF has the concept of a running snapshot for service instances. It is the > property values in the running snapshot that the instance uses to control > its operation. Also by default, svcprop is going to show you the running > snapshot values. Actually, that is a bit of an over simplification, so see > the Description section of svcprop(1) for details. > > When you use svccfg to edit properties the new values are not automatically > placed in the running snapshot. The reason for this is that you may need > to edit more than one property to accomplish a given task. It would be > bad to have the running snapshot be in an inconsistent state with some > properties in their edited state and others still to be edited. > Makes sense. I get it now. > Once you finished editing the properties, you need to issue the refresh > command. On all systems you can do this with "svcadm refresh > instance_fmri". At some point refresh was also added as a subcommand to > svccfg, but I don't recall exactly when this was done. > > When you refresh the instance, your edits will be moved into the running > snapshot. > Does the repository get updated each time I use an svccfg command though (before doing a refresh)? > tom > I'm still not seeing this working on Nevada 113 however. I'm running an svccfg script to add the options and do a refresh (see attached). svccfg -f ./svccfg_add
o The -p seems not to work # svcprop -p options/logging svc:/system/svc/restarter:default svcprop: Couldn't find property group `options' for instance `svc:/system/svc/restarter:default'. # However, -C seems to work svcprop -C svc:/system/svc/restarter:default general/enabled boolean true restarter/next_state astring none restarter/state astring online restarter/state_timestamp time 1241050376.648719000 restarter/start_pid count 7 restarter/contract count 4 restarter/alt_logfile astring /etc/svc/volatile/svc.startd.log restarter/logfile astring /var/svc/log/svc.startd.log system/reconfigure boolean false restarter_actions/auxiliary_tty boolean true restarter_actions/auxiliary_fmri astring svc:/network/login:rlogin restarter_actions/refresh integer 662900222507120 options/logging astring debug Is this unusual behavior something to do with sv.startd being the master SMF service? -Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090507/0e1b812d/attachment.html> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: svccfg_add URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090507/0e1b812d/attachment.ksh> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: svccfg_del URL: <http://mail.opensolaris.org/pipermail/smf-discuss/attachments/20090507/0e1b812d/attachment-0001.ksh>