当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: --1.´´½¨ per
 

 

 ·用c++实现黑白棋    »显示摘要«
    摘要:黑白棋规则介绍 黑白棋是由黑方和白方两人进行的益智游戏。棋盘为n×n方格,黑白棋总共使用n2个棋子,每个棋子分正反两面,分别是黑色和白色。轮到一方下棋时,必须把棋下在与对方棋子相邻的空位上,要求所下的棋子和原有的已方棋子夹住对方的至少一个棋子(横竖斜夹均可),然后把被夹住的子变成己方的颜色(也叫吃子)。下棋过程中,任何棋子既不会从棋盘上拿走,也不会从一个格子移到另一个格子,吃子时,不会......
 ·十大超级老牌黑客(二)    »显示摘要«
    摘要: 四、十大超级老牌黑客之二:米切尔·卡普尔 五短身材,不修边幅,过肩长发,连鬓胡子,时髦的半袖沙滩上装,一副披头士的打扮。看起来象现代都市里的野人。如果他将一件"麻布僧袍"穿在身上,又戴上一顶圆形宽边帽子,有如绘画作品中环绕圣像头上的光环。一眨眼的功夫,他又变成圣经中的耶......


statspack 使用实例
上一页   ...

prompt

prompt warning 【程序编程相关:Java网络编程之URI、URL研究(下

【推荐阅读:Java网络编程之URI、URL研究(上

prompt ~~~~~~~ 【扩展信息:MY SQL 常用命令

prompt running sptrunc.sql removes all data from statspack tables.  you may

prompt wish to export the data before continuing.

prompt

prompt

prompt about to truncate statspack tables

prompt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

prompt if you would like to continue, press <return>

prompt

prompt

prompt &return entered - starting truncate operation

truncate table stats$filestatxs;

truncate table stats$tempstatxs;

truncate table stats$latch;

truncate table stats$latch_children;

truncate table stats$latch_misses_summary;

truncate table stats$latch_parent;

truncate table stats$librarycache;

truncate table stats$buffer_pool_statistics;

truncate table stats$rollstat;

truncate table stats$rowcache_summary;

truncate table stats$sga;

truncate table stats$sgastat;

truncate table stats$sysstat;

truncate table stats$sesstat;

truncate table stats$system_event;

truncate table stats$session_event;

truncate table stats$bg_event_summary;

truncate table stats$waitstat;

truncate table stats$enqueue_stat;

truncate table stats$sql_summary;

truncate table stats$sql_statistics;

truncate table stats$sqltext;

truncate table stats$parameter;

truncate table stats$resource_limit;

truncate table stats$dlm_misc;

truncate table stats$undostat;

truncate table stats$sql_plan;

truncate table stats$sql_plan_usage;

truncate table stats$seg_stat;

truncate table stats$seg_stat_obj;

truncate table stats$db_cache_advice;

truncate table stats$pgastat;

truncate table stats$instance_recovery;

delete from stats$snapshot;

delete from stats$database_instance;

commit;

rem this is required to allow further snapshots to work without

rem recreating package or restarting the instance

alter package statspack compile;

prompt

prompt truncate operation complete

prompt

/* ------------------------------------------------------------------------- */

spool off;

whenever sqlerror continue;

set echo on;

[orapaid@bj37 admin]$

--¾Åµ÷ÕûstatspackµÄÊÕ¼¯ÃÅÏÞ

sql>execute statspack.snap(i_snap_level=>0 ,i_modify_parameter=>´true´);

sql>execute statspack.snap(i_snap_level=>10);

sql>execute statspack.snap(i_snap_level=>5);

 

--ͨ¹ýÏÂÁÐÓï¾äÐÞ¸ÄÃÅÏÞµÄĬÈÏÖµ

sql>execute statspack.modify_statspack_parameter(i_buffer_gets_th=>100000,i_disk_reads_th=>100000);

--10 ÕûÀí·ÖÎö±¨¸æ

--11ÓÃshell  Éú³ÉÐÔÄÜ·ÖÎö±¨¸æ(Ò²¿ÉÒÔÊÖ¹¤Éú³É)

oracle_sid=$oracle_sid

export   oracle_sid

oracle_home=´cat /etc/oratab|grep  ^$oracle_sid:|cut  -f2  -d´:´

export  oracle_home

path=$oracle_home/bin:$path

export   path

echo  "please  enter   the  number  of seconds  between snapshots."

read   elapsed

$oracle_home/bin/sqlplus -s perfstat/perfstat<<!

execute statspack.snap;

exit

!

sleep   $elapsed

$oracle_home/bin/sqlplus -s perfstat/perfstat<<!

execute statspack.snap;

select name,snap_id,to_char(start_time,´yyyymmdd:hh24:mi:ss´)

from

stats\$snapshot  ,v\$database

where   snap_id>(select max(snap_id)-2  from  stats\$snapshot);

--stats$sql_statistics  ÊÓͼ

--Õâ¸öÊÓͼÓÃÓÚͳ¼Æ ϵͳsqlµÄ×Ü¿ªÏúÒÔ¼°sql±»ÖØÓõİٷֱÈÌØ±ðÓÐÓÃ

set   lines   80;

set   pages   999;

column  mydate  heading  ´yr.mo dy  hr´  format  a16;

column  c1  heading  ´tot  sql´  format  999,999,999;

column  c2  heading  ´single use  sql´  format  999,999;

column  c3  heading  ´percent   re_used  sql´  format  999,999;

column  c4  heading  ´total  sql  ram´  format  999,999,999;

break   on   mydate   skip 2;

select to_char(snap_time,´yyyy-mm-dd  hh24)  mydate,

total_sql     c1,

single_use_sql  c2,

(single_use_sql/total_sql)*100  c3,

total_sql_mem  c4

from    stats$sql_statistics  sq,

stats$snapshot    sn

where   sn.snap_id=sq.snap_id;

--oracle 8i     stats$sqltextÓÃÀ´É¾³ýstats_sql_summary±íÏà¹ØµÄ¾Þ´ó´æ´¢¿ªÏú.

--oracle 9i     stats$sqltext(Ö»´æ´¢sqlÔ´´úÂë)

select * from  stats$sql_text

--stats$latch_misses_summary  ¼Ç¼ÁËoracleÊý¾Ý¿âµÄËø´æÊ§°Ü

select * from stats$latch_misses_summary

--Éú³ÉËø´æ±¨¸æ

select sn.snap_time ,sl.parent_name,sl.where_in_code,sum(nwfail_count) sum_nwfail, sum(sleep_count)  sum_sleep 

 from stats$latch_misses_summary sl  ,stats$snapshot    sn

where sn.snap_id=sl.snap_id  group by sn.snap_time,sl.parent_name,sl.where_in_code ;

--stats$sql_summary ±í

--sqlͳ¼Æ»ã×ÜÊÇstatspack ¹¤¾ßÖÐ×îÖØÒªµÄ±íÖ®Ò».

--sqlµ÷Õû¾­³£¿ÉÒÔ¼«´óµÄÓ°ÏìoracleϵͳµÄÐÔÄÜ

 

--stats$parameter

select * from stats$parameter  where name like ´%optimizer_mode%´

****************************************************************

statspackϵͳ±í

stats$rollstat

stats$latch

select * from stats$latch_children

select * from stats$librarycache(¿â¸ßËÙ»º´æ±íÏîµÄÃüÖÐÂʶ¼Òª±£³ÖÔÚ90%ÒÔÉÏ  ·ñÔòÒª¶Ôsga   oracle ¹²Ïí³Ø ½øÐе÷Õû)

select * from stats$waitstat  where wait_count>0

Åж϶ÔÏóÊÇ·ñ²»ÕýÈ·µÄ´æ´¢²ÎÊýÉèÖà ,×îºÃµÄ;¾¶Ö®Ò»¾ÍÊǹ۲ì×ÔÓɱíµÈ´ý

Èç¹û×ÔÓɱíµÈ´ý·Ç³£¸ß,¾Í˵Ã÷ËùÓµÓÐµÄ±í´æÔÚ¾ºÕùÐÔµÄinert»òÕßupdateÈÎÎñ

ÕâЩ±íûÓж¨Òå×ã¹»µÄ×ÔÓɱí

select * from stats$enqueue_stat

select * from stats$enqueue_stat where failed_req#>0

·ÖÎöstats$enqueue_stat ±íµÄʱºò  ºÜÖØÒªµÄÒ»µã¾ÍÊÇÒª¼Çס¶ÓÁеȴýÊÇoracle´¦ÀíµÄÕý³£²¿·Ö

select * from stats$sysstat

select * from stats$sesstat

select * from v$statname

select * from stats$sgastat

***************************************************************************

statspackÊÂÎñ±í

stats$buffer_pool_statistics 

select * from stats$buffer_pool_statistics

Õâ¸ö±íÊÇ»º³å³ØÐ§ÂʵÄÒ»°ã¶ÈÁ¿

select * from stats$filestatxs

stats$filestatxs ÊǹØÓÚoracle µ÷ÕûµÄ×îÖØÒªµÄ±íÖ®Ò»

°üÀ¨oracleÊý¾ÝÎļþµÄÏêϸÐÅÏ¢,°üÀ¨¶ÁÈëioÊýÁ¿  ,дÈëioÊýÁ¿ ÒÔ¼°´¦Àí¹ý³Ì¾­ÀúµÄµÈ´ýÕùÓÃ

i/o×Óϵͳ¸ºÔØÆ½ºâ

ÕÒµ½"Èȵã"ÎļþÒÔ¼°Èȵã±í

ÕÒµ½Êý¾Ý¿â¶ÁÈëºÍдÈë»î¶¯µÄ·åֵʼþ

****************************************************

statspackʼþ±í

select * from stats$system_event

select * from stats$session_event

select * from stats$idle_event

select * from stats$bg_event_summary 

stats$bg_event_summary  »ã×ÜÁËËùÓÐÊý¾Ý¿âʵÀýµÄºǫ́ʼþ

ºÍstats$system_event

 

******************************************************************************************************************

--À©Õ¹statspack ÊÕ¼¯·þÎñÆ÷ͳ¼Æ

--ÿ¸ô2Ãë ¹²ÊÕ¼¯5´Î

[newvers@bj37 newvers]$ vmstat 2 5

   procs                      memory      swap          io     system      cpu

 r  b  w   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id

 0  0  0 118136  49908  98268 1668004    0    0     1     0    0     0  0  0  1

 0  0  0 118136  51472  98276 1668012    0    0     4    88  177   790  2  0 97

 0  0  0 118136  51468  98276 1668012    0    0     0    24  116    39  0  0 100


...   下一页
 ·十大超级老牌黑客(四)    »显示摘要«
    摘要: 八、十大超级老牌黑客之七:米切尔·卡普尔 1971年,卡普尔从耶鲁大学毕业。在校期间,他专修心理学、语言学以及计算机学科。也就是在这时他开始对计算机萌生兴趣。他继续到研究生院深造。20世纪60年代,退学是许多人的一个选择。只靠知识的皮毛,你也能过日子。那些年里,卡普尔1年可以挣1.2万美元。他漫无......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE