Saturday, August 25, 2012

Websphere Training

WebSphere Introduction

What is WebSphere?
WebSphere is IBM's integration software platform. It includes the entire middleware infrastructure -- such as servers, services, and tools--needed to write, run, and monitor 24x7 industrial-strength, on demand Web applications and cross-platform, cross-product solutions. WebSphere provides reliable, flexible, and robust integration software.

WebSphere Application Server
is the base for the infrastructure; everything else runs on top of it. It supports SOA and non-SOA environments. WebSphere Process Server, which is based on WebSphere Application Server, and WebSphere Enterprise Service Bus, provide the foundation for service-oriented architected (SOA), modular applications. Collectively, they support the use of business rules to drive applications that support business processes. High performance environments also use WebSphere Extended Deployment as part of their base infrastructure. Other WebSphere products provide a wide variety of additional services, as described below.

CICS Transaction Server is the base for most mainframe applications today and supports the development of applications in popular languages such as COBOL, PL/I, C/C++ and Java.

WebSphere is a modular platform based on industry supported open standards. You can plug your existing assets into WebSphere using trusted and enduring interfaces, and you can continue to extend your environment as your needs grow. WebSphere runs on many platforms including AIX, HP Unix, i5/OS, Linux, Sun Solaris, Windows, and z/OS.

WebSphere Application Server (WAS) is a server for deploying and managing applications on the web. It is a deployment environment for Java based applications (it is basically an environment for running Java code). For example, the eClient of IBM Content Manager uses Java Server Pages (JSPs). JSPs contain HTML and embedded Java code that is compiled and run by WAS, similar to PHP. WebSphere Application Server is actually part (or the foundation) of a huge range of products, called the WebSphere family of products.

WAS is built on the services of a web server to provide additional services to support business applications and transactions on the web. A common example of this is persistence support for user sessions that cannot be provided by only using an HTTP server. In general, WAS is able to facilitate a multi-tiered, web enabled environment that provides security, reliability, availability, scalability, flexibility and performance. WAS can, of course, serve static HTML and dynamic content.

Releases available:

  • WAS Express (Single Server): Designed to support only a single hardware server. For small companies or individuals.
  • WAS Base: intended for large production environments. Its purpose: A stand-alone, single machine, which is not scalable (1 process on 1 machine).
  • WAS Network Deployment (ND): offers specific high end functionality. Actually the same as the base version, but this version is scalable: it can be spread over several systems to offer load-balancing capabilities.
  • WAS Enterprise: the same as the ND version, but with added features. Nowadays it is also called the Business Integration Foundation version.
The admin console of WAS is also a WebSphere application, usually available through:
http://[server]:9090/admin
WAS 5 has a connection pooling feature, which can result in a significant observable reduction in response time, especially for database connections. It reduces the overhead of creating a new connection for each user and disconnting it afterwards, by using existing connections from a connection pool. WAS communicates with databases via JDBC, which is actually the driver for a database.

What is WebSphere Application Server?

IBM® WebSphere® Application Server V6.1 is the premier open-standards Java™ 5 Standard Edition (J5SE), Java 2 Enterprise Edition (J2EE) 1.4, and Web services-based application server. It helps you deploy and manage applications ranging from simple Web sites to powerful on demand solutions. WebSphere Application Server offers a rich application deployment environment with a complete set of application services, including capabilities for transaction management, security, clustering, performance, availability, connectivity, and scalability.

What this means is that WebSphere Application Server provides support for:

    * Deploying an application.
    * Managing the resource requirements for the application.
    * Ensuring the availability, isolation, and protection of the application from other applications and their resource requirements.
    * Monitoring and securing the application.

In addition, the WebSphere Application Server product family includes several unique packages that are designed to meet a wide range of customer requirements.

New to the WebSphere Application Server product family are features designed to simplify administration and to increase productivity for developers, like enhanced security and expanded standards support.

Monday, August 20, 2012

IBM AIX - Commands (Contd) - LVM - Disks & Filesystems

IBM AIX - Commands (contd)

IBM AIX Operating System - Some useful Commands gathered from IBM and other websites!!!

LVM - Disks & Filesystems

List all PVs in a system (along) with VG membership

lspv

List all LVs on PV hdisk6

lspv -l hdisk6

List all imported VGs

lsvg

List all VGs that are imported and on-line

lsvg -o

›››   The difference between lsvg and lsvg -o are the imported VGs that are offline.
List all LVs on VG vg01

lsvg -l vg01

List all PVs in VG vg02

lsvg -p vg02

List filesystems in a fstab-like format

lsfs

Get extended info about the /home filesystem

lsfs -q /home

Create the datavg VG on hdisk1 with 64 MB PPs

mkvg -y datavg -s 64 hdisk1

Create a 1 Gig LV on (previous) datavg

mklv -t jfs2 -y datalv datavg 16

Create a log device on datavg VG using 1 PP

mklv -t jfs2log -y datalog1 datavg 1

Format the log device created in previous example

logform /dev/datalog1

Place a filesystem on the previously created datalv

crfs -v jfs2 -d datalv -m /data01 -A y

›››   A jfs2 log must exist in this VG and be logform(ed). (This was done in the previous steps.) -m specifies the mount point for the fs, and -A y is a option to automatically mount (with mount -a).
Create a scalable VG called vg01 with two disks

mkvg -S -y vg01 hdisk1 hdisk2
Create a FS using the VG as a parameter

crfs -v jfs2 -g simplevg -m /data04 -A y -a size=100M

›››   The VG name here is "simplevg". A default LV naming convention of fslvXX will be used. The LV, and in this case log-LV, will be automatically created.
Take the datavg VG offline

varyoffvg datavg
Vary-on the datavg VG

varyonvg datavg

›››   By default the import operation will vary-on the VG. An explicit vary-on will be required for concurrent volume groups that can be imported onto two (or more) systems at once, but only varied-on on one system at a time.
Remove the datavg VG from the system

exportvg datavg
Import the VG on hdisk5 as datavg

importvg -y datavg hdisk5

›››   The VG in this example spans multiple disks, but it is only necessary to specify a single member disk to the command. The LVM system will locate the other member disks from the metadata provided on the single disk provided.
Import a VG on a disk by PVID as datavg

importvg -y datavg 00cc34b205d347fc
Grow the /var filesystem by 1 Gig

chfs -a size=+1G /var

›››   In each of the chfs grow filesystem examples, AIX will automatically grow the underlying LV to the appropriate size.
Grow the /var filesystem to 1 Gig

chfs -a size=1G /var

List the maximum LPs for LV fslv00

lslv fslv00 | grep MAX
Increase the maximum LPs for fslv00 LV

chlv -x 2048 fslv00

Create a mirrored copy of fslv08

mklvcopy -k -s y fslv08 2

›››   syncvg -l fslv08 must be run if the -k (sync now) switch is not used for mklvcopy.
Add hdisk3 and hdisk4 to the vg01 VG

extendvg vg01 hdisk3 hdisk4

Mirror rootvg (on hdisk0) to hdisk1

extendvg rootvg hdisk1

mirrorvg -S rootvg hdisk1

bosboot -ad hdisk0
bosboot -ad hdisk1
bootlist -m normal hdisk0 hdisk1

›››   The -S option to mirrorvg mirrors the VG in the background. Running bosboot on hdisk0 is not required - just thorough.
Find the file usage on the /var filesystem

du -smx /var

List users & PIDs with open files in /data04 mount

fuser -xuc /data04

List all mounted filesystems in a factor of Gigabytes

df -g → (-m and -k are also available)
Find what PV the LV called datalv01 is on

lslv -l datalv01

›››   The "COPIES" column relates the mirror distribution of the PPs for each LP. (PPs should only be listed in the first part of the COPIES section. See the next example.) The "IN BAND" column tells how much of the used PPs in this PV are used for this LV. The "DISTRIBUTION" column reports the number of PPs in each region of the PV. (The distribution is largely irrelevant for most modern SAN applications.)
Create a LV with 3 copies in a VG with a single PV

mklv -c 3 -s n -t jfs2 -y badlv badvg 4

›››   Note: This is an anti-example to demonstrate how the COPIES column works. This LV violates strictness rules. The COPIES column from lslv -l badlv looks like: 004:004:004
Move a LV from hdisk4 to hdisk5

migratepv -l datalv01 hdisk4 hdisk5
Move all LVs on hdisk1 to hdisk2

migratepv hdisk1 hdisk2

›››   The migratepv command is an atomic command in that it does not return until complete. Mirroring / breaking LVs is an alternative to explicitly migrating them. See additional migratepv, mirrorvg, and mklvcopy examples in this section.
Put a PVID on hdisk1
chdev -l hdisk1 -a pv=yes
›››   PVIDs are automatically placed on a disk when added to a VG
Remove a PVID from a disk

chdev -l hdisk1 -a pv=clear

›››   This will remove the PVID but not residual VGDA and other data on the disk. dd can be used to scrub remaining data from the disk. The AIX install CD/DVD also provides a "scrub" feature to (repeatedly) write patterns over data on disks.
Move (migrate) VG vg02 from hdisk1 to hdisk2

extendvg vg02 hdisk2
migratepv hdisk1 hdisk2
reducevg vg02 hdisk1

›››   Mirroring and then unmirroring is another method to achieve this. See the next example
Move (mirror) VG vg02 from hdisk1 to hdisk2

extendvg vg02 hdisk2
mirrorvg -c 2 vg02
unmirrorvg vg02 hdisk1
reducevg vg02 hdisk1

›››   In this example it is necessary to wait for the mirrors to synchronize before breaking the mirror. The mirrorvg command in this example will not complete until the mirror is established. The alternative is to mirror in the background, but then it is up to the administrator to insure that the mirror process is complete.
Create a striped jfs2 partition on vg01

mklv -C 2 -S 16K -t jfs2 -y vg01_lv01 vg01 400 hdisk1 hdisk2

›››   This creates a stripe width of 2 with a (total) stripe size of 32K. This command will result in an upper bound of 2 (same as the stripe size) for the LV. If this LV is to be extended to another two disks later, then the upper bound must be changed to 4 or specified during creation. The VG in this example was a scalable VG.
Determine VG type of VG myvg

lsvg myvg | grep "MAX PVs"

›››   MAX PVs is 32 for normal, 128 for big, and 1024 for scalable VGs.
Set the system to boot to the CDROM on next boot

bootlist -m normal cd0 hdisk0 hdisk1

›››   The system will boot to one of the mirror pairs (hdisk0 or hdisk1) if the boot from the CD ROM does not work. This can be returned to normal by repeating the command without cd0.
List the boot device for the next boot

bootlist -m normal -o

Friday, August 10, 2012

IBM AIX - Migration with CD

If you are overwriting an existing system, gather the TCP/IP information before you begin this scenario. Also, before you perform a migration installation, make sure you have reliable backups of your data and any customized applications or volume groups. The instructions on how to create a system backup are described later in this article.
Using this scenario, you can migrate a system from AIX 4.3.3 (or later) to AIX 5.3. 


Step 1. Prepare for the migration

Before starting the migration, complete the following prerequisites:
  1. Ensure that the root user has a primary authentication method of SYSTEM. You can check this condition by typing the following command:
    # lsuser -a auth1 root

    If needed, change the value by typing the following command:
    # chuser auth1=SYSTEM root
  2. Before you begin the installation, other users who have access to your system must be logged off.
  3. Verify that your applications will run on AIX 5L Version 5.3. Also, check if your applications are binary compatible with AIX 5L Version 5.3. For details on binary compatibility, check out the AIX 5L Version 5 binary compatibility Web site. If your system is an application server, verify that there are no licensing issues. Refer to your application documentation or provider to verify on which levels of AIX your applications are supported and licensed. 
  4. Check that your hardware microcode is up to date.
  5. All requisite hardware, including any external devices, such as tape drives or CD/DVD-ROM drives, must be physically connected and powered on.
  6. Use the errpt command to generate an error report from entries in the system error log. To display a complete detailed report, type the following:
    # errpt -a
  7. There must be adequate disk space and memory available. AIX 5L Version 5.3 requires 128MB of memory and 2.2GB of physical disk space.
  8. Run the pre-migration script located in the mount_point/usr/lpp/bos directory on your CD. To mount the CD, run the following command:
    # mount -v cdrfs -o ro /dev/cdN /mnt 

    where "N" is your CD drive number.
  9. Make a backup copy of your system software and data. The instructions on how to create a system backup are described elsewhere in this article.
  10. Always refer to the release notes for the latest migration information.

Step 2. Boot from the AIX product CD

  1. If they are not already on, turn on your attached devices.
  2. Insert the AIX Volume 1 CD into the CD-ROM device.
  3. Reboot the system by typing the following command:
    # shutdown -r
  4. When the system beeps twice, press F5 on the keyboard or 5 on an ASCII terminal. If you have a graphics display, you will see the keyboard icon on the screen when the beeps occur. If you have an ASCII terminal, you will see the word keyboard when the beeps occur.
  5. Select the system console by pressing F1 or 1 on an ASCII terminal and press Enter.
  6. Select the English language for the BOS installation menus by typing a 1 at the Choice field and press Enter. The Welcome to Base Operating System Installation and Maintenance menu opens.
  7. Type 2 to select Change/Show Installation Settings and Install in the Choice field and press Enter.
     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 
    
         88   Help ? 
         99   Previous Menu
     >>>     Choice [1]: 2

Step 3. Verify migration installation settings and begin installation

  1. Verify that migration is the method of installation. If migration is not the method of installation, select it now. Select the disk or disks you want to install.
    1 System Settings:                
         Method of Installation....................Migration 
         Disk Where You Want to Install............hdisk0
  2. Select Primary Language Environment Settings after install.
  3. Type 3 and press Enter to select More Options. To use the Help menu to learn more about the options available during a migration installation, type 88 and press Enter in the Installation Options menu. 
  4. Verify the selections in the Migration Installation Summary screen and press Enter.
  5. When the Migration Confirmation menu displays, follow the menu instructions to list system information or continue with the migration by typing 0 and pressing Enter.
      Migration Confirmation 
    
    Either type 0 and press Enter to continue the installation,
    or type the number of your choice and press Enter. 
    
      1. List the saved Base System configuration files which 
           will not be merged into the system. These files are 
           saved in /tmp/bos.
      2. List the filesets which will be removed and not replaced.
      3. List directories which will have all current contents 
           removed.
      4. Reboot without migrating. 
    
    Acceptance of license agreements is required before using 
    system. You will be prompted to accept after the system 
    reboots. 
    
    >>> 0 Continue with the migration. 
    88 Help ? 
    
    ------------------------------------------------------------
    
    WARNING: Selected files, directories, and filesets 
    (installable options) from the Base System will be removed. 
    Choose 2 or 3 for more information. 
    
    >>> Choice[0]:
    

Step 4. Verify system configuration after installation

After the migration is complete, the system will reboot. Verify the system configuration, as follows:
  1. After a migration installation, the Configuration Assistant opens on systems with a graphics display. And after a migration installation, the Installation Assistant opens on systems with an ASCII display.

  2. Select the Accept Licenses option to accept the electronic licenses for the operating system.
  3. Verify the administrator (root user) password and network communications (TCP/IP) information.

    Use any other options at this time. You can return to the Configuration Assistant or the Installation Assistant by typing configassist or smitty assist at the command line.
  4. Select Exit the Configuration Assistant and select Next. Or, press F10 or ESC+0 to exit the Installation Assistant.
  5. If you are in the Configuration Assistant, select Finish now. Do not start the Configuration Assistant when restarting AIX and select Finish.
  6. When the login prompt displays, log in as the root user to perform system administration tasks.
  7. Run the /usr/lpp/bos/post_migration script.

IBM AIX Installation with CD

IBM AIX Installation with CD

Before you perform this step, make sure you have reliable backups of your data and any customized applications or volume groups. The instructions on how to create a system backup are described later in this article.
Using this scenario, you can install the AIX operating system for the first time or overwrite an existing version of the operating system. This scenario involves the following steps:


Step 1. Prepare your system

  • There must be adequate disk space and memory available. AIX 5L Version 5.2 and AIX 5L Version 5.3 require 128MB of memory and 2.2GB of physical disk space.
  • Make sure your hardware installation is complete, including all external devices.
  • If your system needs to communicate with other systems and access their resources, make sure you have the information in the following worksheet before proceeding with the installation:
Network AttributeValue
Network interfaceFor example: en0, et0
Host name
IP address
Network mask
Nameserver
Domain name
Gateway


Step 2. Boot from the AIX product CD

  1. Insert the AIX Volume 1 CD into the CD-ROM device.
  2. Make sure all external devices attached to the system, such as CD-ROM drives, tape drives, DVD drives, and terminals, are turned on. Only the CD-ROM drive from which you will install AIX should contain the installation media.
  3. Power on the system.
  4. When the system beeps twice, press F5 on the keyboard or 5 on an ASCII terminal. If you have a graphics display, you will see the keyboard icon on the screen when the beeps occur. If you have an ASCII terminal, you will see the word keyboard when the beeps occur.
  5. Select the system console by pressing F1 or 1 on an ASCII terminal and press Enter.
  6. Select the English language for the BOS installation menus by typing a 1 in the Choice field. Press Enter to open the Welcome to Base Operating System Installation and Maintenance screen.
  7. Type 2 to select 2 Change/Show Installation Settings and Install in the Choice field and press Enter.
  8. 
    
    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
          
         88   Help ? 
         99   Previous Menu
     
     >>>     Choice [1]: 2


Step 3. Set and verify BOS installation settings

  1. In the Installation and Settings screen, verify that the installation settings are correct by checking the method of installation (new and complete overwrite), the disk or disks you want to install, the primary language environment settings, and the advanced options.

    If the default choices are correct, type 0 and press Enter to begin the BOS installation. The system automatically reboots after installation is complete. Go to Step 4. Configure the system after installation.

    Otherwise, go to sub-step 2.
  2. To change the System Settings, which includes the method of installation and disk where you want to install, type 1 in the Choice field and press Enter
  3.  
    Installation and Settings 
    
    
    Either type 0 and press Enter to install with current settings, 
      or type the number of the setting you want to change 
      and press Enter.
         
         
    1 System Settings: 
      Method of Installation..................New and Complete Overwrite 
      Disk Where You Want to Install..hdisk0
         
         
    >>> Choice [0]: 1

  4. Type 1 for New and Complete Overwrite in the Choice field and press Enter. The Change Disk(s) Where You Want to Install screen now displays. 
  5.  
    Change Disk(s) Where You Want to Install 
    
    
    Type one or more numbers for the disk(s) to be used for 
    installation and press Enter. To cancel a choice, type the 
    corresponding number and Press Enter. At least one 
    bootable disk must be selected. The current choice is 
    indicated by >>>. 
    
             Name    Location Code Size(MB) VG Status Bootable
    
         1   hdisk0  04-B0-00-2,0  4296    None  Yes 
         2   hdisk1  04-B0-00-5,0  4296    None  Yes 
         3   hdisk2  04-B0-00-6,0  12288    None  Yes
    
    >>> 0 Continue with choices indicated above 
    
         66  Disks not known to Base Operating System Installation 
         77  Display More Disk Information 
         88  Help ? 
         99  Previous Menu 
    
    >>> Choice [0]:

  6. In the Change Disk(s) Where You Want to Install screen:
    1. Select hdisk0 by typing a 1 in the Choice field and press Enter. The disk will now be selected as indicated by >>>. To unselect the destination disk, type the number again and press Enter.
    2. To finish selecting disks, type a 0 in the Choice field and press Enter. The Installation and Settings screen now displays with the selected disks listed under System Settings.
  7. Change the Primary Language Environment Settings to English (United States). Use the following steps to change the Cultural Convention, Language, and Keyboard to English.
    1. Type 2 in the Choice field on the Installation and Settings screen to select the Primary Language Environment Settings option.
    2. Type the number corresponding to English (United States) as the Cultural Convention in the Choice field and press Enter.
    3. Select the appropriate keyboard and language options.
    You do not need to select the More Options selection, because you are using the default options in this scenario.
  8. Verify that the selections are correct in the Overwrite Installation Summary screen, as follows:
     
     
    Overwrite Installation Summary
    
    Disks:    hdisk0
    Cultural Convention:    en_US
    Language:    en_US
    Keyboard:    en_US
    64 Bit Kernel Enabled:    No
    JFS2 File Systems Created:    No
    Desktop:    CDE
    Enable System Backups to install any system:    Yes
    
    Optional Software being installed:
    
    >>> 1   Continue with Install
           88  Help ?
           99  Previous Menu
    
    >>> Choice [1]:

  9. Press Enter to begin the BOS installation. The system automatically reboots after installation is complete.

Step 4. Configure the system after installation

  1. After a new and complete overwrite installation, the Configuration Assistant opens on systems with a graphics display. On systems with an ASCII display, the Installation Assistant opens.
  2. Select the Accept Licenses option to accept the electronic licenses for the operating system.
  3. Set the date and time, set the password for the administrator (root user), and configure the network communications (TCP/IP).

    Use any other options at this time. You can return to the Configuration Assistant or the Installation Assistant by typing
    configassist or smitty assist at the command line.
  4. Select Exit the Configuration Assistant and select Next. Or, press F10 or ESC+0 to exit the Installation Assistant.
  5. If you are in the Configuration Assistant, select Finish now. Do not start the Configuration Assistant when restarting AIX and select Finish.
At this point, the BOS Installation is complete, and the initial configuration of the system is complete.

IBM AIX - filemon - Performance Monitoring

Performance Monitoring in IBM AIX 
filemon

Monitors the performance of the file system, and reports the I/O activity on behalf of logical files, virtual memory segments, logical volumes, and physical volumes.

The filemon command monitors a trace of file system and I/O system events, and reports on the file and I/O access performance during that period.

In its normal mode, the filemon command runs in the background while one or more application programs or system commands are being executed and monitored. The filemon command automatically starts and monitors a trace of the program's file system and I/O events in real time. By default, the trace is started immediately; optionally, tracing may be deferred until the user issues a trcon command. The user can issue trcoff and trcon commands while the filemon command is running in order to turn off and on monitoring, as desired. When tracing is stopped by a trcstop command, the filemon command generates an I/O activity report and exits.

The filemon command can also process a trace file that has been previously recorded by the trace facility. The file and I/O activity report will be based on the events recorded in that file.

 
Detailed I/O analysis with the filemon command 

The filemon command uses the trace facility to obtain a detailed picture of I/O activity during a time interval on the various layers of file system utilization, including the logical file system, virtual memory segments, LVM, and physical disk layers.
The filemon command can be used to collect data on all layers, or layers can be specified with the -O layer option. The default is to collect data on the VM, LVM, and physical layers. Both summary and detailed reports are generated. Since it uses the trace facility, the filemon command can be run only by the root user or by a member of the system group.
To determine whether the filemon command is installed and available, run the following command:

# lslpp -lI perfagent.tools

Tracing is started by the filemon command, optionally suspended with the trcoff subcommand and resumed with the trcon subcomand. As soon as tracing is terminated, the filemon command writes its report to stdout.
Note: Only data for those files opened after the filemon command was started will be collected, unless you specify the -u flag.
The filemon command can read the I/O trace data from a specified file, instead of from the real-time trace process. In this case, the filemon report summarizes the I/O activity for the system and period represented by the trace file. This offline processing method is useful when it is necessary to postprocess a trace file from a remote machine or perform the trace data collection at one time and postprocess it at another time.
The trcrpt -r command must be executed on the trace logfile and redirected to another file, as follows:

# gennames > gennames.out
# trcrpt -r   trace.out > trace.rpt
At this point an adjusted trace logfile is fed into the filemon command to report on I/O activity captured by a previously recorded trace session as follows: 
# filemon -i trace.rpt -n gennames.out | pg

In this example, the filemon command reads file system trace events from the input file trace.rpt. Because the trace data is already captured on a file, the filemon command does not put itself in the background to allow application programs to be run. After the entire file is read, an I/O activity report for the virtual memory, logical volume, and physical volume levels is displayed on standard output (which, in this example, is piped to the pg command).
If the trace command was run with the -C all flag, then run the trcrpt command also with the -C all flag (see Formatting a report from trace -C output).

The following sequence of commands gives an example of the filemon command usage:
# filemon -o fm.out -O all; cp /smit.log /dev/null ; trcstop

The report produced by this sequence, in an otherwise-idle system, is as follows:
Thu Aug 19 11:30:49 1999
System: AIX texmex Node: 4 Machine: 000691854C00

0.369 secs in measured interval
Cpu utilization:  9.0%

Most Active Files
------------------------------------------------------------------------
  #MBs  #opns   #rds   #wrs  file                 volume:inode
------------------------------------------------------------------------
   0.1      1     14      0  smit.log             /dev/hd4:858
   0.0      1      0     13  null
   0.0      2      4      0  ksh.cat              /dev/hd2:16872
   0.0      1      2      0  cmdtrace.cat         /dev/hd2:16739

Most Active Segments
------------------------------------------------------------------------
  #MBs  #rpgs  #wpgs  segid  segtype              volume:inode
------------------------------------------------------------------------
   0.1     13      0   5e93  ???
   0.0      2      0   22ed  ???
   0.0      1      0   5c77  persistent

Most Active Logical Volumes
------------------------------------------------------------------------
  util  #rblk  #wblk   KB/s  volume               description
------------------------------------------------------------------------
  0.06    112      0  151.9  /dev/hd4             /
  0.04     16      0   21.7  /dev/hd2             /usr

Most Active Physical Volumes
------------------------------------------------------------------------
  util  #rblk  #wblk   KB/s  volume               description
------------------------------------------------------------------------
  0.10    128      0  173.6  /dev/hdisk0          N/A




------------------------------------------------------------------------
Detailed File Stats
------------------------------------------------------------------------

FILE: /smit.log  volume: /dev/hd4 (/)  inode: 858
opens:                  1
total bytes xfrd:       57344
reads:                  14      (0 errs)
  read sizes (bytes):   avg  4096.0 min    4096 max    4096 sdev     0.0
  read times (msec):    avg   1.709 min   0.002 max  19.996 sdev   5.092

FILE: /dev/null
opens:                  1
total bytes xfrd:       50600
writes:                 13      (0 errs)
  write sizes (bytes):  avg  3892.3 min    1448 max    4096 sdev   705.6
  write times (msec):   avg   0.007 min   0.003 max   0.022 sdev   0.006

FILE: /usr/lib/nls/msg/en_US/ksh.cat  volume: /dev/hd2 (/usr)  inode: 16872
opens:                  2
total bytes xfrd:       16384
reads:                  4       (0 errs)
  read sizes (bytes):   avg  4096.0 min    4096 max    4096 sdev     0.0
  read times (msec):    avg   0.042 min   0.015 max   0.070 sdev   0.025
lseeks:                 10

FILE: /usr/lib/nls/msg/en_US/cmdtrace.cat  volume: /dev/hd2 (/usr)  inode: 16739
opens:                  1
total bytes xfrd:       8192
reads:                  2       (0 errs)
  read sizes (bytes):   avg  4096.0 min    4096 max    4096 sdev     0.0
  read times (msec):    avg   0.062 min   0.049 max   0.075 sdev   0.013
lseeks:                 8

------------------------------------------------------------------------
Detailed VM Segment Stats   (4096 byte pages)
------------------------------------------------------------------------

SEGMENT: 5e93  segtype: ???
segment flags:
reads:                  13      (0 errs)
  read times (msec):    avg   1.979 min   0.957 max   5.970 sdev   1.310
  read sequences:       1
  read seq. lengths:    avg    13.0 min      13 max      13 sdev     0.0

SEGMENT: 22ed  segtype: ???
segment flags:          inode
reads:                  2       (0 errs)
  read times (msec):    avg   8.102 min   7.786 max   8.418 sdev   0.316
  read sequences:       2
  read seq. lengths:    avg     1.0 min       1 max       1 sdev     0.0

SEGMENT: 5c77  segtype: persistent
segment flags:          pers defer
reads:                  1       (0 errs)
  read times (msec):    avg  13.810 min  13.810 max  13.810 sdev   0.000
  read sequences:       1
  read seq. lengths:    avg     1.0 min       1 max       1 sdev     0.0

------------------------------------------------------------------------
Detailed Logical Volume Stats   (512 byte blocks)
------------------------------------------------------------------------

VOLUME: /dev/hd4  description: /
reads:                  5       (0 errs)
  read sizes (blks):    avg    22.4 min       8 max      40 sdev    12.8
  read times (msec):    avg   4.847 min   0.938 max  13.792 sdev   4.819
  read sequences:       3
  read seq. lengths:    avg    37.3 min       8 max      64 sdev    22.9
seeks:                  3       (60.0%)
  seek dist (blks):     init   6344,
                        avg    40.0 min       8 max      72 sdev    32.0
time to next req(msec): avg  70.473 min   0.224 max 331.020 sdev 130.364
throughput:             151.9 KB/sec
utilization:            0.06

VOLUME: /dev/hd2  description: /usr
reads:                  2       (0 errs)
  read sizes (blks):    avg     8.0 min       8 max       8 sdev     0.0
  read times (msec):    avg   8.078 min   7.769 max   8.387 sdev   0.309
  read sequences:       2
  read seq. lengths:    avg     8.0 min       8 max       8 sdev     0.0
seeks:                  2       (100.0%)
  seek dist (blks):     init 608672,
                        avg    16.0 min      16 max      16 sdev     0.0
time to next req(msec): avg 162.160 min   8.497 max 315.823 sdev 153.663
throughput:             21.7 KB/sec
utilization:            0.04

------------------------------------------------------------------------
Detailed Physical Volume Stats   (512 byte blocks)
------------------------------------------------------------------------

VOLUME: /dev/hdisk0  description: N/A
reads:                  7       (0 errs)
  read sizes (blks):    avg    18.3 min       8 max      40 sdev    12.6
  read times (msec):    avg   5.723 min   0.905 max  20.448 sdev   6.567
  read sequences:       5
  read seq. lengths:    avg    25.6 min       8 max      64 sdev    22.9
seeks:                  5       (71.4%)
  seek dist (blks):     init 4233888,
                        avg 171086.0 min       8 max  684248 sdev 296274.2
  seek dist (%tot blks):init 48.03665,
                        avg 1.94110 min 0.00009 max 7.76331 sdev 3.36145
time to next req(msec): avg  50.340 min   0.226 max 315.865 sdev 108.483
throughput:             173.6 KB/sec
utilization:            0.10

Using the filemon command in systems with real workloads would result in much larger reports and might require more trace buffer space. Space and CPU time consumption for the filemon command can degrade system performance to some extent. Use a nonproduction system to experiment with the filemon command before starting it in a production environment. Also, use offline processing and on systems with many CPUs use the -C all flag with the trace command.
Note: Although the filemon command reports average, minimum, maximum, and standard deviation in its detailed-statistics sections, the results should not be used to develop confidence intervals or other formal statistical inferences. In general, the distribution of data points is neither random nor symmetrical.

IBM AIX - nmon - Performance monitoring

Performance Monitoring Tools commonly used in IBM AIX overview


nmon



Which is included with AIX from 5.3 TL09, AIX 6.1 TL02 and Virtual I/O Server (VIOS) 2.1 . It is installed by default.

1. nmon is short form of Nigel's Monitor.
2. This free tool gives you a huge amount of important performance information in one go.
3. It can output the data in a number of ways
4. On screen (console, telnet, VNC, putty or X Windows) using curses for low CPU impact which is updated once every two seconds. You hit single characters on you keyboard to enable/disable the various sorts of data.
5. Save the data to a comma separated file for analysis and longer term data capture.
a. Use this together with nmon Analyser Excel 2000 spreadsheet, which loads the nmon output file and automatically creates dozens of graphs ready for you to study or write performance reports.
b. Filter this data, add it to a rrd database (using an excellent freely available utility called rrdtool). This graphs the data to .gif or .png files plus generates the webpage .html file and you can then put the graphs directly on a website automatically on AIX with no need of a Windows based machine.
c. Directly put the data into a rrd database for your own analysis
6. nmon is a single binary for each operating system, so installing is as very easy as getting the file in your $PATH.

The nmon functionality is actually integrated within the topas command, which can be started in topas mode or nmon mode (just type "nmon"). 

You can flip between the two modes online by typing "~". 

You can also start nmon to capture to a file with the regular nmon options . This gives you the best of both worlds - one tool to watch the CEC/whole machine view of all your logical partitions (topas -C) and the same tool to drill down into the details of your AIX system in nmon style. 

The nmon tool is designed for AIX and Linux performance specialists to use for monitoring and analyzing performance data, including:


1. CPU utilization
2. Memory use
3. Kernel statistics and run queue information
4. Disks I/O rates, transfers, and read/write ratios
5. Free space on file systems
6. Disk adapters
7. Network I/O rates, transfers, and read/write ratios
8. Paging space and paging rates
9. CPU and AIX specification
10. Top processors
11. IBM HTTP Web cache
12. User-defined disk groups
13. Machine details and resources
14. Asynchronous I/O -- AIX only
15. Workload Manager (WLM) -- AIX only
16. IBM TotalStorage® Enterprise Storage Server® (ESS) disks -- AIX only
17. Network File System (NFS)
18. Dynamic LPAR (DLPAR) changes

Also included is a new tool to generate graphs from the nmon output and create .gif files that can be displayed on a Web site.

Benefits of the tool


The nmon tool is helpful in presenting all the important performance tuning information on one screen and dynamically updating it. This efficient tool works on any dumb screen, telnet session, or even a dial-up line. In addition, it does not consume many CPU cycles, usually below two percent. On newer machines, CPU usage is well below one percent.
Data is displayed on the screen and updated once every two seconds, using a dumb screen. However, you can easily change this interval to a longer or shorter time period. If you stretch the window and display the data on X Windows, VNC, PuTTY, or similar, the nmon tool can output a great deal of information in one place.
The nmon tool can also capture the same data to a text file for later analysis and graphing for reports. The output is in a spreadsheet format (.csv).

Installing the tool
The tool is a stand-alone binary file (a different file for each AIX or Linux version) that you can install in five seconds, probably less if you type fast. Installation is simple:

1. Copy the nmonXXX.tar.Z file to the machine. If using FTP, remember to use binary mode.
Note: Version XXX replaces this example.
2. To uncompress the file, run uncompress nmonXX.tar.Z.
3. To extract the files, run tar xvf nmonXX.tar.
4. To start the nmon tool, type nmon.

If you are the root user, you might need to type ./nmon.
Extra notes for using nmon 9 for AIX 4 only

You must be the root user or allow regular users to read the /dev/kmem file by typing the following command (as root):
chmod ugo+r /dev/kmem
If you want the disk statistics, then also run (as root):
chdev -l sys0 -a iostat=true

How to run the tool interactively



For running the tool interactively, read the front page of the file for a few hints. Then start the tool and use the one-key commands to see the data you want. For example, to get CPU, Memory, and Disk statistics, start nmon and type:
cmd
How to get help information while running interactively
Press the h key.
Additional help information
For additonal help information, try the following:
  • Type the nmon -? command for brief details.
  • Type the nmon -h command for full details.
  • Read the README file.
How to capture the data to a file for later analysis and graphing
Run nmon with the -f flag. See nmon -h for the details. But as an example, try to run nmon for an hour capturing data snapshots every 30 seconds by using,
nmon -f -s 30 -c 120 nmon -fT -s 30 -c 120
The second line also captures the top processes. Both of these create the output file in the current directory
<hostname>_date_time.nmon
This file is in a comma-separated values (CSV) format and can be imported into a spreadsheet directly. If you are using Lotus® 1-2-3, the file needs to be sorted. (This is not required for the Excel version of the nmon analyser.) 
On AIX, follow this example:
sort -A mymachine_311201_1030.nmon > xxx.csv

Notes to save you time:

  • To load the nmon data capture file into a spreadsheet, check the spreadsheet documentation for loading CSV data files (.csv). Many spreadsheets accept this data as just one of the possible files to load or provide an import function to do this. Many spreadsheets have a fixed number of columns and rows. I suggest you collect a maximum of 300 snapshots to avoid hitting these issues.
  • When you are capturing data to a file, nmon disconnects from the shell to ensure that it continues running, even if you log out. This means that nmon can appear to crash, even though it's still running in the background. To see if the process is still running, type:
    ps -ef | grep nmon

  • Read the README file for more information about which version of nmon to run on your particular operating system.
  • nmon Version 10 for AIX 5 no longer uses /dev/kmem, but only public APIs. So, you don't have to chage the permissions on /dev/kmem, and there is no need to have 32- and 64-bit versions of nmon.
  • For AIX 5.1, 5.2, and 5.3, use nmon 10.
  • On AIX, don't report lslpp -Lcq bos.-p core dumps on AIX 5.1, about ML03 onwards. Also, WLM stats go missing after upgrading to AIX 5.2 ML5 to Nigel Griffiths, as these are AIX bugs. These are avoided by using nmon Version 10.
  • Don't use Microsoft® Windows® Telnet and use a larger window than 80 x 25 characters. Many developers use VNC and PuTTY to display nmon from a Windows machine -- why not do the same!
New features for nmon on AIX Version 10
New FeaturesDescription
Starting upThere is also now a small shell script called "nmon" that starts the right nmon version. Place this script and nmon binaries in your $PATH and type: nmon. This version is now only compiled in 32-bit mode. So, it runs on 32- and 64-bit hardware. The idea is to make it easier to install and run.
N = NFSNFS is completely new for nmon 10.
p = PartitionsThis is for shared CPU partitions information -- the big p5/AIX5.3 feature.
C = CPUThis is for machines with 32 plus CPUs -- up to 128 logical CPUs by demand.
c = CPUDetails your physical CPU use -- if you are on a POWER5 with AIX 5.3 and in a shared CPU environment.
S = SubclassThis is for WLM subclasses -- by request.
a = Disk adaptersGives you details of the disk adapter -- like their full type.
r = ResourcesThis includes your CPU speed in MHz.
k = KernelGives some new fields.
L = Large pagesGives you large-page stats -- popular with high-performance guys.
D = DiskGives you more information about your disks, disk type sizes, free, volume groups, adapter, and so forth.
n = NetworkGives you information about your network adapters details, MTU, and errors.
m = MemoryGives you more details on where your memory is going, system (kernel) and processes, and active virtual memory.
-BThis is a start-up option to remove the boxes.
Some Screen Shots of nmon,




 

Determine the load of your system

 

By executing uptime, you get the load on your system. The load indicates the amount of programs that are being executed at the same time. 

[root@theunix] uptime
  04:19PM   up 62 days,   1:57,  3 users,  load average: 12.26, 11.86, 8.77
[root@theunix]

 

Determine the cpu usage (user/sys/idle/wait)

 

Use the command vmstat 10 10. 

[root@theunix] vmstat 10 10
kthr     memory             page              faults        cpu
----- ----------- ------------------------ ------------ -----------
 r  b   avm   fre  re  pi  po  fr   sr  cy  in   sy  cs us sy id wa
 4  1 257816  2166   0   0   0 315  287   0 615 10202 1030  9 19 51 22
 8  1 257579  2412   0   0   0 147 1407   0 588 32601 1745 17 81  1  1
11  1 259625   171   0   0   0 494 10911   0 647 31634 1440 18 82  0  0
11  1 259720   270   0   0   0 281 2413   0 593 34101 1652 21 79  0  0
11  1 259282   555   0   0   0 246 2619   0 669 33614 1814 16 84  0  0
...
[root@theunix]

 

Determine the memory/swap usage of an AIX system

 

Use the commands svmon and lsps. 

[root@theunix] lsps -a
Page Space  Physical Volume   Volume Group    Size   %Used  Active  Auto  Type
hd6         hdisk0            rootvg         768MB      47     yes   yes    lv
[root@theunix] svmon
               size      inuse       free        pin    virtual
memory       262128     260139        288      66603     258643
pg space     196608      91566

               work       pers       clnt      lpage
pin           66609          0          0          0
in use       228672       7884      23583          0
[root@theunix]

Svmon uses frames, multiply every frame by 1024 to get the size in bytes. Also be sure to install the packages bos.perf.tools in order to get svmon work.

 

Determine the IO load on your systems disks

 

Use the command iostat, do know thet the first entry is the entry since boot. 

[root@theunix] lslpp -w /usr/bin/svmon
  File                                        Fileset               Type
  ----------------------------------------------------------------------------
  /usr/bin/svmon                              bos.perf.tools        File 
 
[root@theunix] iostat 5 2

tty:      tin         tout   avg-cpu:  % user    % sys     % idle    % iowait
          0.1          4.8               8.7     18.5       51.2      21.6

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk1           1.6      16.4       3.5    6873724  81062953
hdisk0           1.8      16.9       3.7   10202425  80417825
cd0              0.0       0.0       0.0          0         0

tty:      tin         tout   avg-cpu:  % user    % sys     % idle    % iowait
          0.0        135.2              17.4     82.6        0.0       0.0

Disks:        % tm_act     Kbps      tps    Kb_read   Kb_wrtn
hdisk1           0.0       0.0       0.0          0         0
hdisk0           2.4      15.2       3.4         76         0
cd0              0.0       0.0       0.0          0         0
[root@theunix]

If you get as output: 

[root@theunix] iostat

tty:      tin         tout   avg-cpu:  % user    % sys     % idle    % iowait
          0.1          4.8               8.7     18.5       51.2      21.6
                " Disk history since boot not available. "

[root@theunix]

you have to activate iostat counters by typing the following command:

  • /usr/sbin/chdev -l sys0 -a "iostat=true"

 

AIX temperature sensors

 

By executing the command /usr/lpp/diagnostics/bin/uesensor, you can, on supported platform, get the fan speeds and temperature of your system:

[root@theunix] /usr/lpp/diagnostics/bin/uesensor -a
3 0 11 31 P1
9001 0 11 2100 F1
9001 1 11 2760 F2
9001 2 11 1890 F3
9001 3 11 1890 F4
9002 0 11 5129 P1
9002 1 11 3129 P1
9002 2 11 5129 P1
9002 3 11 12077 P1
9004 0 11 3 P3-V1
9004 1 11 3 P3-V2
9004 2 11 3 P3-V3

[root@theunix]

Pages