[Top] [Prev] [Next] [Contents] [Index]

Using SNMP to Read and Write Variables

You can read and write SNMP variables using the SNMP utilities provided with your SNMP host software. In addition, you can read a few variables using the ncdquery(1) utility provided on the NCDware distribution.

Reading a Terminal's SNMP Variables

The following sections describe how to use SNMP management software or the ncdquery utility to read a terminal's SNMP variables.

Using SNMP Management Software

A host's SNMP management software usually includes a get command that allows you to read a terminal's SNMP variables. Reading variables requires read-only or read/write access to the terminal, which is allowed by default.

Using the ncdquery Utility

The ncdquery utility allows you to display the contents of a few MIB variables for a specified terminal. An ncdquery command must be executed from a host designated as an SNMP manager or monitor:

For more information about community names, see "Configuring Read/Write Access" and "Configuring Read-Only Access".

The command syntax is:


ncdquery [ -V -v -c community -d variable_options ] hostname

where:

-V Displays version information for ncdquery
-v Displays the hostname
-c community

Is the community name. If the community name is not one of the defaults (manager for manager hosts and public for monitor hosts), you must supply the community name.
-d Displays debugging information
variable_options

Specifies the variable(s) to display. The default is to display the X server version. The options and variables displayed by each are:
-s

X server version
-b

Boot Monitor version
-k

Keyboard controller version
-i

Amount of memory installed
-h

Memory fragments
-f

Amount of free memory
-a

All of the above
hostname Is the hostname of the terminal.

For example, the following command displays the X server and Boot Monitor versions, assuming the default community name and MIB file:


% ncdquery -s -b ncdu60
server version: NCD19c server 3.1.0 03/12/91 downloaded
boot monitor version: Boot PROM V2.2.4

For more information about the ncdquery command and its options, see the man page.

Writing SNMP Variables-Configuring Terminals

You can modify an NCD terminal's SNMP variables using your host SNMP management software. Host SNMP software usually includes a set command for modifying variables. Modifying variables requires read/write access to the terminal, which is allowed by default.

Consult your SNMP management documentation for information about commands to use for modifying SNMP variables.

Each remote configuration parameter has a variable name and path assigned to it. You can obtain SNMP variable names and paths for the read/write parameters from the Remote Configuration Parameter Quick Reference.

Depending on the SNMP management software at your site, you may need to assign numerical values to parameters that accept choices or Boolean values. To assign numerical values to a parameter, complete the following steps:

  1. Identify the values available for the desired parameter.

  2. If required by your SNMP management software, assign numerical values to the available choices:

    For more information about assigning values to parameters, refer to the documentation for your SNMP management software.

  3. Enter the command, using the appropriate value. For example, a command using host-based SNMP management software to change the boot-desired-source parameter to "local" is:

    % xsnmpi -a 191.42.153.147 -c manager set ncdBootDesiredSource.0=5 where:

    191.42.153.147 Is the IP address of the terminal
    -c manager Is the community name for read/write permission
    ncdBootDesiredSource Is the SNMP variable name for the boot-desired-source parameter
    5 Is the choice "local"



[Top] [Prev] [Next] [Contents] [Index]

Send comments, suggestions, or questions about this document to the NCD Technical Publications Department by Internet e-mail. Write to us at techpubs@ncd.com.
Copyright © 1997, NCD Inc. All rights reserved.