Sponsored Content
Top Forums Shell Programming and Scripting Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting Post 302358102 by research3 on Thursday 1st of October 2009 11:12:12 AM
Old 10-01-2009
Hi,

only to info.

maybe ciscocmd help you.

Download Cisco-centric Open Source Initiative from SourceForge.net
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy). :) I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies

2. Shell Programming and Scripting

question about "sleep" command in expect script

I wrote some expect script to telnet to some device to execute some commands.Firstly,I can't get full result some time,then I try to add some "sleep" command in it.Fortunately it works. My idea about it is that it uses sleep command to wait the result to be displayed.Am I right or correct the... (4 Replies)
Discussion started by: robbiezr
4 Replies

3. Shell Programming and Scripting

Expect/telnet/testing tacacs on a cisco

At times I find the need to test that the tacacs port 49 is open. The code below works but is painfully slow because I have to wait on the timeouts. Examples of possible responds router1#telnet 10.11.20.14 49 Trying 206.112.204.140, 49 ... Open route1#telnet 10.11.19.14 49 Trying... (1 Reply)
Discussion started by: popeye
1 Replies

4. Shell Programming and Scripting

Alternate to SLEEP for EXPECT within BASH script?

Fairly new to the System Admin world, and this is my first post here, hoping to get some clarification. I am using a BASH script to automate some Logfile Archiving (into .tars). The actual logfiles are accessed through an SSH, so I have used the following EXPECT sub-script within my main BASH... (8 Replies)
Discussion started by: Goatfarmer03
8 Replies

5. Shell Programming and Scripting

Bash script failed with expect on cisco routers

Hi all, I use a bash script which use expect to connect throught ssh and run command on a cisco router. The ssh connection with expect work fine, but the first command on the cisco router failed, I try to run the command in error by hand and it work fine... :( the first part of the script... (2 Replies)
Discussion started by: bedomon
2 Replies

6. Programming

Calling expect script inside another expect

Hi, Am very new to expect scripting.. Can You please suggest me how to call an expect script inside another expect script.. I tried with spawn /usr/bin/ksh send "expect main.exp\r" expect $root_prompt and spawn /usr/bin/ksh send "main.exp\r" expect $root_prompt Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies

7. Shell Programming and Scripting

Expect script to show cisco configs

I know there are better ways to do this. I prefer snmp. I do not have the proper perl modules loaded on the platorm. Snmp isnt loaded on the platform. Telnet is not an option. I need to write an expect script to pull cisco equipment configs. The following code is executed once I gain... (0 Replies)
Discussion started by: popeye
0 Replies

8. Programming

Calling another expect script inside an expect script

I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues: set REMOTE "/root/scripts/remote" ... log_user 1 send_user "Executing remote script as $user...\n" send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies

9. Programming

Expect script returning string following a found expect.

I'm fairly new to scripting so this might not be possible. I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version: #show version ... (0 Replies)
Discussion started by: IBGaryA
0 Replies

10. Shell Programming and Scripting

Cisco, 2 ssh logins for expect /bash

HI all i need to connect to about 900 cisco routers and switch to do some configs changes. the issue i am having is that half the devices have one set of username and password and the other half have another username and password. From expect or bash script i can ssh into a device and make... (0 Replies)
Discussion started by: quintin
0 Replies
FENCE_AGENT(8)						      System Manager's Manual						    FENCE_AGENT(8)

NAME
fence_wti - Fence agent for WTI DESCRIPTION
fence_wti is an I/O Fencing agent which can be used with the WTI Network Power Switch (NPS). It logs into an NPS via telnet or ssh and boots a specified plug. Lengthy telnet connections to the NPS should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions. fence_wti accepts options on the command line as well as from stdin. Fenced sends parameters through stdin when it execs the agent. fence_wti can be run by itself with command line options. This is useful for testing and for turning outlets on or off from scripts. Vendor URL: http://www.wti.com PARAMETERS
-a, --ip=[ip] IP Address or Hostname This parameter is always required. -l, --username=[name] Login Name -p, --password=[password] Login password or passphrase -c, --command-prompt=[prompt] Force Python regex for command prompt (Default Value: ['RSM>', 'MPC>', 'IPS>', 'TPS>', 'NBB>', 'NPS>', 'VMR>']) -x, --ssh SSH connection -n, --plug=[id] Physical plug number, name of virtual machine or UUID This parameter is always required. -u, --ipport=[port] TCP/UDP port to use (default 23, 22 if --ssh TCP/UDP port to use for connection with device (Default Value: 23) -4, --inet4-only Forces agent to use IPv4 addresses only -6, --inet6-only Forces agent to use IPv6 addresses only -S, --password-script=[script] Script to retrieve password -k, --identity-file=[filename] Identity file for ssh --ssh-options=[options] SSH options to use -o, --action=[action] Fencing Action (Default Value: reboot) -v, --verbose Verbose mode -D, --debug-file=[debugfile] Write debug information to given file -V, --version Display version information and exit -h, --help Display help and exit -C, --separator=[char] Separator for CSV created by operation list (Default Value: ,) --power-timeout=[seconds] Test X seconds for status change after ON/OFF (Default Value: 20) --shell-timeout=[seconds] Wait X seconds for cmd prompt after issuing command (Default Value: 3) --login-timeout=[seconds] Wait X seconds for cmd prompt after login (Default Value: 5) --power-wait=[seconds] Wait X seconds after issuing ON/OFF (Default Value: 0) --delay=[seconds] Wait X seconds before fencing is started (Default Value: 0) --retry-on=[attempts] Count of attempts to retry power on (Default Value: 1) ACTIONS
on Power on machine. off Power off machine. reboot Reboot machine. status This returns the status of the plug/virtual machine. list List available plugs with aliases/virtual machines if there is support for more then one device. Returns N/A otherwise. monitor Check the health of fence device metadata Display the XML metadata describing this resource. STDIN PARAMETERS
ipaddr IP Address or Hostname This parameter is always required. login Login Name passwd Login password or passphrase cmd_prompt Force Python regex for command prompt (Default Value: ['RSM>', 'MPC>', 'IPS>', 'TPS>', 'NBB>', 'NPS>', 'VMR>']) secure SSH connection port Physical plug number, name of virtual machine or UUID This parameter is always required. ipport TCP/UDP port to use for connection with device (Default Value: 23) inet4_only Forces agent to use IPv4 addresses only inet6_only Forces agent to use IPv6 addresses only passwd_script Script to retrieve password identity_file Identity file for ssh ssh_options SSH options to use action Fencing Action (Default Value: reboot) verbose Verbose mode debug Write debug information to given file version Display version information and exit help Display help and exit separator Separator for CSV created by operation list (Default Value: ,) power_timeout Test X seconds for status change after ON/OFF (Default Value: 20) shell_timeout Wait X seconds for cmd prompt after issuing command (Default Value: 3) login_timeout Wait X seconds for cmd prompt after login (Default Value: 5) power_wait Wait X seconds after issuing ON/OFF (Default Value: 0) delay Wait X seconds before fencing is started (Default Value: 0) retry_on Count of attempts to retry power on (Default Value: 1) fence_wti (Fence Agent) 2009-10-20 FENCE_AGENT(8)
All times are GMT -4. The time now is 08:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy