26 | Smart Scriptingw w w . d e l l . c o m | s u p p o r t . d e l l . c o mRunning a PERL API ScriptWhen you run a PERL script that invokes the API functions in Table 3-2, logoncredentials are read from the smartutils.cfg file, and a telnet session is opened on theswitch in which function calls are executed in the FTOS CLI. The script closes thetelnet session after running all the CLI commands.The smartutils.cfg file is the configuration file used by the ProgrammaticManagement package. It contains the user name and passwords required to log on toa switch via telnet and access the CLI to execute the function calls in a PERL APIscript. The smartutils.cfg file is downloaded with the Programmatic Managementpackage and is stored at /usr/pkg/scripts/smartutils.F10ShowLagIntVlanMembers(lagId) Returns information on VLAN membership for a specifiedport-channel interface.F10ShowLog None Returns the switch log buffer.F10ShowMacAddrTbl None Returns the table of learned MAC addresses.F10ShowMem (lagId) Returns switch memory usage.F10ShowOSPFNeighbors None Returns list of OSPF neighbors.F10ShowOSPFRoute None Returns the table of OSPF-learned routes.F10ShowPhyIntBand (stackUnitNum, portId) Returns in/out bandwidth average for a specified port.F10ShowPhyIntStatus (stackUnitNum, portId) Returns the detailed status of a specified physical interface.F10ShowPhyIntVlanMembers(stackUnitNum, portId) Returns information on VLAN membership for a specifiedphysical interface.F10ShowProcCpu None Returns switch CPU usage and running processes.F10ShowRun None Returns the running configuration (in memory).F10ShowVer None Returns software version information.F10ShowVlan None Returns the show vlan output for all VLANs.F10ShowVlanId (vlanId) Returns the show vlan output for a specific vlan.F10ShowVlanIntStatus (vlanId) Returns the detailed status of a specified VLAN interface.F10ShowVrrp None Returns the full VRRP status output.F10ShowVrrpBrief None Returns a brief VRRP session summary.F10Traceroute (ipAddress, timeout) Performs a traceroute operation to an IP address from the switch.F10WriteMem None Write the running configuration to the startup configuration file.Table 3-3. Supported FTOS API Functions in PERL Scripts (continued)Note: The user name and passwords contained in the smartutils.cfg file are used tolog in and run only the scripts created using the PERL, Python, and UNIX APIsdescribed in this chapter. A username used to run scripts cannot contain specialcharacters.