[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

cnsview Command


Provides information about changes to the parameters of a 7318 and its associated devices and drivers.


cnsview-x ] [ -c SubCommand ] [ DeviceList ]


The cnsview command is normally used with Model P10s, but it can also be used with Model S20s that have P10-style ports. The command can execute subcommands from an interactive session or noninteractively when commands are passed as command-line arguments. Any subcommand that can be entered interactively can also be entered using the command line. For example:

cnsview -c "show traffic" 

displays the number of bytes exchanged over a 7318 port. The argument following the -c flag is the subcommand to be executed.

Note: Because this subcommand consists of two words, you must enclose the subcommand in quotes before it is passed to the AIX shell.

The same command can be entered interactively with the following sequence:

 show traffic 

The >> (greater than) characters are the cnsview command prompt, similar to the AIX shell prompt.

When used interactively, the cnsview command reads input from standard input and displays the results of commands, if any, to standard output. You can use AIX file redirection and pipes for both input and output.

Note: Most end users should not have any need to use the cnsview command. It is intended primarily for the system administrator.


-c SubCommand

-x SubCommand

Runs the subcommand specified by the SubCommand variable, without entering interactive mode.

Runs the subcommand specified by the SubCommand variable with debug enhancements, without entering interactive mode.

Selecting Devices

Most of the cnsview subcommands apply to a selected device or devices. If you do not otherwise specify a device, the cnsview command assumes the serial line or the 7318 currently in use. If you do not specify a 7318 port and attempt to run a command from a TTY device that is not a 7318 port, such as the system console, the command may report an error such as:

cnsview: operation not supported on /dev/console 

You can select one or more devices by listing them on the command line. For example:

cnsview -c "set hibaud" /dev/tty2 /dev/tty3

This command sets the hibaud property on two ports.

When you use the cnsview command interactively, you can also specify devices, using the set device subcommand. For example:

 set device /dev/tty2 /dev/tty3
 set hibaud

Note: When you are using the set device subcommand interactively, the shell file-name expansion facility is not available. Therefore, you must type in the full file name of each device.

You can select any device known to AIX, but most of the commands only work on 7318 devices.

You can use the show device command to display the list of selected devices. For example:

cnsview -c "show device" 

This command shows the device you are currently using.

Physical Port to TTY Mapping

Issue the cnsview commands to locate a physical port for a particualr device, as shown in the following example.

cnsview -c "show devmap" /dev/tty6

The output is similar to the following:

type com
station 1
port 5
session 0
cnsview -c "show eaddr" /dev/cns01

The output is similar to the following:


Where the value of station is used to build the device name. For example, a value of 1 for the station parameter is for the device, /dev/cns01 .


Only a 7318 device owner or a root user can run cnsview subcommands that affect the device. Subcommands that affect multiple devices such as the daemon command can only be run by a root user or a user with write access to the /dev/cns file.

cnsview Subcommands

The following subcommands can be used with the cnsview command:

explore Searches the network for 7318s and prints a list of their names, network addresses, and status.
daemon [ start | stop | init ]
                          Controls the cnsview daemon process that manages all traffic to 7318s. When the daemon is stopped, any attempt to use a 7318 device results in an ENXIO error.

The daemon init command forces the daemon to reread the 7318 configuration file. If you modify this file after installing the system, issue the daemon init command.

help [ Command [ Property [ SubProperty ] ] ]
                          Lists the available commands or explains how to use a specific command. If the command specified by the Command parameter is set or show, the help command lists the properties of the selected device and its types.
ipxping [ -b | NetworkAddress ] Sends an IPX echo message to a NetWare device whose address is specified by the NetworkAddress parameter. The ipxping -b command broadcasts an echo message. The -b flag should be issued with caution because it can generate a large burst of network traffic.
reboot [ -u ] [ -p LoadFile ]

Attention: Issuing this command immediately stops the 7318 without notice to anyone attached to the unit.

The reboot command restarts the 7318. The command session must be in password privilege mode to use this command. The -u flag forces the current load image to upload to the load host. The -p flag specifies an alternate load file (the LoadFile variable) rather than the one specified in the nonvolatile RAM.

reset Resets a device, which puts the device back into its initial default state, turning off any special modes that might have been applied. Any process that has the device open receives a hangup signal.
quit Terminates the cnsview command. Exit and q are synonyms for quit.
set [ - ]Property [ SubProperty ] [ Value ]
                          Sets the value of a property. Some properties are of type Boolean; that is, they can be true or false, represented by the values of 1 for true and 0 for false. You can set a Boolean property to true by entering:
set Property 

This is equivalent to the command:

set Property 1 

You can set a Boolean property to false by entering:

set -Property

This is equivalent to the command:

set Property 0 

Note: Do not insert a space between the - (minus) and the property.

show Property [ SubProperty ] Displays the contents of a property to standard output.


Each device managed by the cnsview command has a collection of parameters or properties that the show command can display. The set command can modify some of these parameters.

Properties can be scalar (meaning they have a single value) lists that have multiple values, or aggregates that are a collection of properties selected by subproperty. Lists are like arrays in a programming language; aggregates are like structures. Scalar properties can be one of the types shown in the table below.

Scalar Properties
Type Description Example Values
Boolean True or False 1,0
integer A 32-bit number 120
string A text string /dev/tty2, "now is the time"
oneof A set of names internal, external

The cnsview command displays properties depending on their type and on the number of devices selected. When you select a single device, a scalar or list property displays as the value or list of values on a line by itself. For example:

show device 

An aggregate displays with the subproperty name followed by a colon and then the value of the subproperty. For example:

show errors
parity: 0
frame:  1

An aggregate qualified with a single subproperty displays like a scalar. For example:

show errors parity 

When you select multiple devices, scalar values display with the device name and a colon preceding the value. For example:

set device /dev/tty2 /dev/tty3
show errors parity
 /dev/tty2:      2
/dev/tty3:      0 

When you select multiple devices, an aggregate displays as a table. For example:

set device /dev/tty2 /dev/tty3
show errors
                parity  frame   overrun 
/dev/tty2:        2        0       1
/dev/tty3:        0        1       0 

Global Properties

The following Global Properties table describes the global properties of the cnsview command:

Global Properties
Property Subproperty Type Description
cnsview revision string Current cnsview release
list List of selected devices

Serial Port Properties

The following Serial Port Properties table describes the cnsview command properties and subproperties for serial ports:

Note:The -x flag only accepts the comstatus, comstats, sysstats, memstats, and heapstats subcommands.

Serial Port Properties
Property Subproperty Type Description
Boolean Enable extended modem controls on port.
errors parity integer Number of parity errors received.

frame integer Number of frame errors received.

overrun integer Number of overrun errors received.
extmodem dsr Boolean State of the DSR modem control signal.

ri Boolean State of the RI modem control signal.

aloop Boolean State of the analog loopback modem control signal.

dloop Boolean State of the digital loopback modem control signal.
Boolean Enable extended baud rates.
ldisc where oneof Where line discipline is currently running:

Host - line discipline on host.

Remote - line discipline on 7318.

hostld Boolean Force line discipline to run on host when True.
oneof Enable special loopback modes:

None - loopback not enabled.

Internal - hardware loopback.

Software - software loopback.

Drain - flush outbound data.
modem dtr Boolean State of the Data Terminal Ready (DTR) modem control signal.

dcd Boolean State of the Data Carrier Detect (DCD) modem control signal.

rts Boolean State of the Request to Send (RTS) modem control signal.

cts Boolean State of the Clear to Send (CTS) modem control signal.
Boolean Enable multiple screens.
integer Current virtual session number.
oneof Set slew rate on port:

Slow - normal slew rate.

Medium - medium slew rate.

Fast - faster slew rate (default).

Super - fastest slew rate.
tpparam rate integer Transparent print rate in characters per second.

enter string Terminal transparent print enter string.

exit string Terminal transparent print exit string.
Boolean Enable transparent printing.
traffic inbytes integer Number of bytes received.

outbytes integer Number of bytes transmitted.

inmsgs integer Number of messages received.

outmsgs integer Number of messages transmitted.

ioctls integer Number of ioctls processed.
string Terminal type in the Object Data Manager (ODM).
comstatus name
Box port name.

Administrative status, usually enabled.

Operating system, usually up.

Last time something changed on the port.

Type of input flow control used.

Type of output flow control used.

Current state of output flow control.

Current state of input flow control.

Number of total input chars.

Number of total output chars.

Connection type.
comstats ifInOctets
# Characters in.

# Characters out.

# of in parity errors.

# of in frame errors.

# of in overruns.




Shows DCD toggles

Shows DTR toggles

Shows RTS toggles

Shows CTS toggles

Shows DSR toggles




Show times port shut down for DCD.

Show times we ran out of memory.

Show times port was opened.

Shows # input flow ctl, any type.

Shows # output flow ctl, any type.

Shows # break conditions.

Shows # breaks sent.

Shows # data loss because of no memory.


Parallel Port Properties

The following Parallel Port Properties table describes the cnsview command properties and subproperties for 7318 LPT devices such as /dev/lpt01:

Note:The -x flag only accepts the comstatus, comstats, sysstats, memstats, and heapstats subcommands.

Parallel Port Properties
Property Subproperty Type Description
traffic inbytes integer Number of bytes received.

outbytes integer Number of bytes transmitted.

inmsgs integer Number of messages received.

outmsgs integer Number of messages transmitted.

ioctls integer Number of ioctls processed.
lptctl selected Boolean True if printer reports selected.

peb Boolean True if printer reports paper empty or busy.

error Boolean True if printer reports error.

selectin Boolean True if 7318 is asserting select.

init Boolean True if 7318 is asserting init.

autofeed Boolean True if 7318 is asserting feed.

7318 Properties

7318 properties apply to/dev/cnsXX, where the XX parameter is the number of the 7318 on the system. Most of these parameters show contents of the nonvolatile RAM in the 7318 and are not directly relevant to the 7318 software package.

Note: The 7318 properties cannot be set using the cnsview command. They are for display only.

Properties 7318
Property Subproperty Type Description
bios loadtype string Load protocol used.

loadhost string Host loaded from.

loadi string File name of 7318 image.

selftest integer Hex value of self-test results.
cns addr string Network address of 7318.

psize integer Packet size in bytes.

boot Boolean True if 7318 is bootable.
devmap type oneof Specifies the porttype



station integer 7318 unit number

port integer Physical port number

session integer Session number
string Ethernet address.
hwconfig memtype integer 1MB or 4MB RAM chips.

memsize integer 7318 memory size in bytes.

console integer Console number in use.
ipconfig ipaddr string Internet address.

domain string Simple Network Management Protocol (SNMP) domain.
ldparam loadfile string 7318 kernel file name.

intr string Ethernet interface to load from.

type string Type of load to perform.

srch Boolean Search for load host.

primary string Primary load host address.

secondary string Secondary load host address.

frametype string Specifes interface frametype. Possible values are: ETHERNET_II. ETHERNET_802.3. auto.
string Dumb error log.
string Displays Mac Layer Interface (MAC) statistics.
serialnum box_sn string Serial number of 7318.

main_sn string Serial number of main board.

io_sn string Serial number of I/O board.

ps_sn string Serial number of power supply.
string Displays model number and release version.
integer Hours west of Greenwich.
sysstats model
Type of box, P10 or S20.

Operating kernal release.

Bios release.

NVRAM release level.

Time of day, may not be set.

dd:hh:mm:ss of time since boot.



# of dma interrupts, total.

# of clock/modem interrupts, total.

# of LAN interrupts, total.

# of unknown interrupts.

Highest deadman count, 10ms ticks.
memstats /dev/cns01

heapstats used













Exit Status

This command returns the following exit values:

0 Successful completion.
>0 An error occurred.


Access Control: You must have root authority to run this command.

Related Information


[ Previous | Next | Contents | Glossary | Home | Search ]