#!/usr/bin/perl -w use strict; use PowerEdge::RAC qw(prompt); my $ip = prompt('Enter the RAC card\'s IP address : ','192.168.1.122'); my $server = new PowerEdge::RAC(host => $ip); $| = 1; print "Printing system information as stored in the RAC\n"; print $server->sysinfo(); warn "\nPowering on the server with RAC at $ip\n"; warn "Press Ctrl-C within five seconds to abort !\n"; for (1..5) { print "."; sleep 1; }; unless ($server->is_powered_on()) { print "\n\nPowering on the server with RAC at $ip ... "; print $server->power_on(), "\n"; print "Waiting for the power to come on\n"; while(!$server->is_powered_on()) { print "."; sleep 1; }; print " system powered on\n\nPrinting the POST log\n"; print $server->post_log(); # Give the system some time to come up print "\nWaiting for the system to come up\n"; for (1..60) { print "."; sleep 1; }; }; print "\n\nSystem should be up by now\n\nPrinting the POST log\n"; print $server->post_log(); print "\nAll done.\n";