JAKARTAPROJECT
JAKARTA TIPJSP TIPJSP Áú¹®&´äº¯DATABASE TIPJAVASCRIPT TIPWEBHACKING TIP±âŸ TIP
À⵿»ç´Ï ÆÁ
À⵿»ç´Ï ÆÁ
¾Ë°í°Ô½Å ¿©·¯°¡Áö ÆÁµéÀ» ¿Ã·ÁÁÖ¼¼¿ä
DBA°¡ ¾Ë¾Æ¾ß ÇÏ´Â À¯´Ð½º ¸í·É¾î
kaiser
À̹ÌÁö ½½¶óÀÌ´õ º¸±â

            General Performance

vmstat

$ vmstat 5 3
Displays system statistics (5 seconds apart; 3 times):


 

procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id
0 0 0 28872 8792 8 5 172 142 210 0 24 3 11 17 2 289 1081 201 14 6 80
0 0 0 102920 1936 1 95 193 6 302 1264 235 12 1 0 3 240 459 211 0 2 97
0 0 0 102800 1960 0 0 0 0 0 464 0 0 0 0 0 107 146 29 0 0 100

Having any processes in the b or w columns is a sign of a problem system.
Having an id of 0 is a sign that the cpu is overburdoned.
Having high values in pi and po show excessive paging.
  • procs (Reports the number of processes in each of the following states)
    • r : in run queue
    • b : blocked for resources (I/O, paging etc.)
    • w : runnable but swapped
  • memory (Reports on usage of virtual and real memory)
    • swap : swap space currently available (Kbytes)
    • free : size of free list (Kbytes)
  • page (Reports information about page faults and paging activity (units per second)
    • re : page reclaims
    • mf : minor faults
    • pi : Kbytes paged in
    • po : Kbytes paged out
    • fr : Kbytes freed
    • de : anticipated short-term memory shortfall (Kbytes)
    • sr : pages scanned by clock algorith
  • disk (Reports the number of disk operations per second for up to 4 disks
  • faults (Reports the trap/interupt rates (per second)
    • in : (non clock) device interupts
    • si : system calls
    • cs : CPU context switches
  • cpu (Reports the breakdown of percentage usage of CPU time (averaged across all CPUs)
    • us : user time
    • si : system time
    • cs : idle time

CPU Usage

sar

$ sar -u 10 8
Reports CPU Utilization (10 seconds apart; 8 times):


 

Time %usr %sys %wio %idle
11:57:31 72 28 0 0
11:57:41 70 30 0 0
11:57:51 70 30 0 0
11:58:01 68 32 0 0
11:58:11 67 33 0 0
11:58:21 65 28 0 7
11:58:31 73 27 0 0
11:58:41 69 31 0 0
Average 69 30 0 1

%usr: Percent of CPU in user mode
%sys: Percent of CPU in system mode
%wio: Percent of CPU running idle with a process waiting for block I/O
%idle: Percent of CPU that is idle

mpstat

$ mpstat 10 2
Reports per-processor statistics on Sun Solaris (10 seconds apart; 8 times):


 

CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 6 8 0 438 237 246 85 0 0 21 8542 23 9 9 59
0 0 29 0 744 544 494 206 0 0 95 110911 65 29 6 0

ps

$ ps -e -o pcpu -o pid -o user -o args | sort -k 1 | tail -21r
Displays the top 20 CPU users on the system.
%CPU PID USER COMMAND
78.1 4789 oracle ora_dbwr_DDDS2
8.5 4793 oracle ora_lgwr_DDDS2
2.4 6206 oracle oracleDDDS2 (LOCAL=NO)
0.1 4797 oracle ora_smon_DDDS2
0.1 6207 oracle oracleDDDS2 (LOCAL=NO)
etc. etc. etc. etc.

The PID column can then be matched with the SPID column on the V$PROCESS view to provide more information on the process:
SELECT a.username, 
       a.osuser, 
       a.program, 
       spid, 
       sid, 
       a.serial#
FROM   v$session a,
       v$process b
WHERE  a.paddr = b.addr
AND    spid = '&pid';

 

Error Lines in Files

You can return the error lines in a file using:

root> cat alert_LIN1.log | grep -i ORA-

The "grep -i ORA-" command limits the output to lines containing "ORA-". The "-i" flag makes the comparison case insensitive. A count of the error lines can be returned using the "wc" command. This normally give a word count, but the "-l" flag alteres it to give a line count:

root> cat alert_LIN1.log | grep -i ORA- | wc -l
 

Remove DOS CR/LFs (^M)

 

Remove DOS style CR/LF characters (^M) from UNIX files using:
sed -e 's/^M$//' filename > tempfile
The newly created tempfile should have the ^M character removed.
from : http://www.oracle-base.com/articles/misc/UNIXForDBAs.php
2007-02-28 08:46:50
211.189.124.***

¼­Çö»ç¶û~ ¾È³ç ¾È³ç ³ªÀÇ ¾Æ±âº°~~

0Á¡ (0¸í)
µ¡±Û 0°³ | ÅÂ±× 1°³ | °ü·Ã±Ûº¸±â
ű×ÀÔ·Â
½±Ç¥(,)±¸ºÐÀ¸·Î Çѹø¿¡ ¿©·¯ ű׸¦ ÀÔ·ÂÇÒ¼ö ÀÖ½À´Ï´Ù
unix (2)
À̸§ ºñ¹Ð¹øÈ£
À⵿»ç´Ï ÆÁ
¾Ë°í°Ô½Å ¿©·¯°¡Áö ÆÁµéÀ» ¿Ã·ÁÁÖ¼¼¿ä
! ¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ÀÏÀÚ Á¶È¸
±âŸ ÅøÀ̳ª ½Ã½ºÅÛ¿¡ °ü·ÃµÈ TIP °Ô½ÃÆÇ ÀÔ´Ï´Ù GoodBug 2005-04-22 5,789
73 ÁÁÀº·¹Æ÷Æ® ¾²±â kaiser 2009-01-01 6,090
72 ÀÌŬ¸³½º ½ÇÇට ¿¡·¯³ª´Â °Í ÇØ°á¹æ¹ý-Eclipse Ganymede kaiser 2008-10-21 6,811
71 CPU °³¼ö È®ÀÎ ¸í·É¾î kaiser 2008-06-17 7,941
70 svmon svmon ¸í·É¾î 1 GoodBug 2008-04-11 6,970
69 find grep find ¿¡ Á¤±Ô½Ä Æ÷ÇÔÇÑ ¿¹Á¦ 1 kaiser 2008-04-08 10,405
68 UNIX¿¡¼­ ³¯Â¥ °¡Á®¿À±â lkwww 2008-01-29 9,977
67 °³Ç๮ÀÚ ½Ã½ºÅÛº° °³Ç๮ÀÚ 1 GoodBug 2008-01-07 8,581
66 JDBC ¿À¶óŬ¿¡¼­ jdbc µå¶óÀ̹ö¸¦ 10g ÀÌ»ó »ç¿ëÇ϶ó°í Çϳ׿ä 1 1 kaiser 2008-01-03 8,286
65 java¿¡¼­ properties È°¿ë °¡ÀÌµå ¶óÀÎ kaiser 2007-12-21 10,565
64 MSTR MicroStrategy (MSTR) ¿ë¾î 1 GoodBug 2007-11-28 7,676
63 svn À©µµ¿ì¿ë Subvision ¼³Ä¡¿Í È°¿ë(v1.4.5) with subclipse ÃÊ°£´Ü ¹öÀü 2 2 pearlÁþ°Å¸® Àü¹® 2007-11-16 7,226
62 port Unix ½Ã½ºÅÛ Æ÷Æ®¹øÈ£ 2 GoodBug 2007-11-16 6,064
61 MIME MIME ŸÀÔ ÃÑÁ¤¸® 1 GoodBug 2007-10-27 6,807
60 ½© ½ºÅ©¸³Æ® ÆÄÀÏ½Ä GoodBug 2007-09-07 6,955
59 Å͹̳μ­ºñ½º Å͹̳μ­ºñ½º ¿ø°Ý Á¢¼Ó ·Î±× È®ÀÎÇÏ´Â ¹æ¹ý 1 GoodBug 2007-08-20 17,718
unix DBA°¡ ¾Ë¾Æ¾ß ÇÏ´Â À¯´Ð½º ¸í·É¾î 1 kaiser 2007-02-28 6,785
57 shell ¼ö ºñ±³ GoodBug 2007-01-09 5,548
56 ³×Æ®¿öÅ© µå¶óÀ̺ê dos¿¡¼­ Àâ´Â ¹æ¹ý kaiser 2006-11-09 7,886
55 windows xp ½ÃµðÅ° º¯°æ 1 kaiser 2006-11-08 10,896
copyright 2005-2024 by Unicorn