Referencias:
OSWatcher (Includes: [Video]) (Doc ID 301137.1)
OS Watcher Users Guide (Doc ID 1531223.1)
OSWatcher Analyzer User Guide (Doc ID 461053.1)
Ejecutables:
- oswbb: a unix shell script data collector which collects and stores the data
- oswbba: a java utility which will analyze the data automatically and provide adv ice and produce graphs and an html document
OSWatcher can be downloaded ways:
standalone. Installing the standalone version will always give you the very latest version
installing as part of the TFA Database Support Tools Bundle
Parametrizacion:
ARG1 = snapshot interval in seconds. (30 segundos by default)
ARG2 = the number of hours of archive data to store. (48 horas by default)
ARG3 = (optional) the name of a compress utility to compress each file automatically after it is created.
ARG4 = (optional) an alternate (non default) location to store the archive directory.
Informacion obtenida:
- ps
- top
- ifconfig
- mpstat
- iostat
- netstat
- traceroute
- vmstat
- sar (HP-UX Only)
- cpuinfo (Linux Only)
- meminfo (Linux Only)
- slabinfo (Linux Only)
— iostat
Field Description
r/s Shows the number of reads/second
w/s Shows the number of writes/second
kr/s Shows the number of kilobytes read/second
kw/s Shows the number of kilobytes written/second
wait Average number of transactions waiting for service (queue length)
actv Average number of transactions actively being serviced
wsvc_t Average service time in wait queue, in milliseconds <<<<<<<<<<< IMPORTANTE
asvc_t Average service time of active transactions, in milliseconds
%w Percent of time there are transactions waiting for service
%b Percent of time the disk is busy
device Device name
— oswmpstat
nota mpstat obtiene informacion a nivel de CPU
csw Context switches
icsw Involuntary context switches
smtx Number of times a CPU failed to obtain a mutex
xcal Processor cross-calls (when one CPU wakes up another by interrupting it).
What to look for:
Involuntary context switches (this is probably the more relevant statistic when examining performance issues.)
Number of times a CPU failed to obtain a mutex. Values consistently greater than 200 per CPU causes system time to increase.
xcal is very important, show processor migration
— oswnetstat
Values to look at:
Collisions (Collis)
Output packets (Opkts)
Input errors (Ierrs)
Input packets (Ipkts)
Para sacar el ratio:
Network collision rate = Output collision / Output packets << 0.1
Input Error Rate = Ierrs / Ipkts. << 0.25
Many performance problems associated with the network involve the retransmission of the TCP packets.
%segment-retrans=(tcpRetransSegs / tcpOutDataSegs) * 100
— oswprvtnet
Informacion de red
— oswtop
load averages: 0.11, 0.07, 0.06 12:50:36
The three numbers are the average of the depth of the run queue over the last 1, 5, and 15 minutes.
In this example we can see that .11 processes were on the run queue on average over the last minute,
.07 processes on average on the run queue over the last 5 minutes, etc.
It is important to determine what the average load of the system is through benchmarking and then look for deviations.
A dramatic rise in the load average can indicate a serious performance problem.
136 processes: 133 sleeping, 2 running, 1 on cpu
Memory: 2048M real, 1061M free, 542M swap in use, 1605M swap free
It reflects how much real and swap memory a computer has, and how much is free.
«Real» memory is the amount of RAM installed in the system, a.k.a. the «physical» memory. «Swap» is virtual memory stored on the machines disk.
What to Look For
Large run queue. Large number of processes waiting in the run queue may be an indication that your system does not have sufficient CPU capacity.
Process consuming lots of CPU. A process which is «hogging» CPU is always suspect. If this process is an oracle foreground process its most likely running an expensive query that should be tuned.
Oracle background process should not hog CPU for long periods of time.
High load averages. Processes should not be backed up on the run queue for extended periods of time.
Low swap space. This is an indication you are running low on memory.
— oswvmstat
r Number of processes that are in a wait state and basically not doing anything but waiting to run
b Number of processes that were in sleep mode and were interrupted since the last update
w Number of processes that have been swapped out by mm and vm subsystems and have yet to run.
swap The amount of swap space currently available free The size of the free list
pi kilobytes paged in
po kilobytes paged out
What to look for:
Large run queue
-- Instalacion
tar xvf oswbb.tar
chmod 744 *
-- Uninstall
rm -rf oswbb
-- Configuracion
nota: Para cambiar la ubicacion de los resultados
Opcion 1:
export OSWBB_ARCHIVE_DEST=/usr/app/archive
Opcion 2: Configurarlo en el 4th parametro
./startOSWbb 30 48 None /usr/app/archive
'nota: 3rd parametro indica el compresor para los resultados'
'nota: oswatcher deja un heartbeat file en /tmp osw.hb donde indica la ubicacion de los resultados. Este fichero se borra cuando se para Oswatcher'
-- Otras Variables de entorno
export OSW_PS_SAMPLE_MULTIPLIER=3
'nota: Indica cuantas veces se lanzara el comando PS. ej Configuramos un sampleo cada 20 seg. Pues configurando este valor a 3, se lanzará el ps
cada 60 seg (20 seg * 3)'
'nota: OSWatcher captura la informacion en un formato de fecha English. Para que sea de tipo Unix hacemos esto'
vi OSWatcher.sh
oswgCompliance=1
-- Añadir pluggins al oswatcher
'nota: Podemos crear y añadir nuestros propios scripts al oswatcher'
Ej:
cat >call_du.sh
#!/bin/sh
du >> $1
'$1 sera el directorio para dejar los datos'
cd $HOME_OSWATCHER
vi extras.txt
call_du.sh du oswdu
'# shell_script utility_name directory_name
# where shell_script = shell program to execute
# where utility_name = name of this program
# where directory_name is directory name under the archive'
-- Start OSWatcher
nohup ./startOSWbb.sh 60 10 &
-- Stop OSWatcher
./stopOSWbb.sh
------------------------------
-- oswbba
------------------------------
java -version >= que 8
java -Duser.language=en_US -jar oswbba.jar -i C:\lmds\Papelera\archive
-Duser.language=en_US : por si la variable LANG es diferente entre origen y donde analizo los datos
-D : Para que te genere un dashboard de la informacion
-A : Para que genere un analisis de
-b Jan 9 13:15:00 2013 -e Jan 19 13:30:00 2013 : Fijamos el inicio y fin del analisis
/*
Parsing Completed.
Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter GC to Generate All CPU Gif Files
Enter GM to Generate All Memory Gif Files
Enter GD to Generate All Disk Gif Files
Enter GN to Generate All Network Gif Files
Enter L to Specify Alternate Location of Gif Directory
Enter Z to Zoom Graph Time Scale (Does not change analysis dataset)
Enter B to Returns to Baseline Graph Time Scale (Does not change analysis dataset)
Enter R to Remove Currently Displayed Graphs
Enter X to Export Parsed Data to Flat File
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale)
Enter A to Analyze Data
Enter D to Generate DashBoard
Enter Q to Quit Program
*/