ezget(n) 1.0 ezget "Easy Get Command"

NAME

ezget - Get information from a Cisco device.

SYNOPSIS

package require libcisco

ezget config ?SessionId? ConfigType

DESCRIPTION

The ezget command is used to get information from Cisco devices.

The first argument to ezget specifies the type of information to get from the target device. A list of valid information elements and their associated options is detailed below.

Note: Before making a call to ezget, a session must first be opened to the target device using the session open command.

ezget config ?SessionId? ConfigType
Get the configuration from the target device.

SessionId identifies the session upon which the command will be issued. If SessionId is not specified, the command will be issued on the last session to be opened.

ConfigType may be one of two options--primary or secondary. The primary option will cause the command to get the running-config from an IOS device, the complete config of a switch running Catalyst code, and the complete configuration of a 1900. The secondary option will cause the function to retrieve the startup-config from an IOS device, the nondefault config from a switch running Catalyst code, and nothing from a 1900.

On success, ezget config returns the configuration. On error, a short text message is returned beginning with the string "err".

EXAMPLE

The following code will get the configuration from 192.168.1.1 and output it to the screen (stdout).

session open 192.168.1.1 cisco
session enable san-fran
set ConfigList [ ezget config primary ]
session close
puts $ConfigList

SEE ALSO

session(n), ezset(n), ezdo(n)

KEYWORDS

ezset, password, banner, hostname, snmp