วันอาทิตย์ที่ 10 กุมภาพันธ์ พ.ศ. 2562
idrac CLI
# power server off
racadm serveraction powerdown
# power server on
racadm serveraction powerup
# perform server power cycle
racadm serveraction powercycle
# force hard server power reset
racadm serveraction hardreset
# display current power status of server
racadm serveraction powerstatus
expect ssh to output file
#!/usr/bin/expect -f
set user "root"
set password "toor"
set ip "10.0.0.88"
spawn ssh $user@$ip
expect "password:"
sleep 1
send "$password\r"
expect ">" {send "racadm getsysinfo\r"} >/home/ssh.txt
expect ">" {send "exit\r"}
set output [open "outputfile.txt" "a+"]
set outcome $expect_out(buffer)
puts $output $outcome
close $output
expect EOF
set user "root"
set password "toor"
set ip "10.0.0.88"
spawn ssh $user@$ip
expect "password:"
sleep 1
send "$password\r"
expect ">" {send "racadm getsysinfo\r"} >/home/ssh.txt
expect ">" {send "exit\r"}
set output [open "outputfile.txt" "a+"]
set outcome $expect_out(buffer)
puts $output $outcome
close $output
expect EOF
สมัครสมาชิก:
บทความ (Atom)