node-port-group

Queries port group data downloaded to the Data Node through the policy synchronization module.

Command properties

PropertyDescription
Command typeDriver
Required permissionAdministrator
License usageNot counted
Parallel executionNot supported
Distributed executionNot supported

Syntax

node-port-group [guid=STR] [name=STR]

In the syntax above, name is available starting with 4.0.2609.0.

Options

guid=STR
Port group GUID. In the 5.0 series (through 5.0.2605.2), this is the only way to specify a port group. In the 4.0 series (4.0.2609.0 and later), it cannot be used together with name. When specified, queries the port entries included in that port group. When omitted, lists a summary of all port groups.
name=STR
Port group name (cannot be used together with guid). When specified, queries the port entries included in that port group. When omitted, lists a summary of all port groups. This option is available starting with 4.0.2609.0.

Output fields

When either the guid or name option is specified:

FieldTypeDescription
protocolstringProtocol (tcp, udp, etc.)
startintegerStart of port range
endintegerEnd of port range
descriptionstringPort entry description
app_codestringApp code
app_built_inbooleanWhether this is a built-in app

When both the guid and name options are omitted:

FieldTypeDescription
idintegerPort group ID
guidstringPort group GUID
namestringPort group name
descriptionstringPort group description
port_countintegerNumber of port entries
user_namestringCreator name
user_guidstringCreator GUID

Error codes

Parse errors
Error codeMessageDescription
300310no permission for node-port-groupAdministrator privileges are required.
300311invalid guid format for node-port-groupThe guid option value is not a valid GUID format.
300312port group [guid] not found for node-port-groupNo port group exists for the specified GUID.
300313Port group not found by name for node-port-group.No port group exists with the name specified in the name option. Available starting with 4.0.2609.0, which has the name option.
300314Duplicate port group name for node-port-group.More than one port group exists with the name specified in the name option. Available starting with 4.0.2609.0, which has the name option.
300315Specify only one of 'guid' or 'name' option in the node-port-group command.Both the guid and name options are specified. Available starting with 4.0.2609.0, which has the name option.
300316Cannot load port group for node-port-group.An error occurred while reading data while querying by the name option. Available starting with 4.0.2609.0, which has the name option.
Runtime errors

None

Description

The node-port-group command queries port group data downloaded from the Control Node to the Data Node through the policy synchronization module.

When either the guid or name option is specified, it returns the individual port entries (protocol, start port, end port, description) included in that port group. When both options are omitted, it returns a summary list of all synchronized port groups (name, GUID, port count, etc.).

In the 4.0 series (4.0.2609.0 and later), you can use the name option to specify a port group by name instead of GUID. Specifying both options at the same time causes an error, as does specifying a name that does not exist or that matches more than one group.

Examples

  1. List all port groups

    node-port-group
    

    Queries the summary information of all port groups synchronized to the Data Node.

  2. Query port entries of a specific port group

    node-port-group guid=550e8400-e29b-41d4-a716-446655440000
    

    Queries the port entries included in the port group with the specified GUID.

  3. Query port entries of a port group by name (4.0 series, 4.0.2609.0 and later)

    node-port-group name=web_ports
    

    Queries the port entries included in the port group with the specified name.

Change history

TargetIntroduced in
The node-port-group commandBefore Sonar 4.0
The name option4.0.2609.0