Saturday, April 16, 2016

RHEL7 - Creating virtual interface

 Creating virtual interface

[root@sam network-scripts]# cd /etc/sysconfig/network-scripts
[root@sam network-scripts]# cp -p cfg-enp0s25 ifcfg-enp0s25:0
[root@sam network-scripts]# vi ifcfg-enp0s25:0
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME=enp0s25:0
UUID=2a0b8f3c-e991-4a09-88a8-6fdefe273193
DEVICE=enp0s25:0
ONBOOT=yes
IPADDR=192.168.10.9
PREFIX=24
GATEWAY=192.168.10.1
DNS1=192.168.10.110
DOMAIN=expanor.local
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=no
~
~
~

[root@sam network-scripts]# systemctl restart network

[root@sam network-scripts]# ifconfig -a
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.8  netmask 255.255.255.0  broadcast 192.168.10.255
        inet6 fe80::223:aeff:feb0:320c  prefixlen 64  scopeid 0x20<link>
        ether 00:23:ae:b0:32:0c  txqueuelen 1000  (Ethernet)
        RX packets 4428211  bytes 6120463158 (5.7 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1943017  bytes 140766095 (134.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 21  memory 0xf7ae0000-f7b00000

enp0s25:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.10.9  netmask 255.255.255.0  broadcast 192.168.10.255
        ether 00:23:ae:b0:32:0c  txqueuelen 1000  (Ethernet)
        device interrupt 21  memory 0xf7ae0000-f7b00000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 9668  bytes 985822 (962.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9668  bytes 985822 (962.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@sam network-scripts]# ping  -c 3 192.168.10.9
PING 192.168.10.9 (192.168.10.9) 56(84) bytes of data.
64 bytes from 192.168.10.9: icmp_seq=1 ttl=64 time=0.077 ms
64 bytes from 192.168.10.9: icmp_seq=2 ttl=64 time=0.032 ms



[root@sam network-scripts]# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:23:ae:b0:32:0c brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.8/24 brd 192.168.10.255 scope global enp0s25
       valid_lft forever preferred_lft forever
    inet 192.168.10.9/24 brd 192.168.10.255 scope global secondary enp0s25:0
       valid_lft forever preferred_lft forever
    inet6 fe80::223:aeff:feb0:320c/64 scope link
       valid_lft forever preferred_lft forever
[root@sam network-scripts]#


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


 1031  cd /etc/sysconfig/network-scripts/
 1032  pwd
 1033  ls
 1034  cp ifcfg-enp0s3 ifcfg-enp0s3:0
 1035  vi ifcfg-enp0s3:0
 1036  more ifcfg-enp0s3:0
 1037  systemctl restart network
 1038  ifconfig
 1039  ifcofig -a
 1040  ifconfig -a
 1041  vi ifcfg-enp0s3:0
 1042  ls
 1043  ifconfig ifcfg-enp0s3:0 plumb
 1044  ifconfig enp0s3:0 plumb
 1045  ifconfig -a
 1046  systemctl restart network
 1047  ifconfig -a
 1048  ip addr show
 1049  ls
 1050  more ifcfg-enp0s3:0
 1051  ifconfig enp0s3:0 plumb
 1052  ip addr show
 1053  ifconfig enp0s3:0 192.168.10.19 up
 1054  ifconfig -a
 1055  history
[root@sudhir network-scripts]#

Tuesday, April 12, 2016

RHEL7 - How to mount RHEL7 OS ISO Image file

How to mount RHEL7 OS image file

1. Create a mountpoint
# mkdir /rhel7

2. For temporarily mounting
# mount -o loop /opt/OS_Image/rhel-server-7.2-x86_64-dvd.iso /rhel7
mount: /dev/loop0 is write-protected, mounting read-only

3. Verify your mount
# df -h /rhel7
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      3.8G  3.8G     0 100% /rhel7

4. Unmount
# umount /rhel7

5. To survive reboots, add entry to fstab
# cp -p /etc/fstab /etc/fstab.bk-up
# cat >>/etc/fstab
/opt/OS_Image/rhel-server-7.2-x86_64-dvd.iso    /rhel7  iso9660 defaults,loop   0 0

6. Mount the mountpoint. Since you have entry to fstab, you can just mount with mountpoint.
# mount /rhel7
mount: /dev/loop0 is write-protected, mounting read-only

7. Verify the mount
# df -h /rhel7
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0      3.8G  3.8G     0 100% /rhel7



Thursday, April 7, 2016

Solaris - basic SPARC M7 server login setup info

basic SPARC M7 server login setup info


Connect terminals or a terminal emulators (PC or workstation) to the two serial
connections.

Configure the terminal or terminal emulator with these settings:

Parameter Setting
-----------------
Connector: SER MGT
Rate: 9600 baud
Parity: None
Stop bits:  1
Data bits: 8



Determine which terminal or terminal emulator is connected to the Active SP.
While both terminals display Oracle ILOM login prompts, the terminal connected to the Active
SP displays system status messages while the Oracle ILOM firmware initializes.


Log in to the Active SP as root user with the changeme password.

ORACLE-SPX-SPMX-XXXXXXXXXX login: root
Password: changeme



Confirm that you are connected to the Active SP.
-> show /SP/redundancy status
status = Active



 If the command displays status = Active, you are logged in to the Active SP.

 If the command displays status = Standby, you are logged in to the Standby SP.
Type exit to log out of the Standby SP, and then log in to the Active SP using the other
terminal or terminal emulator.

 If the command displays status = Standalone, you are logged in to the Active SP, but the
Standby SP has failed to respond or has failed to join the network.


The SPs do not support DHCP. Assign static network addresses to SP0, SP1, and Active_SP so that you can access the Oracle ILOM firmware over a network connection, either using the web interface or the command line interface.


SP Component Description
SP0 The NET MGT 0 port on SP0.
SP1 The NET MGT 0 port on SP1.
Active_SP The IP address for the Active SP. If the Active SP fails, the Standby SP will be assigned this
address.
HOST0 The IP address for the PDomain0-SPM host.
HOST1 The IP address for the PDomain1-SPM host (if your SPARC M7-8 or SPARC M7-16 server
configuration includes two or more PDomains).
HOST2 The IP address for the PDomain2-SPM host (if your SPARC M7-16 server configuration includes three or more PDomains).
HOST3 The IP address for the PDomai


Set Oracle ILOM Network Addresses (IPv4)


1. Confirm that you are logged in to the Active SP.

2. Set the gateway IP address for all SP addresses.
-> set /SP/network pendingipgateway=xxx.xxx.xxx.xxx
Set "pendingipgateway" to "xxx.xxx.xxx.xxx"


3. Set the netmask IP address for all SP addresses.
-> set /SP/network pendingipnetmask=255.255.255.0
Set "pendingipnetmask" to "255.255.255.0"



This example uses 255.255.255.0 to set the netmask. Your network environment subnet might
require a different netmask. Use a netmask number most appropriate to your environment.




4. Assign the required IP addresses for the SP components.
* SP0:
-> set /SP/network/SP0/ pendingipaddress=xxx.xxx.xxx.xxx
Set "pendingipaddress" to "xxx.xxx.xxx.xxx"
* SP1:
-> set /SP/network/SP1/ pendingipaddress=xxx.xxx.xxx.xxx
Set "pendingipaddress" to "xxx.xxx.xxx.xxx"
* Active SP:
-> set /SP/network/ACTIVE_SP/ pendingipaddress=xxx.xxx.xxx.xxx
Set "pendingipaddress" to "xxx.xxx.xxx.xxx"
* Assign one address for each PDomain SPM:
-> set /SP/network/HOSTx/ pendingipaddress=xxx.xxx.xxx.xxx
Set "pendingipaddress" to "xxx.xxx.xxx.xxx"



Verify that you have set the network addresses correctly.
For brevity, this SPARC M7-16 server example shows only the output for the IP address
properties.
-> show /SP/network -level 2 -output table pendingipaddress pendingipnetmask
 pendingipgateway


6. Type the following command to make the new addresses take affect.
-> set /SP/network commitpending=true


7. Display the IP addresses to confirm that they have been updated.
-> show /SP/network -level 2 -output table ipaddress ipnetmask ipgateway



Power On a Server PDomain for the First Time



1. Confirm that you are logged in to the Active SP through a serial connection.


2. Log in to the Active SP as a root user through a network connection.
$ ssh root@Active-SP-IP-address


3. Using the network connection, connect to the PDomain console to view the
messages.
-> start /Servers/PDomains/PDomain_x/HOST/console
Are you sure you want to start /Servers/PDomains/PDomain_x/HOST/console (y/n) y



4. Using the serial connection, power on the PDomain.
-> start /Servers/PDomains/PDomain_x/HOST


Replace x with the PDomain number.
The PDomain initialization can take time to complete


5. (Optional) To display the status of the initialization, type the following command.
-> show /Servers/PDomains/PDomain_x/HOST status

6. Wait until the console displays the OpenBoot ok prompt after the PDomain has
completed the POST diagnostics.




To set boot-device
{ok} setenv boot-device /pci@301/pci@1/nvme@0/disk@1:a


4. List the network devices in the PDomain.

ok show-nets


Set the primary network device.

ok nvalias net /pci@306/pci@1/network@0


Boot the PDomain to start the Oracle Solaris OS configuration.
ok boot


Solaris 10 - Hard Partitioning With Oracle VM Server for SPARC


Hard Partitioning With Oracle VM Server for SPARC


Introduction
This document describes hard partitioning with Oracle VM Server for SPARC, and how to use it to conform to the Oracle licensing policies for partitioned environments.


CPU Cores and CPU Threads


Oracle VM Server for SPARC software runs on SPARC servers. Each SPARC processor has multiple CPU cores, and each CPU core has multiple CPU threads (virtual CPUs). By default, domains created with Oracle VM Server for SPARC are configured in units of CPU threads. Oracle VM Server for SPARC uses CPU affinity to try to assign each domain’s virtual CPUs on its own cores for optimal performance. This can be made mandatory by using the “whole core constraint” to require that CPUs are assigned in units of entire CPU cores. When binding such a domain, the system provisions the specified number of CPU cores and all their CPU threads to the domain.
For a list of supported SPARC systems and more information about CPU whole-core configurations, see the Release Notes and Administration Guide of Oracle VM Server for SPARC Documentation.
Hard Partitioning and CPU Whole Cores
Beginning with the Oracle VM Server for SPARC 2.0 release, hard partitioning is enforced by using CPU whole-core configurations and specifying the maximum number of cores that can be assigned to the domain. In this case, domains are configured with CPU whole cores, instead of the default of individual CPU threads. Using a whole-core configuration and setting a maximum CPU cap limits the number of CPU cores that can be dynamically assigned to a bound or active domain.
Hard Partitioning With Oracle VM Server for SPARC

Oracle Hard Partition Licensing
To conform to the Oracle hard partition licensing requirement, you must use at least Oracle VM Server for SPARC 2.0 release and must use CPU whole cores as follows:
 If a domain runs applications using Oracle hard partition licensing, that domain must be configured with CPU whole cores, and the CPU cap (maximum number of CPU cores) must be set for the domain. The CPU cap must be the number of CPU cores that is specified by the Oracle software license.
 If a domain does not run applications that use Oracle hard partition licensing, that domain does not need to be configured with CPU whole cores or a CPU cap. For example, if you do not run any Oracle applications in a domain, that domain does not need to be configured with CPU whole cores or a CPU cap.
Hard Partitioning With Oracle VM Server for SPARC


Checking the Configuration of a Domain
To Check Whether a Domain is Configured With CPU Whole Cores and a CPU Cap
1. Obtain the resources management information for the domain.
# ldm list -o resmgmt domain
Verify that the whole-core constraint appears in the output and that the max-cores keyword specifies the maximum number of CPU cores configured for the domain.
For more information, see the ldm(1M) man page of the Reference Manual in the Oracle VM Server for SPARC Documentation.
EXAMPLE – Checking Whether a Domain Is Configured With CPU Whole Cores and a CPU Cap
The following command shows that ldg1 domain is configured with CPU whole cores and a maximum of five cores:
# ldm list -o resmgmt ldg1
NAME ldg1
 CONSTRAINT
     whole-core
     max-cores=5
To List the CPU Cores That Are Assigned to a Domain
CPU cores are assigned to a domain when a domain is bound.
1. Obtain the list of CPU cores that are assigned to a domain.
# ldm list -o core domain
EXAMPLE – Listing the CPU Cores That Are Assigned to a Domain
The following command shows the cores that are assigned to domain ldg1:
# ldm list -o core ldg1
NAME ldg1
CORE
CID PCPUSET
1 (8, 9, 10, 11, 12, 13, 14, 15)
2 (16, 17, 18, 19, 20, 21, 22, 23)


Configuring a Domain With CPU Whole Cores and a CPU Cap
Use the following commands to configure a domain to use CPU whole cores and set the maximum number of CPU cores (CPU cap) for the domain:
ldm set-core number-of-cpu-cores domain
ldm set-domain max-cores=max-number-of-cpu-cores domain
If you are using version 2.0 or 2.1 of the Logical Domains Manager to assign whole cores to domains, the ldm add-core, ldm set-core, ldm remove-core, and ldm set-domain max-core commands are not available. Instead, you must use the ldm add-vcpu –c, ldm set-vcpu –c, and ldm remove-vcpu –c commands. These commands also set the CPU cap for the domain. See the ldm(1M) man page of the Reference Manual in the Oracle VM Server for SPARC Documentation.
To Create a New Domain With CPU Whole Cores and a CPU Cap
When creating a new domain, you can configure it to use CPU whole cores.
1. Create the domain.
# ldm create domain
2. Set the number of CPU whole cores and the CPU cap for the domain.
# ldm set-core number-of-cpu-cores domain
# ldm set-domain max-cores=max-number-of-cpu-cores domain
3. Configure the domain.
Caution –During this configuration, do not use the ldm add-vcpu, ldm set-vcpu or ldm rm-vcpu command. If you do so, the domain is reconfigured with individual CPU threads instead of CPU whole cores. Ensure that you use the ldm add-core, ldm set-core, or ldm remove-core command, or the –c option of the ldm add-vcpu, ldm set-vcpu or ldm rm-vcpu command if you use version 2.0 or 2.1 of Logical Domains Manager.
4. Bind and start the domain.
# ldm bind domain
# ldm start domain

EXAMPLE – Creating a New Domain With Two CPU Whole Cores and a CPU Cap of Two Cores
This example shows how to create a domain, ldg1, with two CPU whole cores. The following command creates the ldg1 domain:
# ldm create ldg1
The following commands configure the ldg1 domain with two CPU whole cores and set the CPU cap to two cores:
# ldm set-core 2 ldg1
# ldm set-domain max-cores=2 ldg1
At this point, you can perform further configuration of the domain subject to the restrictions described in Step 3 of the previous procedure. Before you use the ldg1 domain, you must bind and start it, which is done by the following commands:
# ldm bind ldg1
# ldm start ldg1
To Configure an Existing Domain With CPU Whole Cores and a CPU Cap
If a domain already exists and is configured to use CPU threads, you can change its configuration to use CPU whole cores and a CPU cap.
1. Stop and unbind the domain. This step is not needed to configure the domain to use CPU whole cores; it is only needed to set the CPU cap.
# ldm stop domain
# ldm unbind domain
2. Set the number of CPU whole cores for the domain and set the CPU cap.
# ldm set-core number-of-cpu-cores domain
# ldm set-domain max-cores=max-number-of-cpu-cores domain
3. Rebind and restart the domain if it was stopped in step 1.
# ldm bind domain
# ldm start domain
EXAMPLE – Configuring an Existing Domain With Four Whole Cores and a CPU Cap of Eight Cores
This example shows how to update the configuration of an existing domain, ldg1. Four CPU whole cores are configured for the domain and the CPU cap is set to eight cores. This enables you to add up to four more whole cores to the domain, if needed.

The following commands stop and unbind the ldg1 domain:
# ldm stop ldg1
# ldm unbind ldg1
The following commands configure the ldg1 domain with four CPU whole cores and set the CPU cap to eight. Note that the ldm set-core command can be done while the domain is active.
# ldm set-core 4 ldg1
# ldm set-domain max-cores=8 ldg1
The following commands bind and restart the ldg1 command:
# ldm bind ldg1
# ldm start ldg1
To Configure the Primary Domain With CPU Whole Cores and a CPU Cap
If the primary domain is configured to use CPU threads, you can change its configuration to use CPU whole cores and a CPU cap.
1. Set the number of CPU whole cores for the primary domain.
# ldm set-core number-of-cpu-cores primary
2. Put the primary domain in delayed reconfiguration mode. This step is not needed to change the domain to use whole cores, but it is needed in order to set a CPU cap.
# ldm start-reconf primary
3. Set the CPU cap for the primary domain.
# ldm set-domain max-cores=max-number-of-cpu-cores primary
4. Reboot the primary domain.
Use the appropriate procedure to reboot the primary domain, which depends on the system configuration. See “Rebooting the primary Domain” in the Administration Guide of the Oracle VM Server for SPARC Documentation.
EXAMPLE – Configuring the Primary Domain With Two Whole Cores and a CPU Cap of Two Cores
This example shows how to configure CPU whole cores on the primary domain. First, the following command specifies the number of CPU whole cores to assign to the primary domain:
# ldm set-core 2 primary
The following command initiates delayed reconfiguration mode on the primary domain:
# ldm start-reconf primary
The following command configures the CPU cap for the primary domain to two:

# ldm set-domain max-cores=2 primary
The following command reboots the primary domain:
# shutdown -i 6

Interaction With Other Features
CPU Dynamic Reconfiguration
You can use CPU dynamic reconfiguration with domains that are configured with CPU whole cores. However, you can only add or remove entire CPU cores, not individual CPU threads. Using CPU dynamic reconfiguration in this way maintains the hard partitioning of the system. In addition, when you dynamically add CPU cores to a domain, the command fails if it exceeds the maximum number of CPU cores for the domain.
Use the following commands to dynamically add, set, or remove CPU whole cores to a bound or active domain:
ldm add-core number-of-cpu-cores domain
ldm set-core number-of-cpu-cores domain
ldm remove-core number-of-cpu-cores domain
To conform to the Oracle licensing policy requirements, you must set the CPU cap by using the following command:
ldm set-domain max-cores=max-number-of-cpu-cores domain
Or, if you use version 2.0 or 2.1 of Logical Domains Manager, use the ldm add-vcpu –c, ldm set-vcpu –c, and ldm remove-vcpu –c commands for dynamic reconfiguration. These commands also set the CPU cap.
EXAMPLE – Dynamically Adding Two CPU Whole Cores to a Domain
This example shows how to dynamically add two CPU whole cores to domain ldg1, which is an active domain configured with CPU whole cores. The first command shows that the ldg1 domain is active. The second command shows that the ldg1 domain is configured with CPU whole cores, and a maximum of four CPU cores.
# ldm list ldg1
NAME STATE FLAGS CONS VCPU MEMORY UTIL UPTIME
ldg1 active -n---- 5000 16 2G 0.4% 5d 17h 49m
# ldm list -o resmgmt ldg1
NAME
ldg1
 CONSTRAINT
     whole-core
     max-cores=4

The following command shows the CPU cores assigned to the domain before adding two CPU whole cores:
# ldm list -o core ldg1
NAME
ldg1
CORE
CID PCPUSET
1 (8, 9, 10, 11, 12, 13, 14, 15)
2 (16, 17, 18, 19, 20, 21, 22, 23)
The following command dynamically adds two CPU whole cores to the ldg1 domain. This is permitted because the total number of cores does not exceed the maximum of four:
# ldm add-core 2 ldg1
The following command shows the CPU cores assigned to the domain after adding two CPU whole cores:
# ldm list -o core ldg1
NAME ldg1
CORE
CID PCPUSET
1 (8, 9, 10, 11, 12, 13, 14, 15)
2 (16, 17, 18, 19, 20, 21, 22, 23)
3 (24, 25, 26, 27, 28, 29, 30, 31)
4 (32, 33, 34, 35, 36, 37, 38, 39)


CPU Dynamic Resource Management
If Dynamic Resource Management (DRM) is used to automatically manage CPU resources on some domains, DRM policies do not apply to those domains that are configured with CPU whole cores.
A DRM policy can include a domain that is configured with CPU whole cores. However, when such a policy is activated, the DRM policy is automatically disabled for that domain, which remains configured with CPU whole cores. If the domain is later reconfigured with CPU threads instead of CPU whole cores, the DRM policy is automatically re-enabled for that domain.
CPU Power Management
You can use CPU power management on domains that have either the performance or elastic policy set and configure the domains with CPU whole cores. Using CPU power management maintains the hard partitioning of the system.

Domain Reboot or Rebind
A domain that is configured with CPU whole cores remains configured with CPU whole cores when it is restarted, or if the entire platform is restarted. A domain uses the same physical CPU cores for the entire time it remains bound. For example, if a domain is rebooted, it uses the exact same physical CPU cores both before and after the reboot. Or, if the entire platform is powered off while a domain is bound, that domain will be configured with the exact same physical CPU cores when the platform is powered on again. If you unbind a domain and then rebind it, or if the entire platform is restarted with a new configuration, the domain might use different physical CPU cores.


Domain Migration
Starting with Oracle VM Server for SPARC 3.0, CPU whole-core configuration is compatible with domain migration. You can migrate a domain that is configured with CPU whole cores, and whole core allocation is enforced on the target system. Maximum CPU cores, if set, are also enforced on the target system. In prior releases, the whole-core configuration and the maximum number of CPU cores are not preserved by the migration to the target system.
Live migration of guest domains with whole cores and a CPU cap does not conform to the terms of the hard partitioning license.


Conclusion
With the Oracle VM Server for SPARC software, you must use the whole-core constraint and the CPU cap constraint to conform to the Oracle hard partition licensing requirement. In such a case, domains are configured with CPU whole cores, instead of the default of individual CPU threads. Using a CPU whole-core configuration with the CPU cap set also adds some restrictions to features, such as CPU dynamic reconfiguration beyond the CPU cap, CPU dynamic resource management, and domain migration.
For more information about Oracle's virtualization solutions, visit oracle.com/virtualization.


Source: http://www.oracle.com/technetwork/server-storage/vm/ovm-sparc-hard-partitioning-1403135.pdf

Wednesday, April 6, 2016

Solaris - Problem with Oracle database


 
If you have Oracle database problems:

1. Login to the server and check database and listener running.

# ps -ef|grep pmon|grep -v grep ## Verify Oracle database process
# ps -ef|grep tnslsnr|grep -v grep ## Verify Oracle listener process


2. On Oracle Enterprise Manager Grid Control check and verify no target or database down.

3. On Oracle Enterprise Manager Grid Control, select tab Targets and verify the target is in good status.

Note the server shows status up   .

4. In Oracle Enterprise Manager Grid Control select tab Databases and verify the target is in good status:

Note the database status shows up   .


Monday, April 4, 2016

SHUTTING DOWN, SUSPENDING, AND HIBERNATING THE SYSTEM

source: - https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Power.html

8.4. SHUTTING DOWN, SUSPENDING, AND HIBERNATING THE SYSTEM

In Red Hat Enterprise Linux 7, the systemctl utility replaces a number of power management commands used in previous versions of the Red Hat Enterprise Linux system. The commands listed in Table 8.8, “Comparison of Power Management Commands with systemctl” are still available in the system for compatibility reasons, but it is advised that you use systemctl when possible.
Table 8.8. Comparison of Power Management Commands with systemctl
Old CommandNew CommandDescription
haltsystemctl haltHalts the system.
poweroffsystemctl poweroffPowers off the system.
rebootsystemctl rebootRestarts the system.
pm-suspendsystemctl suspendSuspends the system.
pm-hibernatesystemctl hibernateHibernates the system.
pm-suspend-hybridsystemctl hybrid-sleepHibernates and suspends the system.

8.4.1. Shutting Down the System

The systemctl utility provides commands for shutting down the system, however the traditional shutdown command is also supported. Although the shutdown command will call the systemctl utility to perform the shutdown, it has an advantage in that it also supports a time argument. This is particularly useful for scheduled maintenance and to allow more time for users to react to the warning that a system shutdown has been scheduled. The option to cancel the shutdown can also be an advantage.

Using systemctl Commands

To shut down the system and power off the machine, type the following at a shell prompt as root:
systemctl poweroff
To shut down and halt the system without powering off the machine, run the following command as root:
systemctl halt
By default, running either of these commands causes systemd to send an informative message to all users that are currently logged into the system. To prevent systemd from sending this message, run the selected command with the --no-wall command line option, for example:
systemctl --no-wall poweroff

Using the shutdown Command

To shut down the system and power off the machine at a certain time, use a command in the following format as root:
shutdown --poweroff hh:mm
Where hh:mm is the time in 24 hour clock format. The /run/nologin file is created 5 minutes before system shutdown to prevent new logins. When a time argument is used, an optional message, the wall message, can be appended to the command.
To shut down and halt the system after a delay, without powering off the machine, use a command in the following format as root:
shutdown --halt +m
Where +m is the delay time in minutes. The now keyword is an alias for +0.
A pending shutdown can be canceled by the root user as follows:
shutdown -c
See the shutdown(8) manual page for further command options.

8.4.2. Restarting the System

To restart the system, run the following command as root:
systemctl reboot
By default, this command causes systemd to send an informative message to all users that are currently logged into the system. To prevent systemd from sending this message, run this command with the --no-wall command line option:
systemctl --no-wall reboot

8.4.3. Suspending the System

To suspend the system, type the following at a shell prompt as root:
systemctl suspend
This command saves the system state in RAM and with the exception of the RAM module, powers off most of the devices in the machine. When you turn the machine back on, the system then restores its state from RAM without having to boot again. Because the system state is saved in RAM and not on the hard disk, restoring the system from suspend mode is significantly faster than restoring it from hibernation, but as a consequence, a suspended system state is also vulnerable to power outages.
For information on how to hibernate the system, see Section 8.4.4, “Hibernating the System”.

8.4.4. Hibernating the System

To hibernate the system, type the following at a shell prompt as root:
systemctl hibernate
This command saves the system state on the hard disk drive and powers off the machine. When you turn the machine back on, the system then restores its state from the saved data without having to boot again. Because the system state is saved on the hard disk and not in RAM, the machine does not have to maintain electrical power to the RAM module, but as a consequence, restoring the system from hibernation is significantly slower than restoring it from suspend mode.
To hibernate and suspend the system, run the following command as root:
systemctl hybrid-sleep

Solaris:- break LDOM to ok prompt or reboot

How to send break on LDOM to go to OK prompt or to reboot the hung system.

1. Login to your control domain and list your LDOMs
# ldm list

2. Login to hung ldom
# telnet localhost 5000

press enter and you may get hung state where cursor is just sitting no where.

Press CTRL + ]

you will be at telnet prompt.

at the prompt type ~? to get the help menu.

 ~^B -> Send break
 ~. -> exit from the console to control domain prompt
 ~w -> Force write access on console
 ~n -> console next
 ~p -> console previous
 ~? -> get help


2. To break, type send break at the telnet prompt. You will see following three options
c)ontinue, s)ync, r)eset?

s)ync option will generate core and takes a while to reboot the system
r)reset will reboo the system, if auto-boot set to true otherwise server will be at {ok} prompt.

Note: on t-series servers such as T3, T4, T5 servers, you can send break from SP.