HP 2000fc Hp StorageWorks 2000 Family Modular Smart Array CLI reference guide - Page 17
exits the CLI, session, logs into the CLI, executes a command to show free disks,
View all HP 2000fc manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 17 highlights
The following example shows the Perl Expect script showfree.exp that starts a telnet session, logs into the CLI, executes a command to show free disks, and exits the CLI: #!/usr/bin/expect set login [lindex $argv 1] set password [lindex $argv 2] set host [lindex $argv 3] set command [lindex $argv 4] spawn telnet $host expect "Login:" send "$login\r" expect "Password:" send "$password\r" send "$command\r" send "exit" expect eof The following shows a possible result of executing this script: $:./showfree.exp monitor !monitor 172.22.4.245 "show disks free" Login: monitor Password: ******** product System Name: Test System Location: Lab Version: version # show disks free ID Serial# Vendor Rev. State Type Size(GB) Rate(Gb/s) SP 3 3KN0Z0BZ00007626NM4F SEAGATE 0003 AVAIL SAS 146 3.0 6 VDK41BT4CVLPNE ATA A9BA AVAIL SATA 250 3.0 7 3KN0Z6PD00007626NLV5 SEAGATE 0003 AVAIL SAS 146 1.5 10 3KN0Z09500007626NM28 SEAGATE 0003 AVAIL SAS 146 3.0 # exit Chapter 1 Using the CLI 17