DATABASE PT(TUNING) on LINUX

DATABASE PERFORMANCE TUNING

SYSTEM TUNING
SQL TUNING

SYSTEM TUNING

we can check system usage and CPU performance,if anything you have seen related system usage is high need to upgrade your  server configuration

SAR
VMSTAT

OPC is CLOUD USER

login as: opc
Authenticating with public key "rsa-key-20180924"
Last login: Tue Sep 25 18:11:58 2018 from 157.48.60.207
[opc@lava ~]$ pwd
/home/opc
[opc@lava ~]$ df -h
Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.2G     0  7.2G   0% /dev
tmpfs           7.3G     0  7.3G   0% /dev/shm
tmpfs           7.3G   17M  7.2G   1% /run
tmpfs           7.3G     0  7.3G   0% /sys/fs/cgroup
/dev/sda3        39G  1.9G   37G   5% /
/dev/sda1       200M  9.8M  191M   5% /boot/efi
tmpfs           1.5G     0  1.5G   0% /run/user/1000
[opc@lava ~]$ uname -a
Linux lava 4.1.12-124.18.5.el7uek.x86_64 #2 SMP Mon Aug 13 16:15:23 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux
[opc@lava ~]$ sar
Linux 4.1.12-124.18.5.el7uek.x86_64 (lava)      09/26/2018      _x86_64_        (2 CPU)

12:00:01 AM     CPU     %user     %nice   %system   %iowait    %steal     %idle
12:10:01 AM     all      0.03      0.00      0.01      0.00      0.00     99.95
12:20:01 AM     all      0.00      0.00      0.01      0.00      0.00     99.99
12:30:01 AM     all      0.06      0.00      0.06      0.00      0.00     99.88
12:40:01 AM     all      0.03      0.00      0.01      0.00      0.00     99.95
12:50:02 AM     all      0.00      0.00      0.01      0.00      0.00     99.99
01:00:01 AM     all      0.00      0.00      0.01      0.00      0.00     99.99
01:10:01 AM     all      0.03      0.00      0.01      0.00      0.00     99.96
01:20:01 AM     all      0.01      0.00      0.01      0.00      0.00     99.98
01:30:01 AM     all      0.01      0.00      0.01      0.00      0.00     99.99
01:40:01 AM     all      0.05      0.00      0.02      0.00      0.00     99.93
01:50:01 AM     all      0.00      0.00      0.01      0.00      0.00     99.99
02:00:01 AM     all      0.01      0.00      0.01      0.00      0.00     99.99
02:10:01 AM     all      0.03      0.00      0.02      0.00      0.00     99.95
Average:        all      0.02      0.00      0.02      0.00      0.00     99.96

02:11:33 AM       LINUX RESTART
[opc@lava ~]$ vmstat -S M
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 0  0      0  14231      3    312    0    0   795    92  543 4960 12  8 78  1  0
[opc@lava ~]$ hostname
lava
[opc@lava ~]$

**Application-running user  script**

Select user_name from fnd_user where user_id in (select user_id from icx_sessions where last_connect > sysdate -24;

Select fnd.user_name,icx.responsibility_application_id,icx.responsibility_name,icx.session_id,icx.first_connect,icx.last_connect,Decode((icx.disable_flag),'N','Active','y','Inactive') status
From
Fnd_user find,icx_sessions icx,fnd_responsibility_tl frt
Where find.user_id=icx.user_id
And icx.responsibility_id=frt.responisibility_id
And icx.disabled_flag<>'Y'
And icx.last_connect> sysdate -1/24;

No comments: