SLAC ESD Software Engineering Group
Stanford Linear Accelerator Center

RACADM

SLAC Computing
Software Engineering
Detailed
Unix
 

 

 


RACADM provides command line interfacet to the DRAC.

Located in /opt/dell/srvadmin/sbin

Standard Configuration of ALL iDrac

FILE:         /usr/local/admin/Drac/DRAC-Configs/Auto-config

 

#!/bin/bash

racadm set iDRAC.EmailAlert.1.Address "controls-system-admins@slac.stanford.edu"

racadm set iDRAC.EmailAlert.1.Enable Enabled

racadm set iDRAC.IPMILan.AlertEnable Enabled

racadm set iDRAC.IPMILan.1.Enable Enabled

racadm set idrac.NTPConfigGroup.NTP1 134.79.151.12
racadm set idrac.NTPConfigGroup.NTP2 134.79.151.13

racadm set idrac.time.timezone PST8PDT
racadm set idrac.NTPConfigGroup.NTPEnable 1


racadm set iDRAC.RemoteHosts.SMTPServerIPADDRESS 134.79.151.23

racadm set iDRAC.IPv4.DNS1 134.79.151.12

racadm set iDRAC.IPv4.DNS2 134.79.151.13

racadm set iDRAC.Syslog.Server1 134.79.151.40
racadm set iDRAC.Syslog.SyslogEnable Enabled

HOST=`uname -n`
racadm set iDRAC.NIC.DNSRacName "$HOST"
racadm set iDRAC.NIC.DNSDomainName slac.stanford.edu
racadm set System.LCD.LCDUserString "$HOST"

racadm set iDRAC.Snmp.AgentEnable Disabled

racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 1 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 2 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 3 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 4 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 5 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 6 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 7 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 8 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 9 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 10 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 11 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 12 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 13 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 14 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 15 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 16 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 17 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 18 0
racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 19 0
#racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 20 0
#racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 21 0
#racadm config -g cfgIpmiPef -o cfgIpmiPefAction -i 22 0


 

 


Connect to management port via SSH and perform racadm commands: (if web browser won't let you connect)

 

  • To login via SSH to management port to perform a system power cycle:
    • Connect to the Dell Remote Access Controller (Drac) IP address via SSH. Then execute:
      racadm serveraction <action>
      whereas you replace <action> with one of the following:

      • powerdown — Powers down the managed system.
      • powerup — Powers up the managed system.
      • powercycle — Issues a power-cycle operation on the managed system. This action is similar to pressing the power button on the system's front panel to power down and then power up the system.
      • powerstatus — Displays the current power status of the server ("ON", or "OFF")
      • hardreset — Performs a reset (reboot) operation on the managed system.

      So, to power off and back on your server, you just type racadm serveraction powercycle.

      If your Drac crashes for any reason, you may want to reset it: racadm racreset

      If you want to have information about your current server, type: racadm getsysinfo


Other Settings:

#test Email
/opt/dell/srvadmin/sbin/racadm testemail -i 1

#To create a config file

racadm getconfig -f racadm-config-file

racadm get -f "file.txt"


#To load a config file

racadm set -f "file.txt"
racadm config -f racadm-config-file

 

 

 

To change NIC settings without rebooting:

racadm setniccfg -s 172.27.7.27 255.255.252.0 172.27.4.1

 

[root@lcls-srv08 sbin]# ./racadm getniccfg

IPv4 settings:
NIC Enabled = 1
IPv4 Enabled = 1
DHCP Enabled = 0
IP Address = 172.27.7.27
Subnet Mask = 255.255.252.0
Gateway = 172.27.4.1

Set DNS:

 

racadm set iDRAC.IPv4.DNS1 134.79.151.12

racadm set iDRAC.IPv4.DNS2 134.79.151.13

 

To Reset a password:

 

 

[root@lcls-daemon2 ~]# racadm getconfig -g cfgUserAdmin -i 2
# cfgUserAdminIndex=2
cfgUserAdminUserName=root
# cfgUserAdminPassword=******** (Write-Only)
cfgUserAdminEnable=1
cfgUserAdminPrivilege=0x000001ff
cfgUserAdminIpmiLanPrivilege=4
cfgUserAdminIpmiSerialPrivilege=4
cfgUserAdminSolEnable=1


#[root@lcls-daemon2 ~]# racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 "Password"
#Object value modified successfully

racadm set iDRAC.Users.2.Password "PASSWORD"

 

Set IPMI

racadm config -g cfgIpmiLan -o cfgIpmiLanEnable 1

Set console to use Java

racadm config -g cfgRacTuning -o cfgRacTunePluginType 1

 


 

 

[root@lcls-srv08 sbin]# ./racadm help


help [subcommand] -- display usage summary for a subcommand
clearasrscreen -- clear the last ASR (crash) screen
closessn -- close a session
clrraclog -- clear the RAC log
clrsel -- clear the System Event Log (SEL)
config -- modify RAC configuration properties
coredump -- display the last RAC coredump
coredumpdelete -- delete the last RAC coredump
fwupdate -- update the RAC firmware
getconfig -- display RAC configuration properties
getniccfg -- display current network settings
getraclog -- display the RAC log
getractime -- display the current RAC time
getsel -- display records from the System Event Log (SEL)
getssninfo -- display session information
getsvctag -- display service tag information
getsysinfo -- display general RAC and system information
gettracelog -- display the RAC diagnostic trace log
krbkeytabupload -- upload kerberose keytab file to the RAC
localconredirdisable -- disable the Virtual Console from a local Console
racreset -- perform a RAC reset operation
racresetcfg -- restore the RAC configuration to factory defaults
remoteimage -- Makes a remote ISO image available to the server
serveraction -- perform system power management operations
setniccfg -- modify network configuration properties
sshpkauth -- manage SSH PK authentication keys on the RAC
sslcertdownload -- download an SSL certificate from the RAC
sslcertupload -- upload an SSL certificate to the RAC
sslcertview -- view SSL certificate information
sslcsrgen -- generate a certificate CSR from the RAC
sslkeyupload -- upload an SSL key to the RAC
testemail -- test RAC e-mail notifications
testtrap -- test RAC SNMP trap notifications
usercertupload -- upload an user certificate to the DRAC
usercertview -- view user certificate information
version -- display the version info of RACADM
vflashpartition -- manage partitions on the vFlash SD card
vflashsd -- perform vFlash SD Card initialization
vmdisconnect -- disconnect Virtual Media connections

 

 

 

 

 

 

 

 

 

 

 

 

racadm help setniccfg
setniccfg -- modify network configuration properties

Usage:

racadm setniccfg -d
racadm setniccfg -d6
racadm setniccfg -o
racadm setniccfg -s <ipv4_address> <subnetmask> <ipv4_gateway>
racadm setniccfg -s6 <ipv6_address> <prefix_length> <ipv6_gateway>

-d : enable DHCP
-d6 : enable DHCP6
-o : enable/disable NIC
-s : enable static IPv4 address and set parameters
-s6 : enable static IPv6 address and set parameters

 

 

 

Following is for Dell RAC 6 -

If you lose root password for racadm then reset to factory defaults, configure network, change password.

 

# racadm racresetcfg

 

Default user name – root. Default dell password calvin

 

# racadm setniccfg –s  172.27.7.52   255.255.252.0   172.27.4.1

Static IP configuration enabled and modified successfully

 

Now you can logon over web using default user name  root. Default dell password calvin

 

 

# racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2  "ourpassword_in_quotes"

Object value modified successfully

 

 

 

 


[SLAC ESD Software Engineering Group][ SLAC Home Page]


Author: Ken Brobeck

Modified: 04-Jan-2016