DISCLAIMER : Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility.If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.
Most commonly used XSCF commands- solaris
The eXtended System Control Facility Unit (XSCFU) is a service processor that operates and administrates both midrange servers. The XSCFU diagnoses and starts the entire server, configures domains, offers dynamic reconfiguration, as well as detects and notifies various failures. The XSCFU enables standard control and monitoring function through network. Using this function enables starts, settings, and operation managements of the server from remote locations.
XSCF> showdomainstatus -a DID Domain Status 00 Running 01 Running 02 Running 03 -
XSCF> console -d 0
Power/reboot/reset/panic commands
Poweron all domainsXSCF> poweron -a
XSCF> poweron -d 0
XSCF> poweroff -a
XSCF> poweroff -d 0
XSCF> rebootxscf
por: To reset the domain panic: To panic the domain xir: To reset the CPU in domain
XSCF> reset -d 0 por XSCF> reset -d 0 panic XSCF> reset -d 0 xir
XSCF> sendbreak -d 0
User Administration
Creating a New userXSCF> adduser -u 345 admin
XSCF> deleteuser admin
XSCF> disableuser admin
XSCF> enableuser admin
XSCF> showuser -a
XSCF> password admin
Network related commands
Display complete network configurationXSCF> shownetwork -a
XSCF> setnetwork xscf#0-lan#0 -m 255.255.255.0 192.168.1.10
XSCF> applynetwork XSCF> rebootxscf
XSCF> setntp 192.168.1.10 192.168.1.20 Please reset the XSCF by rebootxscf to reflect the ntp settings.
XSCF> setntp -c del 192.168.1.20 Please reset the XSCF by rebootxscf to reflect the ntp settings.
Hardware Related Commands
Show field replaceable units(FRU)XSCF> showhardconf
XSCF> showstatus
XSCF> showdevices
Fault Management configuration tool
To view fault management logsXSCF> fmdump -v TIME UUID MSG-ID Nov 30 20:44:55.1283 9f773e33-e46f-466c-be86-fd3fcc449935 FMD-8000-0W 100% defect.sunos.fmd.nosub .....
XSCF> fmdump -e -V -u 5f88d7d5-a107-4435-99c9-7c59479d22ed TIME CLASS
Logs
show the logsXSCF> showlogs -v XSCF> showlogs error XSCF> showlogs power
Snapshots
We can take a snapshot of M series servers XSCF either on a remote server or on a USB device locally connected. To take a snaphot on a remote system 192.168.1.10 (in /var/tmp directory) by using root user credentials :XSCF> snapshot -L F -t root@192.168.1.10:/var/tmp
XSCF> snapshot -L F -d usb0
Connect DVD Device to a domain
Run the following from the XSCF to connect the DAT & DVD to the needed port based on the domain(s) configuration.XSCF> cfgdevice -q -y -c attach -p 0-0
XSCF> cfgdevice -l
# cfgadm -c configure # c0 # /etc/init.d/volmgt start
Hostname
Display current hostanems of XSCF unitsXSCF> showhostname -a xscf#0: hostname01.example.com xscf#1: hostname02.example.com
XSCF> sethostname xscf#0 hostname01 XSCF> sethostname -d example.com
Shut Down or Reboot a Solaris System
Normally, the system reboots at power-up or after a system crash. You can reboot a system by using either the init command or the reboot command. The init 6 command asks for stop methods (either SMF or rc.d). Whereas, the reboot command does not, thereby making the reboot command a more reliable way of rebooting a system.
Solaris is usually used as a server operating system. Because of this, you want to make sure that you shut the system down as gracefully as possible to ensure there isn’t any data loss.
For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.
You have more than one command option that you can use. The best command is this, executed as root:
For every application that is installed on your server, you should make sure that you have the correct scripts in /etc/rc(x).d to gracefully shut down the service.
Shutdown
You have more than one command option that you can use. The best command is this, executed as root:
This will immediately shut the system down. You can also use the older command that still works:shutdown -y -i5 -g0
You can even use:sync;sync;init 5
poweroff
Reboot
If you are trying to reboot the system as opposed to turning it off, you could use:
If you are trying to reboot the system as opposed to turning it off, you could use:
Or:shutdown -y -i6 -g0
Or even:sync;sync;init 6
So many commands to do the same thing…reboot
PowerHA/HACMP Moving Resource Group (RG) one node to other
In this post, you will be learning the steps for moving a resource group from one node to the other node. The steps as follows:
1) Extending PATH variable with cluster paths
1) Extending PATH variable with cluster paths
Sometimes cluster paths are not included in default path ,run below command in case if you are not able to run commands directly.
export PATH=$PATH:/usr/es/sbin/cluster:/usr/es/sbin/cluster/utilities:/usr/es/sbin/cluster/sbin:/usr/es/sbin/cluster/cspoc
2) Check the cluster services are up or not in destination node#clshowsrv -v Status of the RSCT subsystems used by HACMP: Subsystem Group PID Status topsvcs topsvcs 278684 active grpsvcs grpsvcs 332026 active grpglsm grpsvcs inoperative emsvcs emsvcs 446712 active emaixos emsvcs 294942 active ctrmc rsct 131212 active Status of the HACMP subsystems: Subsystem Group PID Status clcomdES clcomdES 204984 active clstrmgrES cluster 86080 active Status of the optional HACMP subsystems: Subsystem Group PID Status clinfoES cluster 360702 active3) Check the availability of resource group
# clRGinfo
-----------------------------------------------------------------------------
Group Name Type State Location
-----------------------------------------------------------------------------
UMRG1 non-concurrent OFFLINE umhaserv1
ONLINE umhaserv2
#
4) Move the resourcegroup by using below command-----------------------------------------------------------------------------
Group Name Type State Location
-----------------------------------------------------------------------------
UMRG1 non-concurrent OFFLINE umhaserv1
ONLINE umhaserv2
#
==> clRGmove -g <RG> -n <node> -m
# clRGmove -g UMRG1 -n umhaserv1 -m
Attempting to move group UMRG1 to node umhaserv1.
Waiting for cluster to process the resource group movement request....
Waiting for the cluster to stabilize..................
Resource group movement successful.
Resource group UMRG1 is online on node umhaserv1.
You can use smitty path also
smitty cl_admin => HACMP Resource Group and Application Management => Move a Resource Group to Another Node / Site
5) Verify the RG movement# clRGmove -g UMRG1 -n umhaserv1 -m
Attempting to move group UMRG1 to node umhaserv1.
Waiting for cluster to process the resource group movement request....
Waiting for the cluster to stabilize..................
Resource group movement successful.
Resource group UMRG1 is online on node umhaserv1.
You can use smitty path also
smitty cl_admin => HACMP Resource Group and Application Management => Move a Resource Group to Another Node / Site
# clRGinfo
-----------------------------------------------------------------------------
Group Name Type State Location
-----------------------------------------------------------------------------
UMRG1 non-concurrent ONLINE umhaserv1
OFFLINE umhaserv2
#
-----------------------------------------------------------------------------
Group Name Type State Location
-----------------------------------------------------------------------------
UMRG1 non-concurrent ONLINE umhaserv1
OFFLINE umhaserv2
#
Manually Install or Upgrade VMware Tools in a Linux Virtual Machine
For Linux virtual machines, you manually install or upgrade VMware Tools by using the command line.
Install the latest version of VMware Tools to enhance the performance of the virtual machine's guest operating system and improve virtual machine management. When you power on a virtual machine, if a new version of VMware Tools is available, you see a notification in the status bar of the guest operating system.
Note
This procedure describes how to use the VMware Tools tar installer to install or upgrade VMware Tools. For virtual machines in a vSphere environment, you can alternatively use VMware Tools operating system specific packages (OSPs) to install and upgrade VMware Tools. With OSPs you can use the native update mechanisms of your operating system to download, install, and manage VMware Tools. For more information, see Operating System Specific Packages for Linux Guest Operating Systems.
Prerequisites
■ Power on the virtual machine.
■ Verify that the guest operating system is running.
■ Because the VMware Tools installer is written in Perl, verify that Perl is installed in the guest operating system.
■ To determine whether you have the latest version of VMware Tools, look on the Summary tab for the virtual machine.
Procedure
1) Select the menu command to mount the VMware Tools virtual disc on the guest operating system.
VMware Product
Menu Command
vSphere Client
Inventory > Virtual Machine > Guest > Install/Upgrade VMware Tools
2) If you are performing an upgrade or reinstallation, in the Install/Upgrade VMware Tools dialog box, select Interactive Tools Installation or Interactive Tools Upgrade and click OK.
The process starts by mounting the VMware Tools virtual disc on the guest operating system.
3) In the virtual machine, log in to the guest operating system as root and open a terminal window.
4) Run the mount command with no arguments to determine whether your Linux distribution automatically mounted the VMware Tools virtual CD-ROM image.
If the CD-ROM device is mounted, the CD-ROM device and its mount point are listed as something like this:
/dev/cdrom on /mnt/cdrom type iso9660 (ro,nosuid,nodev)
5) If the VMware Tools virtual CD-ROM image is not mounted, mount the CD-ROM drive.
a : If a mount point directory does not already exist, create it.
mkdir /mnt/cdrom
Some Linux distributions use different mount point names. For example, on some distributions the mount point is /media/VMware Tools rather than /mnt/cdrom. Modify the command to reflect the conventions that your distribution uses.
b : Mount the CD-ROM drive.
mount /dev/cdrom /mnt/cdrom
Some Linux distributions use different device names or organize the /dev directory differently. If your CD-ROM drive is not /dev/cdrom or if the mount point for a CD-ROM is not /mnt/cdrom, modify the command to reflect the conventions that your distribution uses.
6) Change to a working directory (for example, /tmp).
cd /tmp
7) Delete any previous vmware-tools-distrib directory before you install VMware Tools.
The location of this directory depends on where you placed it during the previous installation. Often this directory is placed in /tmp/vmware-tools-distrib.
8) List the contents of the mount point directory and note the filename of the VMware Tools tar installer.
ls mount-point
9) Uncompress the installer.
tar zxpf /mnt/cdrom/VMwareTools-x.x.x-yyyy.tar.gz
The value x.x.x is the product version number, and yyyy is the build number of the product release.
If you attempt to install a tar installation over an RPM installation, or the reverse, the installer detects the previous installation and must convert the installer database format before continuing.
10) If necessary, unmount the CD-ROM image.
umount /dev/cdrom
If your Linux distribution automatically mounted the CD-ROM, you do not need to unmount the image.
11) Run the installer and configure VMware Tools.
cd vmware-tools-distrib
./vmware-install.pl
Usually, the vmware-config-tools.pl configuration file runs after the installer file finishes running.
12) Respond to the prompts by pressing Enter to accept the default values, if appropriate for your configuration.
13) Follow the instructions at the end of the script.
Depending on the features you use, these instructions can include restarting the X session, restarting networking, logging in again, and starting the VMware User process. You can alternatively reboot the guest operating system to accomplish all these tasks.
The VMware Tools label on the Summary tab changes to OK.