crsctl query socket udp

Use the crsctl query socket udp command to verify that a daemon can listen on specified address and port.

Syntax

crsctl query socket udp [-address address] [-port port]

Table E-51 crsctl query socket udp

Parameter Description
-address address

Specify the IP address on which the socket is to be created. If you do not specify an address, then CRSCTL assumes the local host as the default.

-port port

Specify the port on which the socket is to be created. If you do not specify a port, then CRSCTL assumes 53 as the default.

Usage Notes

  • You must run this command as root to verify port numbers less than 1024.

Examples

The following examples show various outputs:

$ crsctl query socket udp
CRS-10030: could not verify if port 53 on local node is in use

# crsctl query socket udp
CRS-10026: successfully created socket on port 53 on local node

The first of the preceding two commands was not run as root, and in both commands no port was specified, so CRSCTL assumed the default, 53, which is less than 1024. This condition necessitates running the command as root.

$ crsctl query socket udp -port 1023
CRS-10030: could not verify if port 1023 on local node is in use

# crsctl query socket udp -port 1023
CRS-10026: successfully created socket on port 1023 on local node

Similar to the first two examples, the first of the preceding two commands was not run as root, and, although a port number was specified, it is still less than 1024, which requires root privileges to run the command.

In this last example, a port number greater than 1024 is specified, so there is no need to run the command as root:

$ crsctl query socket udp -port 1028
CRS-10026: successfully created socket on port 1028 on local node