Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Nexus 7000 / 5000 : Running commands from script on Linux server

Hello

We have several scripts to get certain information from Catalyst 6500 , 4500 and 3750 swichtes. We use rcmd.

We're trying to modify those scripts so we can get information from New NExus 7000 (version 6.0(3)) and NExus 5548.

I'm afraid that Nexus don't support rcmd or rsh.

Is there any other way to run a command (for example "show interface ethernet 1/14 | include discard") from an external server so we can develop new scripts.

Thank you

Everyone's tags (3)
1 REPLY
Cisco Employee

Nexus 7000 / 5000 : Running commands from script on Linux server

Hi Seba.

I use expect to get outputs from boxes in the lab:

#!/usr/bin/expect #Where the script should be run from.

foreach x {nex1 nex2 nex3} {

set name $x

set user your_USERNAME

set password your_PASS

spawn telnet -K $name

expect "login:"

send "$user\n"

expect "Password:"

send "$password\n"

send "sh version | egrep kickstart:|system: \n"

send "exit\n"

interact

}

#done

HTH,

Alex

1073
Views
5
Helpful
1
Replies
CreatePlease to create content