Sunday, October 31, 2010

Refresh Packs & Fix Packs

As I said, my goal is to install WAS 6.0.2.5 and I have installed only WAS6.0. How to bring the installation to 6.0.2.5? For that, you need to goto ibm and download fix packs and refresh packs. What I did is, first I have installed Refresh Pack 2 and on that I have installed a fix pack.
Note: Before applying fix packs or refresh packs, make sure that you have stopped the server.
This raises a question, How to install these fix packs and refresh packs?
Note: As a good practice, before installing any fix packs or patches, or refresh packs, take a backup of the existing configuration. How to do that?
Goto WAS_HOME/profiles/default/bin
issue this command
./stopServer.sh server1
This will stops the server.

Now, goto the WAS_HOME/bin
$./backupConfig.sh
This will take the backup of the server including the default profile.
The back will be stored as WebSphereConfig_YYYY_MM_DD.zip
Again it is a good practice to have separate folder for backups, and this will be according to the company policy.

I have first downloaded refresh pack 2. That comes as a tar.
Download the tar 6.0-WS-WAS-SolarisSparc-RP0000002.tar into the WAS_HOME. Untar it like this.
tar -xvf 6.0-WS-WAS-SolarisSparc-RP0000002.tar

This will create a folder updateinstaller in the WAS_ROOT.
In the updateinstaller folder, search for responsefiles subfolder.
You can see install.txt and uninstall.txt.
These two are responsefiles.
Edit the install.txt for your environment. I have edit that like this


-W maintenance.package="/software/IBM/WebSphere/updateinstaller
/maintenace/6.0-WS-WAS-SolarisSparc-RP0000002.pak"
-W product.location="/software/IBM/WebSphere/AppServer"
-W update.type="install"

Goto the /WAS_HOME/bin
at the command prompt issue this command
$setupCmdLine.sh
Now, again come to the updateinstaller folder and at the command prompt issue this
$ ./update -options responsefiles/install.txt -silent
This silently installs the refresh pack.
You have to check whether that installer installed properly or not. For that you need to goto the logs.
/WAS_HOME/logs/update/
check all the logs in all the foldrs in this folder.

Once you are done with the confirmation INSTCONFSUCCESS,
goto WAS_HOME/bin/
$./versionInfo.sh
This will give you the version of the current installation.
Now, start the server
WAS_HOME/profiles/default/bin
$./startServer.sh server1
If the installation is successful, the server will start.

Now, I have to install Fix Pack.
For that the procedure is same.
First I have cleaned up updateinstaller.
By the way, how to remove a folder which has files in that in Solaris?
rm -r updateinstaller
This is the command.
Now, the folder is deleted. Again download the fix pack 6.0.2-WS-WAS-SolarisSparc-FP0000005.tar
Stop the server as usual. And take the back up of the server as above.
Prepare the install.txt response file and install the fix pack in the silent mode.
Uff!!! Long process!!
Now, check the versionInfo of the product.
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0011I: WebSphere Application Server Release 6.0
WVER0012I: VersionInfo reporter version 1.15.3.1, dated 4/25/05

-------------------------------------------------------------------
IBM WebSphere Application Server Product Installation Status Report
-------------------------------------------------------------------

Report at date and time 2006-05-02 15:12:41-0400

Installation
-------------------------------------------------------------------
Product Directory /software/IBM/WebSphere/AppServer
Version Directory /software/IBM/WebSphere/AppServer/properties/version
DTD Directory /software/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory /software/IBM/WebSphere/AppServer/logs
Backup Directory /software/IBM/WebSphere/AppServer/properties/version/update/backup
TMP Directory /var/tmp

Installation Platform
------------------------------------------------------------------
Name IBM WebSphere Application Server
Version 6.0

Product List
------------------------------------------------------------------
BASE installed

Installed Product
------------------------------------------------------------------
Name IBM WebSphere Application Server
Version 6.0.2.5
ID BASE
Build Level cf50549.21
Build Date 12/8/05

------------------------------------------------------------------
End Installation Status Report
------------------------------------------------------------------

Start the server, access the Admin Console. You will see the 6.0.2.5 admin console.

Friday, October 29, 2010

AIX Commands

1.7 Filesystem

chfs -a size=+200000 /var increases /var FS by 100MB
du -sk /john shows directory used space in kb !!!!
mount all mounts all FS
umount /dataVolumes/rtest9.1.0 unmounts a FS
fuser -k /dev/cd0 Releases a CD that will not unmount !
fuser –c /dataVolumes/rtest9.1.0 -Find out which process_id lock the FS

1.8 System monitoring

istat Shows create/modify/access file info
alog -o -t boot | more displays system boot log
w Lists login users and their programs.
who Identifies the users currently logged in
/usr/local/es/swho Identifies the Ethershare users currently logged in
last |more shows last logins
last –20 Shows recent 20 lines
last root Shows username ‘root’ login/logout record
last ftp Shows all FTP session in the record
mount shows all mounted filesystems (nfs+local)
ps -ef show all running processes
ps -ef |grep Scitex show all scitex running processes
du -ak /scitex|sort -n -r|head –10 -Display 10 biggest directories on the volume by size
find /scitex -xdev -size +2048 -ls|sort -rn +6|head –10 -to find 10 top files in the root (/) directory larger than 1 MB.”-xdev” helps searching ONLY in “/” !!!!!!!!!
history Last commands run on the system by this user
alog -ot boot Lists a log of all boot operations
grep TX /etc/environment Verify daylight settings

1.9 Performance issues

nmon a nice monitor - runs only on AIX5 and up
topas a nice monitor - runs only on AIX 4.3.3 and up
monitor -top 10 -s 2 monitors system 10 top processes with 2 seconds
iostat 2 displays disks activity every 2 seconds refresh interval
iostat –a 2 AIX5 ONLY !!!!
displays disks and ADAPTER !!!! activity every 2 seconds refresh interval
vmstat 2 ;monitors virtual memory statistics every 2 seconds (see appendix A)
sar –P ALL 2 2 Show all CPU’s activity on an SMP machine
svmon –i 2 Monitors real and virtual memory
ps auxw | sort –r +3 |head –10 -Shows top 10 memory usage by process
ps auxw | sort –r +2 |head –10 -Shows top 10 CPU usage by process
ps –auw | grep defunct Shows zombies processes (to kill – reboot or kill the parent)
filemon –O all –o filemon.out ; find / -name core ; trcstop Traces FS,LV,disks,files activityof a “find” command into a logfile (filemon.out). Must be preceded by a trcstop command.
tprof –x find / -name core ; trcstop Traces CPU activityof a “find” command Severall logfile are created. Must be preceded by a trcstop command.
tprof -ske -x "sleep 30" -Trace CPU activity for next 30 seconds.Results in file sleep.tprof

lvmstat –ev svg1
lvmstat –v svg1 2 AIX5 ONLY !!!!
enable gathering the VG statistics
Display VG logical volumes statistics every 2 seconds
1.10 Remote issues (working over the modem)

pdelay tty0; pdisable tty0 >/dev/null ;penable tty0
-Resets tty0
stty erase '^?' Makes bakespace to work
/scitex/version/utils/modem/kermit -l /dev/ttyx –c atdt {phone #} Use Unix to Dail-out (for any reason) ttyx is the serial port the cable is connected
/scitex/version/utils/modem/kermit -s /u/d0/ripro_messages -i Sends a file to a remote desktop in binary mode
/scitex/version/utils/modem/kermit –r
-Receives a file to from remote desktop

1.11 Browsing errlog with errpt

errpt -a -s 0604090601 -e 0605090901 browse the errlog in detail for all errors within a timeframe
errpt -a -N SYSPROC |more
errpt -a -N SYSPROC > /tmp/err.log Browse the errlog for the SYSPROC resource, can be into the file
errpt -j 5DFED6F1 -Browse the errlog by the identifier
errpt –A -AIX5 ONLY !!!! Shows less detailes then errpt -a
errpt –D -AIX5 ONLY !!!! eliminates double entries
1.12 Security issues

chmod -s Filename Remove Sticky Bit to a file or directory

chmod +r+w+x+t Filename Add Read+Write+Execute+Temp mode to a file or directory.
This is a ‘blanket’ change for all owner, user & group.
Numeric Access Modes
0 (---) - no access
1 (--x) - execute permissions; search permissions for directories
2 (-w-) - write access
3 (-wx) - execute/search permission and write access
4 (r--) - read access
5 (r-x) - execute/search permission and read access
6 (rw-) - read and write access
7 (rwx) - execute/search permission and read and write access
mkpasswd -f rebuild the /etc/passwd indexes in case of suspected corruption
1.13 Miscellaneous
ksh
find / -type f|xargs grep "10.4.27.181" 2> /dev/null
-Find all files containing my IP address
compress -c file > file.Z Compresses the files while keeps the original

AIX Commands

1.6 Disks

synclvodm -vP svg3 synchronizes ODM and the disk VG info.
redefinevg svg3 Redfined VG definition in ODM
lqueryvg -p hdisk0 –Avt -reads logical volumes info from disk
bootinfo -s hdiskx Shows Megabytes available even if no volume group is assigned.
lspv -p hdiskx (PP's used, location on disk, mount point)
lscfg -vp -l hdiskx (all information about a disk/raid)

AIX Commands

Found some AIX commands thru google. Thought to share here. Enjoy :)
1. Useful commands
Note All AIX commands reference can be found under
http //www.austin.ibm.com/doc_link/en_US/a_doc_lib/aixgen/wbinfnav/CmdsRefTop.htm
1.1 Memory
bootinfo –r shows how much RAM does my machine has (as root)
lsattr –E –l sys0 –a realmem shows how much RAM does my machine have (as non root)
rmss -c 512
rmss -r sets the memory size to 512 MB
resets the memory size to the original one
1.2 Devices



lsattr -El en0 displays en0 driver params
lsattr -El ent0 displays ent0 HW params
lsattr -El rmt0 displays tape params
lscfg -vp -l rmt0 (all information about a tape drive)
lsattr -El sys0 displays system type, firmware, etc driver params
lscfg –v lists all system HW config (NVRAM)
lsdev –Csscsi list all scsi devices
lsdev –Cspci list all pci devices
lsparent –Ck scsi list all scsi adapters
lsdevfc list fiberchannel devices
cfgmgr Configures devices
lsdev -Ccdisk Shows all disks
lsdev -Cctape Shows all tapes
cfgmgr -v -l device –v Specifies verbose output. The cfgmgr command writes information about what it is doing to standard output.
cfgmgr -v -l device Name Specifies the named device to configure along with its children.
If you only turned on a disk tower at e.g. scsi2 cfgmgr -v -l scsi2 will only configure this with detailed output.
lsdisp To check which graphic adapter is installed.
lscfg -vp -l mga0 (all information about a adapter)
lscfg -vp -l hdisk0 | grep Machine gives info about the disk manufacture type
lsslot -c pci For 6F1 only !!!! Lists all slots ,voltage,boards,etc !!!!
bootlist -m normal cd0 rmt0 hdisk0 Changes the default bootlist
lsmcode -c display the system firmware level and service processor
lsmcode -r -d scraid0 display the adapter microcode levels for a RAID adapter scraid0
lsmcode -A display the microcode level for all supported devices





1.3 System info

/usr/bin/uname -m Get machine ID
/usr/bin/uname -M Get platform type
oslevel Displays current AIX level
oslevel -r Displays current AIX maintenance level
oslevel -g List filesets at levels later than maintenance level !!!
lsps -a Paging space settings.
lscfg -vp -l proc0 (1,2,3) (all information about a processor[s])
lscfg -vp -l mem0 |pg (all information about memory modules installed)
env ulimit Environment setings - show user ulimit
bootinfo –s hdisk0 Displays disk size
lsattr -El sys0 -a systemid Determines the system serial number
lscfg –vp|grep ROM|grep -v CD Determines the system Firmware level
1.4 System issues

TERM=vt100 -If you execute a command/application and it responds with msg
‘ The type of your terminal is unknown to the system’,run those commands (In ‘ksh’)
set term=vt100 -Same (In tcsh’)
rcp -rp /dataVolumes/brisque1.1.0/jobs/flower.job sciroot@ripro3:/dataVolumes/ripro3.3.0/jobs/ -Copying a file from one Unix machine (Brisque) to another (Server) the assumption is that both machines know each other’s names (in hosts file)
dd if=/dev/fd0 of=/temp/diskimage bs=4096 -Duplicate a diskette copy from diskette to hard drive
dd if=/temp/diskimage of=/dev/fd0 bs=4096 -copy diskette image onto diskette
/usr/lpp/X11/bin/xset -display unix 0 s off -Kill display timeout
lsfs -v jfs -List of Filesystem items.
lsfs -q -v jfs -you can see also the parameter of a filesystem and thus see if e.g. /backup was or is a big_filesystem_enabled one.
Important for the 2GB File limit.
lsuser –f root Shows all user parameters (max .file size,etc)
sysdumpdev -L Check last system dump status
sysdumpdev -l Check system dump device settings
lslpp -f Upd_Timna_DTM.obj List contents of the package
1.5 Networking

ksh
for ENT in ` lsdev –Cs pci|grep ent | awk '{ print $1 }'|cut –c 1,2,4 `;do
mktcpip –S $ENT
done
exit -Shows all interfaces IP config+mask+router+DNS !
host timna1 displays station default IP address – works ONLY in DNS environment
ifconfig en0 displays en0 driver params
netstat -i displays network interfaces setting
mktcpip -S en0 #host:addr:mask:_rawname:nameserv:domain:gateway:type:start
syslab18:192.9.100.1:255.255.255.0:en0:10.4.2.12:csil.creoscitex.com:10.4.30.1:N/A:no
GREAT TCPIP info in one command !!!
showmount –e displays all exported volumes
showmount -a show who's got my filesystemsses mounted over IP !
lssrc –g tcpip displays all IP oriented processes status
entstat -drt ent0 |grep –i error display any communication errors on etn0
entstat -r Resets all the statistics back to their initial values.
arp -a shows a local arp cache
cd /usr/local/es/;res restarts appletalk
netstat -ptcp shows IP statistics
netstat -pudp shows UDP statistics
netstat -c
-s
-m client only;
server only
NFS mount
netstat -I en0 10 Trace en0 every 10 seconds
netstat -rn Display routing info with IP address (10.4.27.182)
netstat -in Shows the state of all configured interfaces
netstat -r Display routing info with full hostnames (timna2.csil.creoscitex)
nfsstat –z ;to reset NFS stats without reboot
cat /etc/resolv.conf Check DNS settings
stopsrc –g NFS To stop NFS services on a client
startsrc –g NFS To start NFS services on a client
traceroute 149.115.39.1 Trace all hobs (interconnections=routers) to the destination IP
netpmon -o netpmon.out
trcstop Traces all network processes activity into a logfile. Must be preceede by a trcstop command !
nslookup hostname Shows the DNS server name and address
ping -R -c 1 bnc2 Ping with displaying the routing info
namerslv -s | grep domain | awk '{ print $2 }' Displays a fully qualified domain name of a host
rup Shows the status of a remote host on the local network
nmonnfs Traces all NFS processes activity
mount hostname:/filesystem /mount-point Mount an NFS filesystem
mknfsexp -d /directory Creates an NFS export directory
mknfsmnt Creates an NFS mount directory
rmnfs Stops and un-configures NFS services
mknfs Configures and starts NFS services
exportfs -u (filesystem) Un-exports a filesystem
exportfs Lists all exported filesystems
exportfs -a Exports all fs's in /etc/exports file

 

AIX Commands

Displaying top CPU_consuming processes:
#ps aux | head -1; ps aux | sort -rn +2 | head -10
Displaying top 10 memory-consuming processes:
#ps aux | head -1; ps aux | sort -rn +3 | head
Displaying process in order of being penalized:
#ps -eakl | head -1; ps -eakl | sort -rn +5
Displaying process in order of priority:
#ps -eakl | sort -n +6 | head
Displaying process in order of nice value
#ps -eakl | sort -n +7
Displaying the process in order of time
#ps vx | head -1;ps vx | grep -v PID | sort -rn +3 | head -10
Displaying the process in order of real memory use
#ps vx | head -1; ps vx | grep -v PID | sort -rn +6 | head -10
Displaying the process in order of I/O
#ps vx | head -1; ps vx | grep -v PID | sort -rn +4 | head -10
Displaying WLM classes
#ps -a -o pid, user, class, pcpu, pmem, args
Determinimg process ID of wait processes:
#ps vg | head -1; ps vg | grep -w wait
Wait process bound to CPU
#ps -mo THREAD -p
Cpu usage with priority levels
#topas -P

#svmon -Put 10 will give the memory mapping for the
top ten memory consuming processes.

#top


Remember, some commands needs you to be root. So, you switch to su to root.
Two important things here -
1. from ur profile, if u say
$su root
takes you to root with current shell. Means that, though u r root, u still carry ur .profile and ur env variables.
2. if u want to have root's env variables -
su - root or
su root
after getting into root
. ./.profile

While using df

Solaris
df -h is the command to display available disk free space in bytes
e.g.,
$df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d84 3.9G 136M 3.8G 4% /var
swap 6.6G 992K 6.6G 1% /tmp
/dev/md/dsk/d101 20G 7.8G 12G 41% /software

Equivalent df in AIX
df -g

WAS Migration Step By Step

Here is the IBM WAS Tech Library Article on "A quick guide for migrating to WebSphere Application Server V6.1"

http://www.ibm.com/developerworks/websphere/library/techarticles/0608_chalmers/0608_chalmers.html

Migration Notes #2

The migration tools are used as part of a four-step migration process:
1. Run WASPreUpgrade on the existing WebSphere Application Server configuration.
2. Uninstall the existing version of WebSphere Application Server.
3. Install the new version of WebSphere Application Server.
4. Run WASPostUpgrade on the new version.
In the second step, it is recommended that rather than uninstalling the existing version, it be made dormant. By keeping the existing software installed on the machine, it will be much easier to back out of the migration should unexpected problems arise.

The fully automated migration includes the following steps:
1. Migrate the existing Version 5.x deployment manager to Version 6.0 using the migration tools.
2. Migrate the HTTP servers and HTTP server plug-ins on all Web tier nodes.
3. Individually migrate the application server nodes using the migration tools.

The WASPreUpgrade and WASPostUpgrade tools effectively move the existing configuration into WebSphere Application Server Version 6.0.

Migration Notes #1

Why to migrate?
Two important things:.
For new features.
For maintenance support.
-> New Features
Again two views. Developer view and support view.
ex., My developer called me one day, said, struts framework x.xx version is throwing error on the development. I paid a look into the log and search for the errors in the IBM. Found that, that version of JVM donot support this version of struts. So, what to do? Its the developers call to have the latest copy the JVM which can support this version of struts and apps.
This is what is developer initiated migration.
Admin initiated migration -
Admin may initiate the migration too. Some of the app server errors must have been addressed in the new version of the application server and so the need for migration.
-> Support
If the product is end of the support, there is a need to migrate to supported version.

While migrating, one should need to understand inconsistencies and deprecations between the target and source environments.
In considering the incompatibilities and deprecations, we look at these major areas:
* J2EE differences
* J2SE/JDK differences
* Application Server runtime differences
* Programming Model Extension differences
* Third Party Library differences

-> J2EE Differences
Java Code, as we all know, is forward compatible. Meaning that, code compiled in JDK 1.3.0 runs on 1.4.0, but, may throw some deprecation warnings.
Its a good practice for the developers to address those deprecations in the code. So, when one plans to migrate from x version to y version, the development team should plan to revisit their code.

Collector Tool

How to run collector tool. IBM Doc says, run the tool not from APPSERVER_INST_PATH/bin, but run from working directory. What exactly is that?

The collector tool gathers information about your WebSphere Application Server installation and packages it in a Java archive (JAR) file that you can send to IBM Customer Support to assist in determining and analyzing your problem. Information in the JAR file includes logs, property files, configuration files, operating system and Java data, and the presence and level of each software prerequisite.

collector command - summary option

WebSphere Application Server products include an enhancement to the collector tool beginning with Version 5.0.2, known as the collector summary option.

The collector summary option helps you communicate with WebSphere Application Server technical staff at IBM Support. Run the collector tool with the -Summary option to produce a lightweight text file and console version of some of the information in the Java archive (JAR) file that the tool produces without the -Summary parameter. You can use the collector summary option to retrieve basic configuration and prerequisite software level information when starting a conversation with IBM Support.

The collector summary option produces version information for the WebSphere Application Server product and the operating system as well as other information. It stores the information in the Collector_Summary.txt file and writes it to the console. You can use the information to answer initial questions from IBM Support or you can send the Collector_Summary.txt file directly to IBM Support.

Collector tool collect key information including ffdc, configuration, logs, and so on and makes a jar file with all the information. So, depending on your configuration and all, jar file may occupy lot of space. So, IBM docs says that, create a folder out of appserver installation path.
Example,
mkdir /tmp/collector
cd /tmp/collector

Then run the script as needed
/appserver/instpath/profiles/profilename/bin/collector.sh
or
/appserver/instpath/profiles/profilename/bin/collector.sh -summery