在 Oracle® Solaris 11.2 中管理系统服务

退出打印视图

更新时间: 2014 年 7 月
 
 

显示从中设置值的层

服务配置系统信息库根据数据的来源在各层中存储属性数据。svcpropsvccfg 命令都可以显示作为属性值来源的层。svcpropsvccfg 命令的 -l 选项需要一个参数来指定您想要获得其信息的层。参数值包括 manifestsystem-profilesite-profileadmin。输出指示特定的属性值是在服务清单或配置文件中设置,还是由管理员设置。有关各层的说明,请参见系统信息库层。关键字 all 是所有层的别名。如果您指定的层不是您请求的属性值的来源,则不显示任何输出。

下面的命令显示有些属性值来源于服务清单,有些由管理员设置,而有些属性则在多个层中具有值。pkg/readonly 属性具有在服务清单中设置的值,且管理员也设置了相同的值。不同层的值可以不同。

$ svcprop -l all -p pkg pkg/server:s11
pkg/port count admin 81
pkg/inst_root astring admin /export/ipsrepos/Solaris11
pkg/address net_address manifest
pkg/cfg_file astring manifest ""
...
pkg/readonly boolean manifest true
pkg/readonly boolean admin true
...

svccfg listprop 命令的 -l 选项还可以接受参数 current。将 current 用作 -l 参数时显示的属性值与不使用 -l 选项时显示的属性值相同。输出中唯一的区别在于同时还显示层的名称。非持久性数据不显示层名称(第三列显示 <none>),因为服务配置系统信息库不存储非持久性数据的层信息。非持久性属性组通常保存活动的程序状态,并且非持久性属性组中的属性值在系统引导期间会被清除。

$ svccfg -s pkg/server:s11 listprop -l current
pkg                                application admin
pkg/inst_root                     astring     admin     /export/ipsrepos/Solaris11
pkg/port                          count       admin     81
general                            framework   admin
general/complete                  astring     manifest
general/enabled                   boolean     admin     true
restarter                          framework   <none>       NONPERSISTENT
restarter/logfile                 astring      <none>    /var/svc/log/application-pkg-server:default.log
restarter/contract                count        <none>    121
restarter/start_pid               count        <none>    1055
restarter/start_method_timestamp  time         <none>    1379605275.329096000
restarter/start_method_waitstatus integer      <none>    0
restarter/auxiliary_state         astring      <none>    dependencies_satisfied
restarter/next_state              astring      <none>    none
restarter/state                   astring      <none>    online
restarter/state_timestamp         time         <none>    1379605275.332259000