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:
cnsview > > show traffic > > quit
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.
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:
cnsview > > set device /dev/tty2 /dev/tty3 > > set hibaud > > quit
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.
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:
00406e0000bf
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.
The following subcommands can be used with the cnsview command:
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
/dev/tty2
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 overrun:2
An aggregate qualified with a single subproperty displays like a scalar. For example:
show errors parity 2
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
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 |
device | list | List of selected devices |
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 |
buddy | 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. | |
hibaud | 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. | |
loopback | 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. | |
mscreen | Boolean | Enable multiple screens. | |
session | integer | Current virtual session number. | |
slew | 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. | |
tprint | 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. | |
type | string | Terminal type in the Object Data Manager (ODM). | |
comstatus | name | Box port name. | |
adminStatus | Administrative status, usually enabled. | ||
operStatus | Operating system, usually up. | ||
lastChange | Last time something changed on the port. | ||
inFlowType | Type of input flow control used. | ||
outFlowType | Type of output flow control used. | ||
inFlowState | Current state of output flow control. | ||
outFlowState | Current state of input flow control. | ||
inChars | Number of total input chars. | ||
outChars | Number of total output chars. | ||
adminOrigin | Connection type. | ||
comstats | ifInOctets | # Characters in. | |
ifOutOctets | # Characters out. | ||
ifInParityErrors | # of in parity errors. | ||
ifInFrameErrors | # of in frame errors. | ||
ifInOverruns | # of in overruns. | ||
ifOutMessages | |||
ifInMessages | |||
ifIoctls | |||
ifDCDs | Shows DCD toggles | ||
ifDTRs | Shows DTR toggles | ||
ifRTSs | Shows RTS toggles | ||
ifCTSs | Shows CTS toggles | ||
ifDSRs | Shows DSR toggles | ||
ifRIs | |||
ifALOOPs | |||
ifDLOOPs | |||
ifExcessiveDCDs | Show times port shut down for DCD. | ||
ifNoSRs | Show times we ran out of memory. | ||
ifOpens | Show times port was opened. | ||
ifInFlows | Shows # input flow ctl, any type. | ||
ifOutFlows | Shows # output flow ctl, any type. | ||
ifInBreaks | Shows # break conditions. | ||
ifOutBreaks | Shows # breaks sent. | ||
ifInSTREAMSOver | Shows # data loss because of no memory. | ||
ifUpTime |
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 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 |
com | |||
lpt | |||
station | integer | 7318 unit number | |
port | integer | Physical port number | |
session | integer | Session number | |
eaddr | 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. | |
log | string | Dumb error log. | |
mac | 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. | |
software | string | Displays model number and release version. | |
timezone | integer | Hours west of Greenwich. | |
sysstats | model | Type of box, P10 or S20. | |
release | Operating kernal release. | ||
bios | Bios release. | ||
nvram | NVRAM release level. | ||
time | Time of day, may not be set. | ||
uptime | dd:hh:mm:ss of time since boot. | ||
idle | Ignore. | ||
idleRate | Ignore. | ||
dmaInts | # of dma interrupts, total. | ||
spintInts | # of clock/modem interrupts, total. | ||
macInts | # of LAN interrupts, total. | ||
badInts | # of unknown interrupts. | ||
maxDead | Highest deadman count, 10ms ticks. | ||
memstats | /dev/cns01 | ||
heapstats | used | ||
free | |||
available | |||
heapMblks | |||
heapMblksRefused | |||
free16 | |||
free256 | |||
free4096 | |||
freeBig | |||
used16 | |||
used256 | |||
used4096 | |||
usedBig |
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.