Go to main content

Configuring and Managing Network Components in Oracle® Solaris 11.4

Exit Print View

Updated: February 2022
 
 

Obtaining Information About ENM Configuration

Use the list subcommand to list all ENMs, property-value pairs, and resources that exist at the current or specified scope, either interactively or in command-line mode.

In the global scope, the list subcommand lists all of the ENMs on a system, as shown in the following example:

$ netcfg list
ENMs:
              test-enm
              myenm

Note - In the interactive mode, using the list subcommand in the global scope displays the same information.

Note that the list subcommand does not list the state of each ENM. To display information about ENMs and their states, use the netadm list command. For more information, see Displaying Information About ENMs.

Listing Property Values for an Individual ENM

The list subcommand in the profile scope lists all of the property values for an ENM. The syntax is as follows:

netcfg> list [enm-name]

How to List All of the Property Values for an ENM Interactively

The following procedure describes how to list all of the property values for an ENM by using the list subcommand interactively. The example in the following procedure shows how to list the configuration information for an ENM named myenm.The values that are listed for each ENM vary.

Before You Begin

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. Initiate the netcfg interactive session.
    $ netcfg
    netcfg>
  2. List the configuration for the ENM by using one of the following methods:
    • List the configuration from the global scope:
      netcfg> list myenm
      enm:myenm
              activation-mode         manual
              enabled                 false
              start                   "/path/to/start-script"
    • List the configuration from the ENM scope:
      netcfg> select myenm
      netcfg:enm:myenm> list
      enm:myenm
              activation-mode         manual
              enabled                 false
              start                   "/path/to/start-script"
  3. Exit the interactive session.
    netcfg:enm:myenm> exit
Example 13  Listing Property Values for an ENM in Command-Line Mode

You can also list property values for an ENM by using the command-line mode. The output is identical, regardless of which mode you use.

For example, you can list the properties of the ENM named myenm from the global scope as follows:

$ netcfg "list myenm" 

You can list the properties for an ENM from the ENM's profile scope as follows:

$ netcfg "select myenm; list"

Obtaining a Specific Property Value for an ENM

Use the get subcommand to obtain a specific property value for an ENM. You can use this subcommand either interactively or in command-line mode. The command syntax is as follows:

netcfg:enm:enm-name> get [ -V ] prop-name

How to Obtain a Specific Property Value for an ENM

The following procedure describes how to obtain a specific property value for an ENM by using the get subcommand interactively. The example in the following procedure shows how to obtain the start property for an ENM named myenm.

Before You Begin

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. Initiate the netcfg interactive session.
    $ netcfg
    netcfg>
  2. Select the ENM.
    netcfg> select myenm
  3. Obtain the specific property value by using one of the following commands:
    • Use the get subcommand to display the property name and the property value as follows:
      netcfg:enm:myenm> get start
                   start                  "/path/to/start-script"
    • If you want to obtain only the property value, and not the property name, use the –V option with the get subcommand:
      netcfg:enm:myenm> get -V start
      /path/to/start-script
  4. Exit the interactive session.
    netcfg:enm:myenm> exit
Example 14  Obtaining a Specific Property Value for an ENM in Command-Line Mode

You can also obtain a specific property value for an ENM in command-line mode. The output is identical, regardless of which mode you use.

For example, you can obtain the value of the start property for an ENM (myenm) in command-line mode as follows:

$ netcfg "select myenm; get start"
start                  "/path/to/start-script"

The following example shows how to use the get subcommand with the –V option to obtain a specific property value. This method is useful for scripts, where the property name does not need to be parsed.

$ netcfg "select myenm; get -V start"
/path/to/start-script