Skip to content

Instantly share code, notes, and snippets.

@cmur2 cmur2/trafficMtr.sh
Last active Jan 1, 2016

Embed
What would you like to do?
#!/usr/bin/expect
set timeout 20
set name [lindex $argv 0]
set user [lindex $argv 1]
set password [lindex $argv 2]
spawn telnet $name
expect "login: "
send "$user\n"
expect "Password: "
send "$password\n"
expect "$ "
send "monitor/trafficMtr/summary wanId 1\n"
expect "Percentage of this Month's Limit"
expect "$ "
send "exit\n"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.