Posts

Showing posts from April, 2014

AIX Commands related to Boot and Init Process

1) To find the run-level in which system is working a) #who -r b) cat /etc/.init.state 2) To change the runlevel from one to other #telinit M or shutdown -m –> Go to maintenance mode (single user mode) #telinit 2 3) Shows the bootlist in normal mode & Service mode #bootlist -m normal -o #bootlist -m service -o 4) Sets the bootlist in the normal mode and service mode #bootlist -m normal hdisk1 hdisk2 #bootlist -m service cd0 hdisk1 5) To show the boot disks location code #bootlist -m normal -ov ‘ibm,max-boot-devices’ = 0×5 NVRAM variable: (boot-device=/pci@80000002000000c/pci@2/pci1069,b166@1/scsi@0/sd@4:2) Path name: (/pci@80000002000000c/pci@2/pci1069,b166@1/scsi@0/sd@4:4) <–this pathname shows which blv is used match_specific_info: ut=disk/scsi/scsd hdisk0 blv=bos_hd5 6) To shows state of boot record #ipl_varyon -i PVNAME BOOT DEVICE             PVID           ...

NTP Client Configuration in AIX

1) Using “ntpdate” command , have a server suitable for synchronization by using the #ntpdate -d ip.address.of.ntpserver 2) Client configuration for ntp is defined in the configuration file #cat /etc/ntp.conf server <NTP.SERVER.IP> driftfile /etc/ntp.drift tracefile /etc/ntp.trace 3) start the xntpd daemon #startsrc -s xntpd 4) To make permanent after reboot, uncomment the following line in /etc/rc.tcpip vi /etc/rc.tcpip start /usr/sbin/xntpd “$src_running” 5) check the service status # lssrc -s xntpd Subsystem Group PID Status xntpd tcpip 3997772 active 6) check the time sync with server #ntpq -p

SSH login slowness troubleshooting

In newly installed servers, while trying to login using  "ssh" we may feel some slowness to get the password prompt . Most of us think that this is due to network level DNS issue, but actually the assumption is wrong there is a  parameters in the SSH configuration file which makes delay in getting this password prompt.           Let us see the solution for the above issue in Sun SSH and Open SSH. In SunSSH,  Add the mentioned parameter in the file /etc/ssh/sshd_config LookupClientHostnames no In OpenSSH , Edit the mentioned parameter in the file /etc/ssh/sshd_config UseDNS no                 After that restart the ssh service and check the response of quick password prompt while login to the servers through ss h

Network Installation Manager (NIM) -- Part 1 Introduction & Concepts

Introduction        NIM (Network Installation Manager) is a IBM AIX  Service used for remote unattended installation similar to the Sun/Oracle Jumpstart and RedHat Kickstart or PXE without DVD/CD used to install AIX in many servers at a time in an Infra. Now, the installation of VIO and Linux can also be performed using NIM. Apart from installation, upgradation and maintainig AIX softwares/filesets the management activities like backup and restore of mksysb can be performed via NIM. By using NIM Master to store mksysb can reduce usage of tape device and time duration. Activities performed by NIM         1) New Installation (Pull method)         2) TL/SP upgradation         3) OS Migration/Upgradation         4) mksysb backup/restore         5) Provide boot CD image for maintenance activities         6) Centralized repository ...

HMC Commands

Image
In general, HMC operations in CLI  are categorized under the following commands, chsystate lssyscfg lssysconn  1) To display MS connected with HMC     $lssyscfg -r sys -F name state      2) To display LPARs in managed system   $lssyscfg -r lpar -m app server -F name state 3) To lists attributes of Managed systems    $lssysconn  -r sys 4) To power ON managed system     $chsystate -r sys -m Msserver -o on 5) To power OFF managed system     $chystate -r sys -m Msserver -o off 6) To start the LPAR in sms     $chystate -r lpar -m Msserver -n lpar_name -o on -f normal -b sms 7) To shutdown the LPAR     $chystate -r lpar -m Msserver -n lpar_name -o shutdown –immed 8) To find the hmc version     $lshmc -V 9. Show processor information of the LPAR     #lshwres -m  <Msname>  -r  proc –level lpar 10.Show the proc...

HACMP (PowerHA) FAQs

What is HACMP and its usage? HACMP is High Availability and Cluster Multi Processing.  Elimination of  Planned and Unplanned system and application downtime. And provided business continuity for users/corporates irrespective of system/network/appn failure.  In HACMP, the term HA (High Available) and CMP (Cluster Multi Processing) refers to the HACMP features which enable one to build a cluster of multiple nodes which work together to provide improved application performance.  To avoid SPOF(Single Point of Failure)  for the following objects.                                     Node, Powersource, Network Adapter, Network, Disk adapter, Disk, Application, VIO and entire Datacenter.  What are the policies of Cluster? Rotating Cascading Custom     ...

Solaris Hardening Procedure -- Part 1

This articles elaborately describes about the hardening procedure of Solaris OS. Hardening process will take place in different segments of the OS, hence due to lengthy procedures have split into 3 parts.          1. Services     a) Disabling the Restricted Services             i) Restricted services                    Stop the restricted services which will pose a risk to servers. The following are restricted services.         telnet         Uucp         Netstat            Comsat         Time         Echo         Discard       ...

How to find the difference between a script file and a binary file?

$ ls -l /usr/bin total 200732 -rwxr-xr-x 1 root root 156344 Oct 4 2013 adb -rwxr-xr-x 1 root root 6123 Oct 8 2013 add-apt-repository list goes long --------- In the above adb is a binary file and add-apt-repository is a script file.I get this information by viewing the files through nautilus.But through command line, i didn't find any differences.I can't able to predict these are binary files and these are script files. So how do I differentiate between script and binary files through the command-line? Just use file : $ file /usr/bin/add-apt-repository /usr/bin/add-apt-repository: Python script, ASCII text executable $ file /usr/bin/ab /usr/bin/ab: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically  linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=569314a9c4458e72e 4ac66cb043e9a1fdf0b55b7, stripped As explained in man file : NAME file — determine file type DESCRIPTION This manua...

Connection time-out (time out) in Solaris 10, TCP_KEEPALIVE_INTERVAL parameter

Get: ndd /dev/tcp tcp_keepalive_interval Set: # Set configurable parameters. /etc/system or echo “Tuning Solaris For Proxy Server” ndd -set /dev/tcp tcp_conn_req_max_q 512 ndd -set /dev/tcp tcp_conn_req_max_q0 1024 ndd -set /dev/tcp tcp_keepalive_interval 600000 ndd -set /dev/tcp tcp_close_wait_interval 60000 ndd -set /dev/tcp tcp_rexmit_interval_initial 3000 ndd -set /dev/tcp tcp_rexmit_interval_min 2000 ndd -set /dev/tcp tcp_rexmit_interval_max 240000 ndd -set /dev/tcp tcp_xmit_hiwat 32768 ndd -set /dev/tcp tcp_recv_hiwat 32768 ————————————————————- ) Windows: Registry edit HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters Edit – Add value : KeepAliveTime (REG_DWORD) Decimal -> 180000 (3 minutes, for example) b) Solaris/HP-UX /usr/sbin/ndd –set /dev/tcp tcp_keepalive_interval 180000 (interaval 3 minutes) c) Linux /sbin/sysctl -w net.ipv4.tcp_keepalive_time=1800 ? (interaval 3 minutes) d) Tru64 /usr/sbin/netconfig tcp_ke...

Closing Idle Sessions in SunSSH

There is a question having been asked from time to time. Is there a way for SSH to get rid of idle sessions? Usually, before such question is asked, server side keyword MaxStartups is consulted but quickly forgotten as an option that is to control something completely else. Then, ClientAliveInterval is checked with the same result. On the client side, ServerAliveInterval is hoped that it could help. The answer might be suprising but those "alive" options can really help in getting rid of idle sessions both on the server and the client side, respectively. However, note that ServerAliveInterval and ServerAliveCountMax are supported only in OpenSolaris , not in S10 . So, on S10 you will be able to close idle sessions only on the server side (which is usually why you are looking for such a feature though). The trick is to set the "countmax" option to 0. The way how those options were implemented in OpenSSH and thus ...

x86: How to Locate the Active GRUB Menu and List Current Menu Entries

Use this procedure to determine the location of the active GRUB menu and to list current GRUB menu entries. 1.Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. 2.To list the location of the active GRUB menu and current GRUB menu entries, type: # bootadm list-menu list-menu Lists the location of the active GRUB menu, as well as the current GRUB menu entries. Information about the autoboot-timeout, the default entry number, and the title of each entry is included in this listing. Applies to x86 based systems only. -------------------------------------------------------------------------------- Example : Listing the Location of the Active GRUB Menu and Current GRUB Menu Entries # bootadm list-menu The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst default=0 timeout=10 (0) Solaris10 (1) Solaris10 Failsafe (2) Linux --------------------------------------------------------------------------------

How to List Contents of the Boot Archive

1.Become superuser or assume an equivalent role. 2.To list the files and directories that are included in the boot archive, type: # bootadm list-archive list-archive Lists the files and directories that are included in the boot archive or archives. Applies to both SPARC and x86 based systems.

How to Manually Update the Boot Archive on a Solaris Volume Manager RAID-1 (Mirrored) Root Partition

The following procedure describes how to mount a mirrored metadevice during a failsafe boot. In this procedure, the root (/) file system that is used is /dev/dsk/c0t0d0s0. 1.Boot the failsafe archive. SPARC platform: From the ok prompt, type the following command: ok boot -F failsafe If the system is already running, open a terminal window, become superuser, and type the following command: # reboot -- "-F failsafe" For more information, see How to Boot a SPARC Based System in Failsafe Mode. x86 platform: Boot the system by selecting the failsafe boot entry in the GRUB menu. For more information, see How to Boot an x86 Based System in Failsafe Mode. Booting the system in failsafe mode produces the following output: Starting shell. # 2.During the failsafe boot, when prompted by the system to select a device to mount, type q to indicate none. Please select a device to be mounted (q for none)[?,??,q]: q 3.Temporarily mount a submirror of the root (/) file system as read-only on ...