Pages

Tuesday 28 February 2012

New in Apache 2.4

New in Apache 2.4

The Apache Foundation has announced the arrival of Apache 2.4 , a major new version of the famous server HTTP . It took six years to see its outcome and since a lot of progress has been made, especially in performance. The eventual aim being to compete with the Russian challenger Nginx . Listed below are the most important improvements.

Improvements at the kernel level:
  • A reduced memory consumption compared to version 2.2.x
  • A general improvement in performance
  • The KeepAliveTimeout directive now accepts a lifetime in milliseconds
  • The choice of MPM (Multi-Processing Modules) can now be done in the execution
  • The "Event MPM" is out of the experimental stage and is now fully supported
  • A support for asynchronous reads / writes for MPMs
  • The LogLevel directive may be defined by module and directory. The new levels logfunc1 to trace8 were added above the level of debug logging
  • <If> A new tag to define a configuration based on criteria related to the application (eg <if "%{QUERY_STRING} =~ /(delete|commit)=.*?elem/">)
  • You can also specify complex conditions through common syntax guidelines as SetEnvIfExpr, RewriteCond, Header ...
  • The NameVirtualHost directive is now obsolete
The new modules

With Apache 2.4, new modules are introduced. The most important ones:
  • mod_proxy_express : this module allows for the reverse proxy mass. It is based on a DBM file containing the names and addresses of the sites to backend servers
  • mod_proxy_fcgi and mod_proxy_scgi : these modules are available FastCGI and SCGI for mod_proxy
  • mod_ratelimit : it limits the bandwidth to some clients
  • mod_reqtimeout : it defines the lifetime and the rate of minimum data transfer for receipt of requests
  • mod_remoteip : this module allows to treat the client that initiated the query as the original customer.It keeps its address IP even if through a proxy or load balancer.
  • mod_allowmethods : it allows to restrict the use of certain methods HTTP without interfering with the authentication and authorization.
  • mod_xml2enc and mod_proxy_html : these two modules developed by third parties are now officially supported
Improvements of existing modules

  • mod_proxy_balancer: configuration and adding members in a group during the performance were improved. The off-line server is also more smoothly through better management of persistent sessions
  • mod_cache can now cache HEAD requests. Moreover, it is able to serve pages from cache if a backend server is unavailable (Error 500)
  • Security has been improved for modules mod_cgi, mod_include and mod_isapi through a stricter verification of headers

The full list of new features is available here . Note that Apache is still one of the most used web server in the world with 64.92% market share, far ahead of Microsoft IIS (14.39%) and Nginx (9.89%).






Saturday 25 February 2012

An Introduction to Virtualization

An Introduction to Virtualization 


Virtualization is a concept in which more than one operating system shares the same set of related hardware. Typically we used to install a single Operating System into specific underlying hardware architecture and that architecture would become dedicated to that specific Operating System. In virtualization we share the same hardware architecture to a number of OS installations. Since these systems do not directly interact with the bare hardware, it is called virtual Operating Systems or Virtual Machines. These Virtual Machines are completely independent of each other Virtual Machines can be implemented by any one of below methods

1. Software-based Virtualization
2. Hardware-based Virtualization

Software Based Virtualization

In this method the underlying hardware is emulated by means of special purpose software. The software is capable of emulating the hardware for each of the virtual machines. The Operating System that incorporates platform for virtualization is called Base OS or Host OS and the virtualized machines are called Guest OS. This software is typically a part of the base operating system over which the guest OS are installed. Examples include VMware and KVM.

Software based virtualization are based on one of the two approaches

a. Para Virtualization
b. Full Virtualization

Para Virtualization

 Here the Host OS presents a software emulated interface to the Guest OS that is similar but not exactly identical to the underlying hardware. In this kind the Guest OS is aware of the fact that it is running under a Virtualized environment and there is a layer of hypervisor between the Guest and the Host machine. Such kind of virtualization generally doesn’t support all types of Guests or proprietary operating systems.

Full Virtualization

 In full virtualization, the hypervisor or the virtual machine monitor exists between the virtualized operating systems and the hardware. It is responsible for multiplexing the system resources to the Operating System Instances. This technique supports all types of Guest operating systems because it attempts to present a completely transparent platform to its Guest operating systems.

Hardware Based Virtualization

In hardware-based virtualization, the underlying hardware itself incorporates the architectural support that facilitates building a hypervisor and allows guest OSes to be run in isolation.

Wednesday 15 February 2012

AIX Tips



uname -a

bootinfo -r

lsattr -El mem0

lsdev -Cc processor

pmcycles -m    ---> processor speed in megahertz

bootinfo -K   ---> 32 bit /64 bity kernel

bootinfo -y   ---> hardware type

prtconf | pg  ---> hardware information

lsconf | pg  ---> same O/p as prtconf

lsattr -El sys0   --> attribute of system devices

uname -M   ---> to know about system model

uname -p  -> shows powerPC

bootinfo -p  ---shows architecture type like chrp

errpt | pg  ---> gives a list of errors

last | pg --> last login info detail

who  ---> to view current user login

lsuser ALL ---> list of all user

mkuser santosh

su - santosh

id  ---> to know current user detail like id number

hostname

ifconfig -a

netstat -r --> current routing table



Tuesday 14 February 2012

no RMC connection between the HMC and the RPA partition


There is currently no RMC connection between the HMC and the RPA partition {0}

rmc                      657/tcp                # RMC
rmc                      657/udp                # RMC

1) First check TCPIP on LPAR.

2) Ping from both side ie HMC and LPAR each other.

3) On HMC hit following command

The first place to check is the HMC using queries within the HMC restricted shell command prompt.

# lspartition -dlpar


(Worst Case if not output do this)If you get no output at all, then there is an RMC problem affecting all lpars attached to this particular HMC. A good thing to do if this happens is to close all Serviceable Events (under Service Focal Point) and reboot the HMC

# hmcshutdown -r -t now

Once the HMC reboots, wait about 15 minutes and re-run


# lspartition -dlpar

If still no output, then you should probably open a call with tech support.

In order for RMC to work, port 657 upd/tcp most be open in both directions between the HMC public interface and the lpar.

Look for the partition in question. In order for dlpar to function,
the partition must be returned, the partition must return with the correct IP of the lpar. Also, the active value must be higher than zero, and the decaps value must be higher 0x0

Example of a working lpar

<#1> Partition:<11*9117-570*10XXXX, correct_hostname.domain, correct_ip>
Active:<1>, OS:<AIX, 5.3, 5.3>, DCaps:<0x3f>, CmdCaps:<0xb, 0xb>, PinnedMem:<146>

Example of non-working lpar

<#9> Partition:<10*9117-570*10XXXX, hostname, ip>
Active:<0>, OS:<, , >, DCaps:<0x0>, CmdCaps:<0x0, 0x0>, PinnedMem:<0>


Note :- There are too many reasons as to why the RMC connection is broken to list in one document. However, if you see the condition in the 2nd example (and dlpar is working for other lpars on this HMC) then the next step is to check the RMC status from the lpar (AIX root access will be needed).


4) On LPAR fire following commands
lssrc -a | grep rsct

Output :---
ctcas rsct inoperative
ctrmc rsct inoperative
IBM.ERRM rsct_rm inoperative
IBM.HostRM rsct_rm inoperative
IBM.ServiceRM rsct_rm inoperative
IBM.CSMAgentRM rsct_rm inoperative
IBM.DRM rsct_rm inoperative
IBM.AuditRM rsct_rm inoperative
IBM.LPRM rsct_rm inoperative


Note :- Here we see that all the rsct daemons are inoperative. In many cases, you will see some active and some missing. The key for dynamic logical partitioning is that IBM.DRM



5) To start IBM.DRM service to operatative fire these commands :-

This is the correct method to stop and start RMC without erasing the configuration.

# /usr/sbin/rsct/bin/rmcctrl -z
# /usr/sbin/rsct/bin/rmcctrl -A
# /usr/sbin/rsct/bin/rmcctrl -p

6) Now repeat

# lssrc -a | grep rsct
Is IBM.DRM active now? If so, there is a pretty good chance the problem is resolved.


7)Go back to the HMC restricted shell command prompt

# lspartition -dlpar

Now the partition shows correct hostname & IP
Active<1> and Decaps value 0x3f

The values mean the partition is capable of a dlpar operation.

Note :- *** an lpar cloned from a mksysb may still have the RMC config from the mksysb source. In this case, you may see IBM.DRM active, but if it does not return after running the three rmcctrl commands listed above, then they were never really active.

****Using the recfgct command*****

recfgct deletes the RMC database, does a discovery, and recreates the RMC configuration.

In nearly all cases, recfgct is safe to run on a production system. There are just a few cases where you would not use recfgct, and those are if the LPAR is a CSM Management Server or the LPAR has RMC Virtual Shared Disks (VSDs). VSDs are usually only found in very large GPFS clusters. If you are using VSDs, then these filesets would be installed on your AIX system: rsct.vsd.cmds, rsct.vsd.rvsd, rsct.vsd.vsdd, and
rsct.vsd.vsdrm

8)
# lslpp -L | grep vsd
If no output, then you are not using VSDs

The other rarely used application that can be interrupted by recfgct, but without significant consequences, is if the node is a CSM Manager node or CSM client node. All AIX lpars should have these filesets
# lslpp -L | grep csm
csm.client 1.7.0.10 C F Cluster Systems Management
csm.core 1.7.0.10 C F Cluster Systems Management
csm.deploy 1.7.0.10 C F Cluster Systems Management
csm.diagnostics 1.7.0.10 C F Cluster Systems Management
csm.dsh 1.7.0.10 C F Cluster Systems Management Dsh
csm.gui.dcem 1.7.0.10 C F Distributed Command Execution

If you have additional filesets that start with csm, such as csm.server, csm.hpsnm, csm.ll, csm.gpfs, then you may have an LPAR that is part of a larger CSM cluster. The csm.server fileset should only be installed on a CSM Management Server. Following details a few additional checks you can perform to see if you have a Management Server configured.


# csmconfig -L ---> csmconfig not found, this is not a csm server
# lsrsrc IBM.ManagementServer
This will list resources that manage the lpar, including the HMC
and/or a csm server
Look at the Manager Type field
Manager Type = CSM --- this is a csm node

So if it turns out your node is a csm manager, then you would have to re-add all the nodes. If the system was a csm client node, then you would need to get onto the manager server and re-add the node.

Thats it for the warnings on recfgct. If you think you might be using VSDs and/or a CSM cluster, but are not sure, then please open a pmr and support can assist in you in determining this.

Assuming you have not reason to be concerned about the warning discussed above, then proceed.

# /usr/sbin/rsct/install/bin/recfgct

Wait several minutes

# lssrc -a | grep rsct
If you see IBM.DRM active, then you have probably resolved the issue

# lsrsrc IBM.ManagementServer

Do you see?
ManagerType=HMC

Try the dlpar operation again. If it fails, then you will likely need
to open a software PMR.

The other main reason for a dlpar failure is that the lpar has reached its minimum or maximum (on processors or memory)

Note. The partition profile does not give a true picture of the current
running configuration. If the profile was edited, but the partition did not go down into a "not activated" state, then reactivated, then the profile edits have not been read.

To check the current "running configuration" check the Partition Properties instead of the profile properties. You will see the min, max, & current. You can not remove or add processors and memory that are not within these boundaries. The command to check the running properties from the HMC restricted shell listed here

# lssyscfg -r sys -F name
(you need the value of name for use with the -m flag on many HMC commands)

# lshwres -r proc -m <server_name> --level lpar
(this list just the lpars settings)
# lshwres -r proc -m <server_name> --level sys
(this list the entire servers memory settings)

If you are checking for memory, replace "proc" in the above commands with "mem"

DLPAR can fail for many reasons, and it may be necessary to contact Remote Technical Support. However, the above may solve your problem.

9) Check on HMC and check and confirm using graphical tool and proceed for DLPAR now.



Friday 10 February 2012

LVM Management

LVM Management


lspv


hdisk0 contains a rootvg Now i have added a hdisk1

cfgmgr

mkvg -y datavg -s 128 hdisk1  ---> on hdisk1 datavg volume group is created

lsvg     ---> shows all the avaliable VG in system

lsvg -o   ----> show all the active VG in system

lsvg datavg  

varyoffvg datavg

lsvg -o

lsvg -l rootvg  

varyonvg datavg

lsvg -o

lsvg -l datavg   ----> shows all LV that reside in datavg

lsvg -p datavg   ---> shows all PVs in the VG

mklv -t jfs2 -y oralv datavg 2 hdisk1    ------> created oralv in datavg

lsvg -l datavg

mklv -t jfs2log -y loglv datavg 1   ---> log device for oralv 

lsvg -l datavg

logform /dev/loglv   ---> to initialize the log device

lsvg -l datavg

crfs -v jfs2 -d oralv -A y -m /opt/oracle

lsvg -l datavg

grep -p /opt/oracle /etc/filesystems

mount /opt/oracle

lsvg -l datavg

mount

date

df -g

umount /opt/oracle

mount

lsvg -l datavg

mount /opt/oracle

df -g

cd /opt/oracle

lmktemp /opt/oracle/file1 200M

ls -ltr

df -h

chfs -a size=+200M /opt/oracle

df -g

umount /opt/oracle

lsvg -l datavg

rmfs /opt/oracle

lsvg -l datavg

rmlv loglv

lsvg -l datavg

reducevg datavg hdisk1

lsvg -o

chdev -l hdisk1 -a pv=clear

rmdev -dl hdisk1

lspv

Wednesday 8 February 2012

differences in the new Aix version Editions Express, Standard and Enterprise?

AIX Versions


POWER/PowerPC releases

* AIX 6.1

 Workload Partitions
 Live Application Mobility
 Role Based Access Control RBAC
 AIX Security Expert hardening tool
 Trusted AIX
 Encrypting JFS2 filesystem
 Trusted Execution
 Concurrent Kernel Maintenance
 Kernel exploitation of POWER6 storage keys
 probevue dynamic tracing
 Systems Director Console for AIX
 Integrated filesystem snapshot
 Partition mobility on POWER6


* AIX 5L 5.3

 NFS Version 4 support
 Advanced Accounting
 Virtual SCSI
 Virtual Ethernet
 Simultaneous multithreading (SMT) support
 Micro-Partitioning support
 POWER5 support
 JFS2 quota support
 JFS2 filesystem shrink support


* AIX 5L 5.2

 Introduced support for the IBM BladeCenter JS20 with the PowerPC 970.
 Minimum level required for POWER5 hardware
 Support for MPIO Fibre Channel disks
 iSCSI Initiator software
 Dynamic LPAR support

* AIX 5L 5.1

 Introduced support for the IA-64 architecture, although this never went beyond beta,[1]
 Minimum level required for POWER4 hardware and the last release that supported Micro Channel architecture
 Introduction of 64-bit kernel, installed but not activated by default
 JFS2
 introduced Logical Partitioning on POWER4
 The L stands for Linux affinity
 Trusted Computing Base (TCB)

* AIX 4.3.3

o Added online backup function
o Workload Management (WLM)--


NIM Server and clent configuration


@@@@@@@@@@@@@@@NIM Master connfiguration Steps@@@@@@@@@@@@

lslpp -l | grep nim
bos.sysmgt.nim.client  ----> by default install


installp -ld /dev/cd0 | grep nim  ----> checking for packges of nim to be installed from cd0

we need to install 2 packages from the list

bos.sysmgt.nim.master
bos.sysmgt.nim.spot


installp -agXd /dev/cd0 bos.sysmgt.nim.spot
installp -agXd /dev/cd0 bos.sysmgt.nim.master

lslpp -l | grep nim

NOTE: before this now please insert a DVD

oslevel -s  -----> to detect the current oslevel

smitty nim
than select Configure NIM Environment
Configure a Basic NIM Environment (Easy Startup)

Than 
Select Primary Network Interface for NIM Master

en0

Than

select Input devices for installation images 

cd0

LPP Source Name

AIX53TL5LPP

After answering all the question press enter

After that

Basically it adds 2 subsystems nimd and nimsis

and than Daemons gets started

Than checks for the available space for the new filesystems
and if space is available in VG than it will create the filesystems

than /exports/lpp_source is created from cd0  and than /exports/spot is created from lpp_source

ls -l /etc/niminfo ---> NIM configuration file

lssrc -s nimesis    ---->NIM Daemon

Confirm by 

ps -ef | grep nim

lsnim   ---> command to list all NIM Server Rsource

lsnim -c machines
lsnim -c networks
lsnim -c resources

lsnim -l AIX53TL5LPP  ---> to see details of LPP source

@@@@@@@@@@@@@@@@@@@Client Configuration for NIM installation@@@@@@@@@@@


lsnim

vi /etc/hosts

add client ip address

and hostname

smitty nim

than select

Perform NIM Administration Tasks
Than Manage Machines
Than Define a Machine
and now enter hostname of the machine

than press enter

object is created now

lsnim -c machines  --> it show client1 machines

lsnim -c standalone

lsnim -l client1   ---> it show details of client1 machine

To allocate a resource to client1 you can use below command

nim -o allocate -a lpp_source=AIX53TL5LPP client1

lsnim -l client1   ---> to confiorm whether lpp_source is allocated to clinte1

nim -o deallocate -a lpp_source=AIX53TL5LPP client1

lsnim -l client1

smitty nim_bosinst --->to initilaize BOS installation

Perform NIM Administration Tasks
Than Perform Operation on Machines
in that select bos_inst

go for rte installation and select lpp_source and spot

NOTE: Lpp_source and spot should be of same level


you can reset the state of NIM client if you do not wat to install NIm client1

nim -o reset client1

@@@@@@@@@@@@How to remove nim client conf from nim master@@@@@@@@@@@@

nim -o deallocate -a lpp_source=AIX53TL5LPP -a spot=AIX53TL5SPOT client1

nim -o remove client1

@@@@@@@@@@@@@How to unconfigure a NIm server @@@@@@@@@@@@@@@@@@@


nim -o unconfig master

installp -u bos.sysmgt.nim.master
installp -u bos.sysmgt.nim.client
installp -u bos.sysmgt.nim.spot






Tuesday 7 February 2012

Restore or Install AIX with a mksysb image using NIM

Restore or Install AIX with a mksysb image using NIM

mksysb resource is a file containing the image of the root volume group (created with the AIX mksysb command) of a machine. It is used to restore a machine when it crashed, or to install it from scratch (also known as “cloning” a client). In a environment, we usually installed AIX on new LPARs or VIO clients from a existing mksysb rather than going for fresh AIX CD. Installing OS from existing mksysb help us to keep the customization same for all LPAR .

Assumptions:

1. The NIM client (In our example NIM Client is webmanual01) is defined on the NIM master (In our example nim01)
2. The client’s hostname and IP address are listed in the /etc/hosts file.
3. The mksysb image has been transferred or restored from TSM and resides in the NIM master nim01:/export/nim/mksysb.The size and sum command output match that from the source mksysb image.

Create a mksysb resource:

Run smit nim_mkres –> You should see a “Resource type” listing disppalyed –> Scroll through the menu list and select mksysb.
Hit enter and you will see menu below:

Define a Resource

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[TOP]                                            [Entry Fields]
* Resource Name                       [webmanual01mksysb]
* Resource Type                         mksysb
* Server of Resource                   [master]
* Location of Resource                 [/export/nim/mksysb/webmanual01.mksysb.0] Comments []

Source for Replication                  []
-OR-
System Backup Image Creation Options:
CREATE system backup image?            no
NIM CLIENT to backup                     []
PREVIEW only?                           no
IGNORE space requirements?              no
[MORE...10]


Prepare Bos install on client:

Run smit nim_tasks –> Select Install and Update Software and press enter–> Then select the Install the Base Operating System on Standalone Clients –> Select the target definition ( ie the client which will be restored) –>Select the installation type–> select mksysb Select the mksysb resource webmanual01mksysb which you created in last step –> Select the SPOT for the restore / installation –

The entire bos_inst smit panel should now displayed

Install the Base Operating System on Standalone Clients

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[TOP]                                             [Entry Fields]
* Installation Target                    webmanul01
* Installation TYPE                       mksysb
* SPOT                                       spot61_TL06_SP3
LPP_SOURCE
MKSYSB                                   webmanual01mksysb

BOSINST_DATA to use during installation         []
IMAGE_DATA to use during installation           []
RESOLV_CONF to use for network configuration     []
Customization SCRIPT to run after installation        []
Customization FB Script to run at first reboot          []
ACCEPT new license agreements?                   []
Remain NIM client after install?                       [yes]
PRESERVE NIM definitions for resources on
this target?                                     [yes]
FORCE PUSH the installation?                           [no]
Initiate reboot and installation now?         [no]
-OR-
Set bootlist for installation at the next reboot?    [no]
Additional BUNDLES to install                     []
-OR-
Additional FILESETS to install                   []
(bundles will be ignored)

On NIM nim01 server ,check for correct client setup and start:

a. Check the subserver bootps is active

#lssrc -t bootps
Service Command Description Status
bootps /usr/sbin/bootpd bootpd /etc/bootptab active

b. Check the subserver tftp is active 

#lssrc -t tftp
Service Command Description Status
tftp /usr/sbin/tftpd tftpd -n active
c. Tail /etc/bootptab and should see the client network info listed per example below

webmanual01:bf=/tftpboot/testlpar:ip=10.190.120.90 :ht=ethernet:sa=10.190.120.120:sm=255.255.255.0:
d. Showmount -e —–> should list 2 filesystems being NFS exported to the client ( webmanual01)

/export/nim/mksysb/webmanul01.mksysb.0 webmanual01
/export/nim/scripts/webmanual01.script webmanual01

Boot client webmanual01 into SMS mode using HMC and select the option 2

PowerPC Firmware
-------------------------------------------------------------------------------
Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
Select Ethernet Adapter as below screen . I will select 2 as I know it is configured

PowerPC Firmware
-------------------------------------------------------------------------------
NIC Adapters
Device Location Code Hardware
Address
1. Port 1 - IBM 2 PORT 10/100/100 U787B.001.WEBDEV-P1-C1-T1 001a6491a656
2. Port 2 - IBM 2 PORT 10/100/100 U787B.001.WEBDEV-P1-C1-T2 001a6491a657
Now select 1 for IP Parameters as follows

PowerPC Firmware
-------------------------------------------------------------------------------
Network Parameters
Port 2 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter : U787B.001.WEBDEV-P1-C1-
1. IP Parameters
2. Adapter Configuration
3. Ping Test
4. Advanced Setup: BOOTP
Now fill up the parameters as below

PowerPC Firmware
-------------------------------------------------------------------------------
IP Parameters
Port 2 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter : U787B.001.WEBDEV-P1-C1-
1. Client IP Address [10.190.120.17] 2. Server IP Address [10.190.120.24] 3. Gateway IP Address [10.120.112.1]
4. Subnet Mask [255.255.255.000]
Now go back previous menu and select Ping Test (option 3)
Make sure you get a ping success; else, the NIM will fail. If ping failure, check the address info entered; check if the adapter is correct and if the adapter is connected into the network. When ping test OK, proceed to next step:

Type menu item number and press Enter or select Navigation key:3
PowerPC Firmware
-------------------------------------------------------------------------------

Ping Test
Port 2 - IBM 2 PORT 10/100/1000 Base-TX PCI-X Adapter : U787B.001.WEBDEV-P1-C1
Speed, Duplex: auto,auto
Client IP Address: 10.190.120.17
Server IP Address: 10.190.120.24
Gateway IP Address: 10.190.112.1
Subnet Mask: 255.255.255.000
Protocol: Standard
Spanning Tree Enabled: 0
Connector Type:

1. Execute Ping Test
-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:1

.---------------------.
| Attempting Ping... |
`---------------------'

<strong>Lots of OutPut</strong>

.-----------------.
| Ping Success. |
`-----------------'


Go back to Main Menu and Select 5 for Select Boot Options

Main Menu
1. Select Language
2. Setup Remote IPL (Initial Program Load)
3. Change SCSI Settings
4. Select Console
5. Select Boot Options
Now Select 1 Select Install/Boot Device and Select 6 for Network. Then Select Adapter # from previous step as option 2

Multiboot
1. Select Install/Boot Device
2. Configure Boot Device Order
3. Multiboot Startup
PowerPC Firmware
-------------------------------------------------------------------------------
Select Device Type
1. Diskette
2. Tape
3. CD/DVD
4. IDE
5. Hard Drive
6. Network
7. List all Devices

-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:6
PowerPC Firmware

-------------------------------------------------------------------------------
Select Device
Device Current Device
Number Position Name
1. - Ethernet
( loc=U787B.001.WEBDEV-P1-C1-T1 )
2. - Ethernet
( loc=U787B.001.WEBDEV-P1-C1-T2 )

Now select Normal Mode Boot and Select 1 to Exit System Management Services

PowerPC Firmware
-------------------------------------------------------------------------------
Select Task

Ethernet
( loc=U787B.001.WEBDEV-P1-C1-T2 )

1. Information
2. Normal Mode Boot
3. Service Mode Boot

-------------------------------------------------------------------------------
Navigation keys:
M = return to Main Menu
ESC key = return to previous screen X = eXit System Management Services
-------------------------------------------------------------------------------
Type menu item number and press Enter or select Navigation key:2

PowerPC Firmware

-------------------------------------------------------------------------------
Are you sure you want to exit System Management Services?
1. Yes
2. No


At this point, you should see the BOOTP packets increase until finally the system is able to load the minimal kernel, and start the NIM install, Once loaded, you reach the AIX install menu as below , from there I have select to restore the OS on hdisk0.

Type menu item number and press Enter or select Navigation key:

Welcome to Base Operating System Installation and Maintenance

Type the number of your choice and press Enter. Choice is indicated by >>>.

>>> 1 Start Install Now with Default Settings

2 Change/Show Installation Settings and Install

3 Start Maintenance Mode for System Recovery

4 Configure Network Disks (iSCSI)

5 Select Storage Adapters
System Backup Installation and Settings

Either type 0 and press Enter to install with the current settings, or type the
number of the setting you want to change and press Enter.

Setting: Current Choice(s):

1 Disk(s) where you want to install ...... hdisk0
Use Maps............................. No
2 Shrink File Systems..................... No
3 Import User Volume Groups............... Yes
4 Recover Devices......................... Yes

>>> 0 Install with the settings listed above.


Now system will install here and after installation complete you need to do post customization steps as per your environment.--

Monday 6 February 2012

Script for System Information


#!/bin/bash

a=1; c=0
a=1; c=0
# Gather system information, can e.g. be sent to | mail in a cronjob
f_() { while read l; do echo $l; done < $f ; }
#
f_() { while read l; do echo $l; done < $f ; }
# TODO
# ----
# * Netstat output
# * Memory/swap information
# * ifconfig information
# * Make output dependent on argv
# * md5sum checks                               (done)
# * Keep previeous values and compare
# * How to
# * chmod a+x sysinfo.sh
# * ./sysinfo.sh
####################### DO NOT EDIT UNDER THIS LINE ###########################

siheader() {
        echo "================================================================"
        echo -e "* System statistics for: \t`hostname`.`dnsdomainname`"
        echo -e "* Generated on: \t\t`date`"
        echo -e "* Running as: \t\t\t`whoami`"
        echo
}

fuptime() {
        upSeconds=$(cat /proc/uptime | tr "." " " | awk '{print $1}')
        secs=$((${upSeconds}%60))
        mins=$((${upSeconds}/60%60))
        hours=$((${upSeconds}/3600/24))
        days=$((${upSeconds}/86400))
        if [ "${days}" -ne "0" ]
        then
                echo -n "${days} days, "
        fi
        echo "`printf '%02d' ${hours}`:`printf '%02d' ${mins}`:`printf '%02d' ${secs}`"
}

siuptime() {
        echo "=================== Uptime ====================================="
        echo -e "* Uptime: \t\t\t`fuptime`"
        if [ -x /usr/bin/uprecords ];
        then
                echo -e "* High score: \t\t\t`uprecords | tail -n1 | cut -d'|' -f1 | cut -d'n' -f3 | sed 's/^[[:blank:]]*//'`"
        fi
        echo -e "* Load average: \t\t`cat /proc/loadavg | head -c14`"
        echo
}

fw () {
        OFS=${IFS}
        IFS=$'\n'
        CNT=$(echo `w | wc -l`-1 | bc)

        w | tail -n ${CNT} | while read -r a;
        do
                echo -e "\t${a}"
        done

        IFS=${OFS}
}

siusers() {
        echo "=================== Users ======================================"
        echo -e "* Active users: \t\t`who | wc -l`"
        echo "* User information"
        fw
        echo
}

fpstree() {
        OFS=${IFS}
        IFS=$'\n'
        pstree | while read -r a;
        do
                echo -e "\t${a}"
        done
        IFS=${OFS}
}

fcomms() {
        ps -eo comm | sort | uniq | grep -v ^COMMAND | column
        echo

        IFS=${OFS}
}

fprocs() {
        echo `TERM=Linux top -n1 -b | grep "Tasks" | awk '{print $4,$6,$8,$10}'`
        echo -e "==================================Tasks process and memory utilization=============================\n"
    echo "`top -n1 -b`"
}


sitasks() {
        echo "=================== Tasks ======================================"
        echo -e "* Number of running tasks: \t$(echo `ps ax | wc -l` - 1 | bc)"
        #This fucks up the email
        #echo "* PS Tree:"
        #fpstree
        echo "* Running programs:"
        fcomms
        echo -e "* CPU load: \t\t\t`TERM=linux top -n2 -b | grep 'Cpu' | tail -n1 | awk '{print $2+$4+$6}'`%"
        PROCS=`fprocs`
        echo "* Process state:"
        echo -e "\tRunning: \t\t`echo ${PROCS} | awk '{print $1}'`"
        echo -e "\tSleeping: \t\t`echo ${PROCS} | awk '{print $2}'`"
        echo -e "\tZombie: \t\t`echo ${PROCS} | awk '{print $3}'`"
        echo -e "\tStopped: \t\t`echo ${PROCS} | awk '{print $4}'`"
        echo
}

froute() {
        OFS=${IFS}
        IFS=$'\n'

        CNT=$(echo `/sbin/route | wc -l` - 1 | bc)
        /sbin/route | tail -n ${CNT} | while read -r a;
        do
                echo -e "\t${a}"
        done

        IFS=${OFS}
}

sinetwork() {
        echo "=================== Networking ================================"
        echo "* Routing table:"
        froute
        echo
}

simemory() {
        echo "=================== Memory ===================================="
        RAMTOTAL=`echo $(($(cat /proc/meminfo | grep MemTotal | awk '{print $2}')/1024))`
        echo "* Ram:\t\t\t free of ${RAMTOTAL}Mb"
}

sidiskstats() {
        echo "=================== Hard Disc ================================="
        echo "* Disk Information:"
        OFS=${IFS}
        IFS=$'\n'
        df -h | grep -v ^none | while read -r a;
        do
                echo -e "\t${a}"
        done
        IFS=${OFS}
        echo
        echo "* Mounts:"
        OFS=${IFS}
        IFS=$'\n'
        mount | while read -r a;
        do
                echo -e "\t${a}"
        done
        IFS=${OFS}
        echo
}

simd5() {
        if [ ! -e md5sums.lst ];
        then
                return
        fi

        echo "=================== MD5Sum Check =============================="

        OFS=${IFS}
        IFS=$'\n'

        echo "* Checking MD5 Sums"

        cat md5sums.lst | grep "^/" | while read -r a;
        do
                F=`echo ${a} | cut -d':' -f1`
                S=`echo ${a} | cut -d':' -f2`
                S2=`md5sum ${F} | cut -d' ' -f1`
                echo -n -e "\t${F}: \t\t\t\t"
                if [ "${S}" = "${S2}" ];
                then
                        echo "[OK]"
                else
                        echo "[INVALID]"
                fi                      
        done

        IFS=${OFS}
        echo
}


##For finding CPU model, cores and
cpuinfo() {
    echo "=================== CPU Details for Xen =============================="
    echo -e "CPU Details: \n`cat /proc/cpuinfo | sed -n '1,/^$/p'`"
    echo -e "No of Cores: \n`cat /proc/cpuinfo | grep processor | wc -l`"
    if [ "egrep '(vmx|svm)' /proc/cpuinfo >/dev/null 2>/dev/null" ];
    then
        echo -e "\n===============================================================\nServer supports Full-virtualization"
    else
        echo -e "\n===============================================================\nEither server does not support Full-virtualization or it is turned off in BIOS"
    fi

    if [ "egrep 'pae' /proc/cpuinfo >/dev/null 2>/dev/null" ];
    then
        echo -e "\n===============================================================\nServer supports Para-virtualization"
    else
        echo -e "\n===============================================================\nServer does not support Para-virtualization"
    fi
}

##For disk info
diskinfo() {
        echo "=================== Disk usage =============================="
        echo -e "Disk Usage details: \n`df -h`"
}
##Distro info
distroinfo() {
        echo "=================== Distro Info =============================="
        echo -e "Distro details: \n`lsb_release -a`"
        echo -e "Kernel details: \n`uname -a`"
}

##Distro info
deviceinfo() {
        echo "=================== Device Info =============================="
        echo -e "Device details: \n`lspci -v`"
        echo -e "Kernel details: \n`uname -a`"
}
summary() {
        siheader
        siuptime
        siusers
        sitasks
        sinetwork

        simemory
        sidiskstats
    fprocs
        simd5
    deviceinfo
    cpuinfo
    distroinfo
        echo "==============================================================="
        echo "* Brought to you by Santosh Bhadoriya"
}

summary
Twitter Bird Gadget