There are several useful Linux performance monitoring commands like uptime, last, ps, top, pgrep -flu oracle, free, etc. the ipcs, pmap, lsof I use them often to get the detail of memory utilization.
The ipcs command with the -m argument can be used to display the configured shared memory segments on the system.
ORATOOLS1 - oracle: ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 3571714 root 644 80 2
0x00000000 3604484 root 644 16384 2
0x00000000 3637253 root 644 280 2
0xf14e8d68 4096007 oracle 660 4096 0
0x148fbb84 4227085 oracle 660 4096 0
The command ipcmr with the -M argument can be used to manually delete shared memory segments by a user. However, you should use pmap and lsof beforehand to identify the processes using the shared memory segment
The pmap Command - details the memory mapped by that particial process including the total memory utilization.
pmap -x
ORATOOLS1 - oracle: pmap -x 44234423: ora_pmon_ORATOOLS1
Address Kbytes RSS Dirty Mode Mapping
0000000000400000 180232 12692 0 r-x-- oracle
000000000b602000 1820 280 72 rwx-- oracle
000000000b7c9000 300 204 196 rwx-- [ anon ]
000000000f707000 576 512 512 rwx-- [ anon ]
0000000060000000 4 0 0 r-xs- ora_ORATOOLS1_4227085_0
0000000060001000 4092 356 164 rwxs- ora_ORATOOLS1_4227085_0
0000000060400000 4096 0 0 rwxs- ora_ORATOOLS1_4227085_1
0000000078800000 4096 28 20 rwxs- ora_ORATOOLS1_4227085_98
0000000079800000 4096 16 8 rwxs- ora_ORATOOLS1_4227085_102
0000000079c00000 4096 16 16 rwxs- ora_ORATOOLS1_4227085_103
000000007a000000 4096 384 136 rwxs- ora_ORATOOLS1_4227085_104
000000007f000000 4096 80 36 rwxs- ora_ORATOOLS1_4227085_124
000000007f400000 4096 1836 48 rwxs- ora_ORATOOLS1_4227085_125
000000007f800000 4096 1084 92 rwxs- ora_ORATOOLS1_4227085_126
000000007fc00000 4096 76 28 rwxs- ora_ORATOOLS1_4227085_127
0000000080000000 4096 4 4 rwxs- ora_ORATOOLS1_4227085_128
00000035b1600000 112 104 0 r-x-- ld-2.5.so
00000035b5600000 84 24 0 r-x-- libnsl-2.5.so
00000035b5615000 2044 0 0 ----- libnsl-2.5.so
00000035b5814000 4 4 4 r-x-- libnsl-2.5.so
00000035b5815000 4 4 4 rwx-- libnsl-2.5.so
00000035b5816000 8 0 0 rwx-- [ anon ]
00002b01b37e1000 8 8 8 rwx-- [ anon ]
00002b01b37e3000 4 4 0 r-x-- libodmd11.so
00002b01b37e4000 1024 0 0 ----- libodmd11.so
00002b01b58f0000 64 64 24 rwx-- zero
00002b01b5900000 144 144 0 rwx-- zero
00002b01b5924000 8 8 8 rwx-- [ anon ]
00002b01b5926000 4 4 0 rwxs- hc_ORATOOLS1.dat
00002b01b5927000 40 16 0 r-x-- libnque11.so
00002b01b5931000 1020 0 0 ----- libnque11.so
00002b01b5a30000 4 4 4 rwx-- libnque11.so
00002b01b5a31000 1048 24 24 rwx-- [ anon ]
00007fff35e2b000 84 52 52 rwx-- [ stack ]
ffffffffff600000 8192 0 0 ----- [ anon ]
---------------- ------ ------ ------
total kB 770108 22116 3248
The lsof command: is an extensive command that lists the open files on the system. It can be used for diagnosing connectivity to a number of resource. It provides on the usage of standard files, shared memory segments,
and network ports.
lsof -u oracle | grep 4006
ORATOOLS1 - oracle: lsof -u oracle | grep 4006oracle 4006 oracle cwd DIR 8,17 4096 950323 /apps/grid/11.2.0/grid/dbs
oracle 4006 oracle rtd DIR 253,0 4096 2 /
oracle 4006 oracle txt REG 8,17 200678430 952608 /apps/grid/11.2.0/grid/bin/oracle
oracle 4006 oracle mem REG 0,20 4194304 98378 /dev/shm/ora_+ASM1_4096007_21
oracle 4006 oracle mem REG 0,20 4194304 98379 /dev/shm/ora_+ASM1_4096007_22
oracle 4006 oracle mem REG 0,20 4194304 98416 /dev/shm/ora_+ASM1_4096007_59
...
oracle 4006 oracle mem REG 253,0 139416 786005 /lib64/ld-2.5.so
oracle 4006 oracle mem REG 253,0 1717800 786006 /lib64/libc-2.5.so
oracle 4006 oracle mem REG 253,0 615136 786018 /lib64/libm-2.5.so
oracle 4006 oracle mem REG 253,0 23360 786008 /lib64/libdl-2.5.so
oracle 4006 oracle mem REG 253,0 145824 786009 /lib64/libpthread-2.5.so
oracle 4006 oracle mem REG 253,0 53448 786010 /lib64/librt-2.5.so
oracle 4006 oracle mem REG 253,0 114352 786023 /lib64/libnsl-2.5.so
oracle 4006 oracle mem REG 8,17 12315 958409 /apps/grid/11.2.0/grid/lib/libodmd11.so
oracle 4006 oracle mem REG 8,17 532417 958508 /apps/grid/11.2.0/grid/lib/libcell11.so
oracle 4006 oracle mem REG 8,17 993144 958469 /apps/grid/11.2.0/grid/lib/libskgxp11.so
oracle 4006 oracle mem REG 8,17 7898628 958504 /apps/grid/11.2.0/grid/lib/libnnz11.so
oracle 4006 oracle 10r CHR 1,3 1449 /dev/null
oracle 4006 oracle 11r CHR 1,3 1449 /dev/null
oracle 4006 oracle 12w REG 8,17 284821 1261703 /apps/grid/11.2.0/grid/log/si01/alertsi01.log
oracle 4006 oracle 13u IPv4 103693 UDP 169.254.101.90:59753
oracle 4006 oracle 14u REG 8,17 1544 958679 /apps/grid/11.2.0/grid/dbs/hc_+ASM1.dat
oracle 4006 oracle 15r DIR 0,3 0 262537225 /proc/4006/fd
oracle 4006 oracle 16u unix 0xffff81004225da00 84931 socket
oracle 4006 oracle 17u unix 0xffff81004225dcc0 84932 socket
oracle 4006 oracle 18u unix 0xffff81004223a100 84933 socket
oracle 4006 oracle 19u unix 0xffff81004225cf00 84934 socket
oracle 4006 oracle 20r CHR 1,5 1451 /dev/zero
oracle 4006 oracle 21u IPv4 103694 UDP localhost.localdomain:40395
oracle 4006 oracle 22r CHR 1,5 1451 /dev/zero
oracle 4006 oracle 23r REG 8,17 1092096 1179709 /apps/grid/11.2.0/grid/rdbms/mesg/oraus.msb
oracle 4006 oracle 24u REG 8,17 1544 958679 /apps/grid/11.2.0/grid/dbs/hc_+ASM1.dat
oracle 4006 oracle 25u IPv4 103695 UDP 169.254.101.90:51252
oracle 4006 oracle 26u IPv6 103696 UDP localhost6.localdomain6:9648
oracle 4006 oracle 28u IPv4 328057 TCP si01-vip.an.com:33874->si01-vip.an.com:ncube-lm (ESTABLISHED)
No comments:
Post a Comment