Friday, January 31, 2014

ExaWatcher in X4-2 Exadata

The new old product appeared in the Exadata - ExaWatcher, documentation is in note 1617454.1.

It can monitor IB switches and databases.

The new path is like the old OSW path :  /opt/oracle.ExaWatcher

What it can monitor ?  These files are directories in the /opt/oracle.ExaWatcher/archive:

Diskinfo, 
IBCardInfo
IBprocs
Iostat
LGWR
Lsof
MegaRaidFW
Meminfo
Mpstat
Netstat
Ps
RDSinfo
Slabinfo
Top
Vmstat


ExaWatcher saves files in the / file system (/opt/oracle.ExaWatcher/archiv is the / FS), / size is 30g .
It runs these cmds respectively and fill the directories above :

iostat -t -x
cat /sys/class/net/ib0/carrier;/bin/cat /sys/class/net/ib1/carrier;/usr/sbin/ibstatus;/usr/bin/ibv_devinfo;/sbin/ifconfig -a | /bin/cat
/opt/oracle.ExaWatcher/LGWRExaWatcher.sh  -  делает cat/proc/$pid_LGWR/schedstat
top -b
vmstat
ps -eo flags,s,ruser,pid,ppid,c,psr,pri,ni,addr,sz,wchan,stime,tty,time,cmd
netstat -a -i -n; netstat -s; netstat -n -p -l
/opt/oracle.ExaWatcher/RDSinfoExaWatcher.sh 2>/dev/null
mpstat -P ALL
lsof +c0 -w +L -b -R -i; lsof +c0 -w +L -b -R -U; lsof +c0 -w +L1 -b -R
/opt/oracle.ExaWatcher/IBCardInfoExaWatcher.sh 2>/dev/null
cat /proc/meminfo
cat /proc/slabinfo
/opt/MegaRAID/MegaCli/MegaCli64 fwtermlog dsply -a0

There is difference between original OSW and Exadata versions (OSW and EW).
Original OSW store historical files in the *.dat, but the Exadata's version store files in bzip2 :

[root@ed02dbadm01 oracle.ExaWatcher]# ls -l archive/RDSinfo.ExaWatcher/
total 15224
-rw-r----- 1 root root   5136 Dec  8 10:08 2013_12_07_21_18_23_RDSinfoExaWatcher_db01.domain.mycompany.com.dat.bz2
-rw-r----- 1 root root   5438 Jan 23 16:02 2014_01_23_03_02_25_RDSinfoExaWatcher_db01.domain.mycompany.com.dat.bz2
-rw-r----- 1 root root   4998 Jan 23 17:02 

...
2014_01_31_16_49_45_RDSinfoExaWatcher_ed02dbadm01.distr.fors.ru.dat

But currenly writing file is *.dat.



How long  store the history:  looking the code
/opt/oracle.ExaWatcher/ExaWatcherCleanup.sh
I see that deleting is triggered when file system / is filled 80% . This code choose the one oldest file in each directory and delete it. And run this cycle again until / is 20% free.


The log for deleted files: /opt/oracle.ExaWatcher/log/OldFilesDeleted.log

 And the processes are:

[root@ed02dbadm01 ~]# ps -ef|grep -i ExaWatcher
root      12753      1  0 14:58 ?        00:00:00 /bin/bash ./ExaWatcher.sh --fromconf
root      16161  12753  0 14:59 ?        00:00:04 /usr/bin/perl /opt/oracle.ExaWatcher/ExecutorExaWatcher.pl /opt/oracle.ExaWatcher/ExaWatcher.execonf
root      16237  16161  0 14:59 ?        00:00:00 sh -c /usr/bin/iostat -t -x  5  720 2>/dev/null >> /opt/oracle.ExaWatcher/archive/Iostat.ExaWatcher/2014_01_24_14_59_00_IostatExaWatcher_ed02dbadm01.distr.fors.ru.dat
root      16259  16161  0 14:59 ?        00:00:00 sh -c /usr/bin/top -b -d 5 -n 720 2>/dev/null >> /opt/oracle.ExaWatcher/archive/Top.ExaWatcher/2014_01_24_14_59_00_TopExaWatcher_ed02dbadm01.distr.fors.ru.dat
root      16312  16161  0 14:59 ?        00:00:00 sh -c /usr/bin/mpstat -P ALL  5  720 2>/dev/null >> /opt/oracle.ExaWatcher/archive/Mpstat.ExaWatcher/2014_01_24_14_59_00_MpstatExaWatcher_ed02dbadm01.distr.fors.ru.dat
root      16557  16161  0 14:59 ?        00:00:00 sh -c /opt/oracle.ExaWatcher/ExaWatcherCleanup.sh 1386431083 1701963863 3600 /opt/oracle.ExaWatcher/archive/ 3145728 2>>/dev/null
root      16558  16557  0 14:59 ?        00:00:00 /bin/bash /opt/oracle.ExaWatcher/ExaWatcherCleanup.sh 1386431083 1701963863 3600 /opt/oracle.ExaWatcher/archive/ 3145728
root      30003  16161  0 15:33 ?        00:00:00 sh -c /usr/bin/vmstat  5  2 >> /opt/oracle.ExaWatcher/archive/Vmstat.ExaWatcher/2014_01_24_14_59_00_VmstatExaWatcher_ed02dbadm01.distr.fors.ru.dat


You can see the some input numbers for the cleaner:

ExaWatcherCleanup.sh 1386431083 1701963863 3600 /opt/oracle.ExaWatcher/archive/ 3145728 2>>/dev/null

I think first 2 are the StartTime and EndTime for this script. So the ExaWatcher is supposed to work in time between

[root@ed02dbadm02 oracle.ExaWatcher]# date --date @1386431083
Sat Dec  7 19:44:43 MSK 2013
[root@ed02dbadm02 oracle.ExaWatcher]# date --date @1701963863
Thu Dec  7 19:44:23 MSK 2023

3600 - is cycle length. CleanupInterval.
/opt/oracle.ExaWatcher/archive/ - place for historical files
3145728 - the maximal size of archive directory in KB. SpaceLimit.


Tuesday, January 21, 2014

OSWatcher and the Exadata (OSWbb is not supported on the Exadata)



Oracle has the OSWatcher (OSWbb) which make the snapshots of the server load (CPU load, Memory load, Disks load ...) and save these data into file.
In the Exadata we also have the OSWatcher, we can see its processes and it save files into /opt/oracle.oswatcher/osw.

In the OSWbb is the analyser(painter) utility - oswbba.jar.
But I didn't find oswbba.jar in the Exadata.

I downloaded the latest OSWbb, put the oswbba.jar into the Exadata and run it.
As a rresult i've got:

"ERROR. You do not have a compatible version of OSWatcher to use with oswbba.
This version of oswbba requires files collected by running OSWbb(6.0 and
higher). The version of you archive files are, Jan ,
which may be compatible with an earlier version of OSWg or oswbba."

Why? 
 The questions are:
- Why there is no appropriate the oswbba.jar in the Exadata ?
- How to update the OSWbb in the Exadata correctly ? 
- Why there is no instructions for OSWbb in the Exadata documentation ...
- Why full-stack patch don't contain the latest OSWbb ?

Answers here:
- Exadata contain its own OSW version which is not compatible to OSWbb.  
- OSWbb is for systems other than exadata. OSWBB is not supported on exadata. 
- OSWatcher for the exadata will be upgrade with image upgrade.
- There is no analyzer (painter) for Exadata OSW.
- OSWatcher Graph (OSWg) Does Not Work on Exadata System (Note 1344568.1)

Monday, January 13, 2014

How to find old performance statistics in the storage cell ?

In December last year we've finished one testing on the Exadata and go to long holidays ...
... New Year ...

This year customer asked us about the system load during its tests.

Its tests were about a month ago ...

In DB nodes the information was saved by sar which save the history for the last 30 days.
But in the storage cell we got:

[root@ed01cel02 ~]# sar -f /var/log/sa/sa30 -u -s 15:48:01 -e 17:49:01
Cannot open /var/log/sa/sa30: No such file or directory


 The sar statistics is keeping 7 days in storage cell, because

[root@ed01cel02 ~]# cat /etc/sysconfig/sysstat
# How long to keep log files (days), maximum is a month
HISTORY=7


 What to do ?
And we decided to look into OSWather.
It is installed into Exadata by default, and keep its files in

[root@ed01cel03 ~]# ls -l /opt/oracle.oswatcher/osw/archive/
total 972
drwxr-s--- 2 root cellusers  32768 Jan 13 16:00 ExadataDiagCollect
drwxr-s--- 2 root cellusers  28672 Jan 13 16:00 ExadataOSW
drwxr-s--- 2 root cellusers  24576 Jan 13 16:03 ExadataRDS
drwxr-s--- 2 root cellusers 630784 Jan 13 16:00 oswcellsrvstat
drwxr-s--- 2 root cellusers  20480 Jan 13 16:03 oswdiskstats
drwxr-s--- 2 root cellusers  24576 Jan 13 16:01 oswiostat
drwxr-s--- 2 root cellusers  24576 Jan 13 16:00 oswmeminfo
drwxr-s--- 2 root cellusers  20480 Jan 13 16:02 oswmpstat
drwxr-s--- 2 root cellusers  24576 Jan 13 16:04 oswnetstat
drwxr-s--- 2 root cellusers   4096 Apr  4  2013 oswprvtnet
drwxr-s--- 2 root cellusers  20480 Jan 13 16:00 oswps
drwxr-s--- 2 root cellusers  28672 Jan 13 16:00 oswslabinfo
drwxr-s--- 2 root cellusers  24576 Jan 13 16:09 oswtop
drwxr-s--- 2 root cellusers  24576 Jan 13 16:01 oswvmstat


We jump to oswvmstat directory, because it has information we need: runqueue, idle and so on.

But each file contain many rows. How to calculate the average load or somathing like that ?
The solution is:

cat file |
awk '{if(min==""){min=max=$1}; if($1>max) {max=$1}; if($1<min) {min=$1}; total+=$1; count+=1} END {print total/count, max, min}'


For example:

[root@ed01cel01 oswvmstat]# cat ed01cel01.distr.fors.ru_vmstat_13.12.30.1600.dat| grep -v id|grep -v procs|grep -v zzz|awk '{if(min==""){min=max=$15}; if($15>max) {max=$15}; if($15<min) {min=$15}; total+=$15; count+=1} END {print total/count, max, min}'

97.0653 99 87





Monday, January 6, 2014

Замечательное интервью Игоря Ашманова

Не могу не поделиться ссылкой на замечательное интервью Игоря Ашманова, в котором Ашманов показывает ряд перспективных общественных задач "где IT принесли бы наибольшую пользу стране и людям" и IT-методы их решения.

Вкратце:

- В здравоохранении – единая электронная медицинская карта, чтобы любая клиника, страховая, районная или другая компания, куда гражданин обратился, писала данные анализов и исследований, эпикризы в электронную карту данного гражданина. В этом случае, у лечащего врача будет достаточно много информации о пациенте. В результате диагнозы станут точнее и ошибок будет меньше. Да и при смене места жительства анкета может потеряться или остается в поликлинике, а с электнной картой у нового врача всегда будет полноценный объем данных на данного пациента, независимо в сознании он или нет.

- Электронный паспорт для граждан РФ:  ничего не придется с собой носить, не нужен паспорт. Электронный идентификатор (паспорт) все равно будет создан. Хорошо бы, чтобы он был он был связан с электронной медицинской картой, госуслугами и т.д

- Та же история с автомобилями и объектами недвижимости. Правильно, чтобы у каждого автомобиля был сайт. Чтобы видно было, когда его ремонтировали, как обслуживали, что с ним сейчас. У некоторых автомобилей свои сайты уже есть, но это очень дорогие автомобили. То же с квартирами: электронные кадастры у государства уже есть, но гражданам при покупке квартиры тоже нужно нужно знать кто ее законный владелец/владельцы, ее планы, электросхемы.

- Общественный транспорт – это единые, управляемые из центра расписания движения всех видов транспорта, управление автобусами и прочими электричками. Электронные табло на остановках. Управление светофорами и потоками машин. Оптимизация трафика в реальном режиме времени.

- Оборона и безопасность: стране нужны сервисы и устройства для защищенного использования Интернета. Чтобы можно было купить телефон или планшет, который гарантированно ничего никуда не отправляет. Чтобы американцы с него снять ничего не могли точно, а наши – с большой натяжкой. Превратить внутреннее пространство страны в черное пятно для АНБ – это государственная задача. Для её решения нужны как минимум средства контроля операционных систем и файрволов. Сейчас файрволы по умолчанию считают, что приложения, возможно, плохие, а ОС – точно хорошая. Но Сноуден показал нам, что это не так, что система по умолчанию тоже плохая.

Стране нужны свои процессорные фабрики, операционка, мобильная операционка, сетевой маршрутизатор, браузер, офис. Современное ПО производства западных компаний - ненадежно. Нужно импортозамещение.


# ocrconfig -add +DATA PROT-30: The Oracle Cluster Registry location to be added is not usable. PROC-50: The Oracle Cluster Registry locatio...