Thursday, January 31, 2019

Oracle ILOM Quick Reference for CLI Commands

This article contains information about common Oracle ILOM 4.0.x CLI commands.

System Information and Management

Table 1  System Information and Management Commands
Task
CLI Command
Show Oracle ILOM version
version
Show system information
show /System model part_number serial_number
Show x86 BIOS version (legacy BIOS platforms)
show /System/BIOS version
Show x86 BIOS version (UEFI BIOS platforms)
show /System/Firmware/Other_Firmware/ Firmware_1 version
Show SPARC system firmware version
show /System sys_fw_version
Show SP IP address
show /System ilom_address
Show SP MAC address
show /System ilom_mac_address
Show host MAC address
show /System host_primary_mac_address
Turn on the Locator LED
set /System locator_indicator=on
Turn off the Locator LED
set /System locator_indicator=off

Host and System Control

Table 2  Host and System Control Commands
Task
CLI Command
Power on the server
start /System
Power off the server
stop [-force] /System
Power cycle the server
reset /System
Redirect host console stream to Oracle ILOM
start /HOST/console
Force PXE boot on next boot (x86 only)
set /HOST boot_device=pxe
Force boot to CD-ROM or DVD on the next boot (x86 only)
set /HOST boot_device=cdrom
Setting diagnostic tests to run.
Use the /HOST/diag target to set diagnostic tests.
Use the help command to determine the host diagnostic properties supported on the server.
help /HOST/diag

Oracle ILOM Initial Setup

Table 3  Oracle ILOM Initial Setup Commands
Task
CLI Command
Show network configuration
show /SP/network
Configure static IPv4 address
set /SP/network pendingipdiscovery=static pendingipaddress=address pendingipnetmask=netmask pendingipgateway=address commitpending=true
Configure static IPv6 address
set /SP/network/ipv6 state=enabled pending_static_ipaddress=ipv6address
set /SP/network commitpending=true
Enable DHCP
set /SP/network pendingipdiscovery=dynamic commitpending=true
Set the Oracle ILOM host name
set /SP hostname=hostname
Set the system identifier
set /SP system_identifier=identifier
Create user account with all privileges
create /SP/users/newusername role=aucro [password=password]
Create user account with host operator privileges
create /SP/users/newusername role=cro [password=password]
Create read-only user account
create /SP/users/newusername role=o [password=password]
Delete user account
delete /SP/users/username
Override DNS servers retrieved from DHCP
set /SP/clients/dns auto_dns=disabled nameserver=nameserver1,nameserver2 searchpath=searchpath1,searchpath2
Set the Oracle ILOM date and time
set /SP/clock datetime=MMDDhhmmYYYY.ss
Configure an NTP server
set /SP/clients/ntp/server/1 address=address
set /SP/clock usentpserver=enabled
Change the external serial port speed
set /SP/serial/external pendingspeed=9600|19200|38400|57600|115200 commitpending=true

System Monitoring and Status

Table 4  System Monitoring and Status Commands
Task
CLI Command
Check the overall system health
show /System health
List all open hardware problems
show /System/Open_Problems
Show the Oracle ILOM System Log
show /System/Logs/list
Show cooling summary information
show /System/Cooling
Show actual system power consumption
show /System actual_power_consumption
Show the Oracle ILOM Event Log
show /SP/logs/event/list
Show the Oracle ILOM Audit Log
show /SP/logs/audit/list
Configure an SNMP trap destination
set /SP/alertmgmt/rules/1 type=snmptrap snmp_version=1 level=minor destination=ipaddress destination_port=portcommunity_or_username=community

System Inventory

Table 5  System Inventory Commands
Task
CLI Command
List information about all DIMMs
show -level all -output table /System/Memory/DIMMs
List information about all CPUs
show -level all -output table /System/Processors/CPUs
List information about all power supplies
show -level all -output table /System/Power/Power_Supplies
List information about all hard disks
show -level all -output table /System/Storage/Disks

Oracle ILOM Maintenance

Table 6  Oracle ILOM Maintenance Commands
Task
CLI Command
Update Oracle ILOM firmware
load -source URI /SP/firmware
Reset Oracle ILOM SP
reset /SP

Oracle ILOM Configuration Management

Table 7  Oracle ILOM Configuration Management
Task
CLI Command
Reset Oracle ILOM configuration to factory defaults
set /SP reset_to_defaults=all
Back up Oracle ILOM configuration to a file
dump -destination URI /SP/config
Restore Oracle ILOM configuration from a file
load -source URI /SP/config

Oracle ILOM Help

Table 8  Oracle ILOM Help Commands
Task
CLI Command
View all CLI targets for the system in any part of the CLI
help targets
View help for targets or properties
help target property

Check the Power State of the Server or Host (Oracle ILOM)


  1. Log in to Oracle ILOM.
  2. Determine if the system or domain has power.
  • To check the power status of a domain on a single-domain server, at the Oracle ILOM prompt, type:
-> show /System power_state
  • To show the power state for a specific domain, at the Oracle ILOM prompt, type:
-> show /Servers/PDomains/PDomain_x/HOST power_state

Wednesday, January 30, 2019

How to find directory with highest number of files/inodes


You can use below command to find directory with highest number of files/inodes in case you run up to an issue where file system inode usage is high or 100% causing OS level issues:

# find / -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n

How to reset root password in Red Hat Enterprise Linux? (RHEL 4/5/6)

If system is still accessible as root (i.e. if root user is able to login to the system), then root password can be reset by simply executing the following command :

# passwd

It will ask to enter the new password and thus it can be reset. 

If it is not possible to login as root, boot in to the Single User mode for changing the root password.
Follow the instruction given below to achieve this:
  • Reboot the system and when grub prompt appears, press e to edit and select the kernel line. 
  • After selecting the kernel line, press e again to edit append 1 at the end of that line. 
  • Once done, press Esc and then press b to boot. 
  • The system will boot into single user mode, and execute passwd command there to change the root password. 
  • If that does not work properly, instead of appending '1' on the kernel line, put the word single or the letter s.

Reset the Server Using Oracle ILOM

  1. Log in to the Oracle ILOM web interface or command-line interface (CLI) with an account with admin role privileges.
  2. To reset the server from the web interface:
    • In the left pane, click Host Management → Power Control, and select Reset from the Select Action list box.
    • Click Save, and then click OK.
    • The server resets. 
  3. From the CLI:
    • Type the following command:
      • reset /System
    • When prompted, type y to confirm:
      • Are you sure you want to reset /System (y/n)? y
    • Performing hard reset /System