Wednesday, December 22, 2010

TQ-UNIX

---------------gunzip <> file

------------kill the process

ps -ef | grep java ---to get the process id

kil -9 Process id

-----------to start server

./startServer.sh server1

.........for disk space

df -k/g

aix configuration:

prtconf |pg

--------------manual heapdump

Go to server->profiles->profileName->bin

wsadmin.sh

set ObjectName [$AdminControl completeObjectName type=JVM,process=server1,*]

$AdminControl invoke $ObjectName generateHeapDump

------------------nmon commands

App server - nmon_aix53 -F /u02/ibm/WebSphere/AppServer/profiles/AppSrv01/bin/nmon/metrics/appsrv_nmonstat.csv -t -r -s15 -c3000

Db server - nmon_aix53 -F /u01/sqllib/nmon_aix53/metrics/dbsrv_nmonstat.csv -t -r -s15 -c3000

----- cat SystemOut_* |grep -i Currency |wc –l’

---- grep -c "Failed to get byte stream error response message for resource id "Sparrow ATM Transactions"" SystemOut.log

--- grep -F "Failed to get byte stream error response message for resource id" SystemOut.log

----

interactive nmon

\nmon

c-cpu

m-memory

t -top process

---installing nmon

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

* Copy the nmonXX.tar.Z file to the machine - if using FTP, remember to use binary mode. Note: in XXX this example will be replaced by the version.

* To uncompress the file run uncompress nmonXX.tar.Z

* To extract the files run tar xvf nmonXX.tar

* Read the README file.

* Start nmon by typing the command nmon

* If you are the root user you may need to type ./nmon

This is under review to make it simpler

Extra notes for using nmon 9 for AIX 4 only

1. 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

2. If you want the disk statistics, then also run (as root):

chdev -l sys0 -a iostat=true

Extra notes for using nmon 10 for AIX 5.1 only

You will need to have installed the libperfstat library from the AIX CDROMs.

This is in bos.perf.libperfstat package or nmon will fail to start and report it is missing.

To run interactively

Just type the name of the nmon tool for your operating system - see the FAQ section if you cann not work this out. Then use the one-key commands to see the data you want and to hid it again. For example, to get Cpu, Memory, and Disk statistics, start nmon and type: cmd

To get help information while running interactively, type h

To get more help information

* For brief details, type nmon -?

* For full details, type nmon -h

Hints and Tips:

* The Microsoft Windows telnet is not recommend as it is a very poor terminal emulator.

* Use a larger window than 80x25 characters.

* The developer uses VNC and putty to display nmon from a Windows machine.

* On AIX with X Windows, the "dtterm" terminal emulator allows colours and nmon can use these to light information.

Capturing data to a file for later analysis and graphing

Run nmon with the -f or -F flag. See nmon -h for the details, but as an example, to run nmon for an hour capturing data snapshots every 15 seconds for an hour (15*240=3600 seconds) use:

* nmon -f -s 15 -c 240

* nmon -fT -s 15 -c 240

The second line also captures the top processes. Both of these will create the output file in the current directory called: _date_time.nmon

This file is in a comma separated values format and can be imported into a spread sheet directly.

* FOR Lotus 1-2-3 ONLY (NOT RECOMMENDED ANY LONGER)

* If you are using Lotus 1-2-3 the file needs to be sorted before importing. On AIX, follow this example: sort -A mymachine_311204_1030.nmon > xxx.csv

This sorting is not required for the Excel version of the nmon analyser.

Hints and Tips:

* To load this into a spreadsheet, check the spreadsheet documentation for loading comma-separated value (.csv) data files. 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 fixed maximum numbers of columns and rows.

* We suggest you collect a maximum of 300 snapshots to avoid hitting these issues and to make a nice looking graph. Also not a 1024x768 computer screen with 350 data points would only have approximately two pixels per data. There is little purpose in having more data points.

* When you are capturing data to a file, the nmon tool disconnects from the shell, to ensure that it continues running even if you log out. This means that nmon can appear to crash, but it is still running in the background.

Sample output for nmon

Take this link to see the nmon Sample On Screen Output

Ideas for the next release for AIX wanted

These are the current ideas for the next release:

* Proper pop-down menu system for selecting the statistics to be displayed

* User decides which stats appear first = at the top of the screen

* Disk stats by Volume Group

* Detailed paging space file use, sizes, %used, active, auto etc.

Please vote now by email to the author or forward any other ideas.

Ideas for the next release of Linux wanted

The Linux version is the prime focus for the next release and there are many functions to be added. As Linux get in more production use it is important the production style performance monitoring and tuning becomes available. Classic Linux tuning involves rebuilding the kernel and added modules or packages. In many sites this is just not acceptable and passive monitoring (like nmon) is the only option. Some of the options are:

* Upgrade to the nmon 10 user interface - now in nmon for Linux 11

* Add NFS support - now in nmon for Linux 11

* Add kernel stats to run queues, context switches, fork etc. - some in nmon for Linux 11

* User Defined Disk Groups - now in nmon for Linux 11

If you have any suggestions or more importantly know where the data can be found, please let me know via email.

-------Aix Performance

http://www.ibm.com/developerworks/aix/library/au-aix7memoryoptimize2/index.html?ca=drs-

---------------netstat

netstat -s -f inet

netstat -a -I interface

To display detailed data of active sockets, enter the following command:

netstat -aon

To display the routing table, enter the following command:

netstat -rn

to capture Session info

netstat -A | grep "tcp" | grep "blraix-ubt2"

TCP/IP Troubleshooting in AIX Using Network Packet Traces-http://www.theillien.com/Sys_Admin_v12/html/v08/i12/a6.htm

--------------check this for TCP throughput on AIX

http://www.ibm.com/developerworks/aix/library/au-aix5_cpu/index.html

--------------------------The below ULR gives information to understand VMSTAT data.

http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/mem_usage_vmstat.htm

------------------------IOSTAT

DB

iostat -t -T -f 10 3600 |grep /ubpt01 > /db2data1/IOSTAT/Dbiostat_`date +%Y%m%d%H%M`.csv

APP

iostat -t -T -f 10 3600 |grep /ibm > /ibm/WebSphere7/AppServer/profiles/AppSrv01/logs/Appiostat_`date +%Y%m%d%H%M`.csv

No comments:

Post a Comment