Last active
March 26, 2023 13:58
-
-
Save nyerup/7689129 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# | |
# Uses ipmitool(1) to display a string of text on | |
# the front chassis display of Dell PowerEdge | |
# servers. | |
# | |
# Jesper Nyerup <[email protected]> | |
my $ipmitool = '/usr/bin/ipmitool'; | |
my @chararray = split(//, join(' ', @ARGV)); | |
usage() if (@chararray == 0 or @chararray > 14); | |
system("$ipmitool raw 0x6 0x58 193 0x0 0x0 ". | |
sprintf('0x%x ', scalar(@chararray)). | |
join(' ', map { sprintf('0x%x', ord($_)) } @chararray)); | |
system("$ipmitool raw 0x6 0x58 0xc2 0x0 0x0 ". | |
"0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0"); | |
sub usage { | |
print <<EOF; | |
Usage: $0 <string> | |
Max. 14 characters | |
EOF | |
exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On newer devices you can even use
racadm set System.LCD.UserDefinedString "foobar"