Go to main content

手册页部分 8:系统管理命令

退出打印视图

更新时间: 2022年7月27日 星期三
 
 

ovmtprop (8)

名称

ovmtprop - show properties

用法概要

/opt/ovmtutils/bin/ovmtprop get-prop -a [-h] [-q] [-V]

/opt/ovmtutils/bin/ovmtprop get-prop -k name[,name,...] [-h] [-q] [-V]

/opt/ovmtutils/bin/ovmtprop get-prop -K name[,name,...] [-h] [-q] [-V]

/opt/ovmtutils/bin/ovmtprop set-prop prop-name=prop-value,...] [-h] [-q] [-V] domain-name

描述

The ovmtprop command enables you to view and set properties. The property and value is specified as a name-value pair. View property values by using the ovmtprop get-prop command, and create properties by using the ovmtprop set-prop and ovmtconfig -v commands.

Do not perform ovmtprop get-prop and ovmtprop set-prop commands simultaneously.

To set property values for domains, run the ovmtprop set-prop command as superuser on the control domain. It is best to use a fully qualified namespace to specify a name-value pair to avoid clashes between application properties.

To view properties and their values, run the ovmtprop get-prop command on the domain for which you want to retrieve property information. You do not need to be superuser to view property information.

To view all properties, use the –k or –K option to specify property search criteria or use the –a option with no arguments. You can specify search criteria by domain to return hierarchical properties such as listing all properties for a single application.

The ovmtprop command includes the following options:

–a

Shows all property names and values, each on a separate line. You cannot use this option with the –k option.

–h

Prints the usage statement.

–k name[,name,...] [all]

Specifies a comma-separated list of property names to query. Each property name and property value is output on a separate line. Specifying the –k all option is the same as using the –a option.

–K name

Specifies a property name to query and outputs only the property value.

–q

Shows only the specified property and property values, each on a separate line. The order in which the properties are shown matches the order in which the properties are specified on the command line. The copyright banner and error strings are suppressed.

–V

Prints the version.

示例

示例 1 Setting the com.oracle.solaris.system.computer-name Property on a Guest Domain

This example shows how to set the com.oracle.solaris.system.computer-name property to solaris11 on the ldg0 domain.

primary# /opt/ovmtutils/bin/ovmtprop set-prop com.oracle.solaris.system.computer-name=solaris11 ldg0
示例 2 Viewing the com.oracle.solaris.system.computer-name Property and Property Value

This example shows how to view the value for the com.oracle.solaris.system.computer-name property. The output shows both the property name and the property value.

$ /opt/ovmtutils/bin/ovmtprop get-prop -k com.oracle.solaris.system.computer-name
com.oracle.solaris.system.computer-name=s11
示例 3 Viewing Multiple Hierarchical Properties

This example shows how to view the properties and their values under com.oracle.solaris property.

$ /opt/ovmtutils/bin/ovmtprop get-prop -k com.oracle.solaris
solaris.system.computer-name=s11
solaris.network.ipaddr.0=192.168.0.1
示例 4 Retrieving All Property Values

This example shows how to retrieve the property values for all the properties. The output shows both the property name and the property value.

$ /opt/ovmtutils/bin/ovmtprop get-prop -a
com.oracle.solaris.system.computer-name=s11
com.oracle.solaris.network.ipaddr.0=192.168.0.1
...

退出状态

The following exit values are returned:

0

Successful completion.

1

An error occurred. Property value not set or property not found.

2

A usage error occurred.

属性

See the attributes(7) man page for a description of the following attributes.

Attribute Type
Attribute Value
Availability
pkg:/system/ldoms/ovmtutils
Interface Stability
Uncommitted

另请参见

attributes(7), ovmtadm(8), ovmtconfig(8), ovmtcreate(8), ovmtdeploy(8), ovmtlibrary(8)

Oracle VM Server for SPARC 3.6 Developer’s Guide