racadm安装请查看:http://www.cnblogs.com/zyd112/p/7611022.html
racadm语法(远程执行命令):
racadm -r <racIpAddr> -u <username> -p <password> <subcommand>
racadm -r <racIpAddr> -u <username> -p <password> get <devicename>.<groupname>.[<index>].[<objectname>]
racadm -r <racIpAddr> -u <username> -p <password> set <devicename>.<groupname>.[<index>].<objectname> <value>
参数介绍:
-r <racIpAddr>[ : <port number> ]
指定IDRAC IP,端口号默认是443
-u <username>
IDRAC用户名
-p <password>
IDRAC密码
-S
安全认证无效时停止命令执行(所有正常执行命令基本都包含无效认证安全警告,非需求时不要配置此选项)
-i
交互式登陆,手动输入账号密码;和-u、-p选项不能同时使用。
--nocertwarn
忽略认证相关警告信息
语法范例:
racadm -r 192.168.0.0 -u root -p xxxx getsysinfo
racadm -r 192.168.0.0 -u root -p xxxx set idrac.ssh.port 22
racadm -r 192.168.0.0 -u root -p xxxx --nocertwarn get idrac.ssh.port
racadm命令:
/admin1-> racadm help
help [subcommand] -- display usage summary for a subcommand
arp -- display the networking ARP table
clearasrscreen -- clear the last ASR (crash) screen
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
ifconfig -- display network interface information
netstat -- display routing table and network statistics
ping -- send ICMP echo packets on the network
racdump -- display RAC diagnostic information
racreset -- perform a RAC reset operation
racresetcfg -- restore the RAC configuration to factory defaults
serveraction -- perform system power management operations
setniccfg -- modify network configuration properties
sshpkauth -- perform SSH PK Auth. configuration for a user on the RAC
sslcertview -- view SSL certificate information
sslcsrgen -- generate a certificate CSR from the RAC
testemail -- test RAC e-mail notifications
testtrap -- test RAC SNMP trap notifications
usercertview -- view user certificate information
version -- display the version info of RACADM
vmdisconnect -- disconnect virtual media connections
vmkey -- perform virtual media key operations
常用命令汇总:
1.查看当前idrac设置
If you want to have information about your current server, type:
racadm getsysinfo
2.管理服务器电源
Connect to the Dell Remote Access Controller (Drac) IP address via SSH. Then execute:
racadm serveraction powerdown — Powers down the managed system.
racadm serveraction powerup — Powers up the managed system.
racadm serveraction 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.
racadm serveraction powerstatus — Displays the current power status of the server (“ON”, or “OFF”)
racadm serveraction 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.
3.重启idrac卡
If your Drac crashes for any reason, you may want to reset it:
racadm racreset
4.修改ip地址
To change NIC settings without rebooting:
racadm setniccfg -s 172.27.7.27 255.255.252.0 172.27.4.1
5.修改idrac密码
All Dell DRACs come with a default account set up as root / calvin which may be a security risk!
Having Drac5 or Drac6 and racadm installed on one of your servers, you can display your current admin account with this command:
racadm getconfig -g cfgUserAdmin -i 2
When you've made sure that this is the right account, you can change the password using the folling command:
The command for DRAC 5 and older:
racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 <newpassword>
The command for iDRAC 6 and newer:
racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 <newpassword>
6.远程执行命令
racadm -r 10.0.0.1 -u root -p xxxxxx getsysinfo
racadm -r 10.0.0.1 -u root -p xxxxxx getconfig -g cfgUserAdmin -i 2
racadm -r 10.0.0.1 -u root -p xxxxxx config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 <newpassword>