Tip: 看不到本站引用 Flickr 的图片? 下载 Firefox Access Flickr 插件 | AD: 订阅 DBA notes -- ![]()
2008-08-28 Thu


前几天去敦煌的时候,承朋友白先生相赠了一箱李广桃,吃了之后甚觉鲜美,他们说敦煌更好的水果实际上是李广杏,不过过了季节。
李广杏可称敦煌水果之王,每年七月是李广杏的收获季节。李广杏因其光泽黄亮、汁甜如蜜而享有盛名。敦煌光照充足,无霜期长,昼夜温差大,因而李广杏含糖量高,甘美爽口。用李广杏制成的敦煌杏干酸甜可口,堪称一绝。
既然这些水果以李广为名,自然和李广具有一定的联系,考证一下历史上这样的:
相传西汉年间,飞将军李广率部西征,夏日炎炎,将士焦渴难忍。突然空中袭来一阵奇香,只见两匹彩绸自流云中飘下。李将军策马追舌,拔出神箭射出,其中一匹彩绸应声落地,变成一片果实累累的杏林。众人争食,苦似黄莲。李广愤然砍平杏林,次日渭晨,却见杏林又枝繁叶连,鲜嫩欲滴的黄杏令人馋涎欲滴。李厂忍不住摘下一个咬了一口,顿时香人肺腑,将士们纷纷摘杏食之,顿觉精神倍增。原来,那两匹彩绸本是甜杏仙子和苦杏仙子,奉王母之命来救李广的,她们只顾嬉戏,惹怒李广而射落了苦杏仙子,深夜甜杏仙子拢到了苦杏仙子,施展仙法,在苦杏树桩上接上甜杏树枝,最后结出了清香甘甜的黄杏。当年曾为李广解危救困的甜杏,随着李广大军传人敦煌,所以敦煌人把它叫作李广杏。
李广与敦煌的缘分不仅于此。李广的十六世孙李暠(hao,去声)后来在敦煌创立了西凉国:
李暠(351年----417年),字玄盛,小字长生,陇西郡成纪县(今静宁西南)人。十六国时西凉创建者。400年--417年在位。他是西汉名将李广的十六世孙。李暠少年的时候十分好学,通诵经史,尤其擅长文章义礼,也精通孙吴兵法,爱好武功,很小时就练就一身好本领。他的性格沉默而敏捷,宽和大度。后凉吕光末年,任效谷(今敦煌县)令。有惠政会沙州(今敦煌)刺史盂敏卒,他被州人推举为宁朔将军、敦煌太守,封宁朔将军。北凉段业时,仍为敦煌太守,安西将军,领护西胡校尉。晋安帝隆安四年(400年),晋昌太守唐瑶联合六郡,推李暠为大都督、大将军、凉公,领秦、凉二州牧,护羌校尉。李暠乃自立为王,建元庚子,建都敦煌,置官封将,西凉政权自此开始。
故事还不仅于此,李暠417年去世后,儿子李歆治国不善,420年亡国,另外一个儿子李恂战死后,其小儿子四处流浪,后来分为两支,一支辗转到了北魏,五代孙叫李渊,后来成为唐朝的始祖。另一支到了苏联,九代孙叫李白,后来成为著名的诗人。
关于李白的家世,李白自己自己曾经在《上安州裴长史书》中提到(也是他唯一一次提到):
"白本家金陵,世为右姓,遭沮渠蒙逊之难,奔流咸秦,因官寓家......"
李白这里说的遭沮渠蒙逊之难就是指西凉亡国之役,沮渠蒙逊是十六国另外一个牛人,据说是个天文学家,比诸葛亮NB多了,据说丫进攻敦煌时,先算好敦煌附近几天后将有大雨,派兵在敦煌城外垒起堤坝准备蓄水。西凉兵以为丫是神经病,没理他们,结果几天后天降暴雨,形成山洪,被沮渠蒙逊用水坝一拦,都灌到敦煌城里,敦煌城破。
所以李白虽然号称诗仙、酒仙,但是从来没有在大唐参加过科举考试,因为他不屑,他觉得自己是皇族。
这就是历史。好玩不?
相关文章|Related Articles
评论数量(0)|Add Comments
本文网址:http://www.eygle.com/archives/2008/08/li_and_dunhuang.html
PHP Framework 裡會大量使用 require_once(),由於需要判斷是否載入過檔案,require_once() 會使用 realpath() 取得檔案實際路徑資訊當作判斷條件,而這點會有效能上的問題。
其他人其實也遇過,參考:PHP Performance tip: require versus require_once,其中 comment 的部份也說明了目前 Google 到的方法是沒有用的。
FreeBSD libc 裡的 realpath(3) 會使用 lstat(2),而 FreeBSD 的 lstat(2) 因為用到 VFS_LOCK_GIANT(9),所以在 FreeBSD 上,很多隻 PHP 同時用 realpath() 的時候效能並不好。
在 Linux 的 libc 據說沒這個問題 (我沒有實際去 trace libc code,聽別人轉述的),不過實際灌了一台 Debian 跑 PHP 發現解決了 lstat() 的問題後,require_once() 造成的效能問題還是很嚴重。
目前的解法與 Wikia 類似,想辦法讓 require_once() 能夠很快找到 code,不過還是得想辦法從 PHP 本身下手,改善 require_once() 的效能,讓 PHP Framework 發展的時候不用綁手綁腳。
PS:目前的方法是改掉 Zend Framework 裡面的 require_once(),由於我們有一個統一的 /pixnet,把裡面的程式碼全部都用絕對路徑。另外在 Autoload 的部份用 APC cache,避免再到 include_path 內重複尋找。
Scribd, the popular document sharing hub, has finally rolled out a much-needed redesign. The site has long been hampered by a messy homepage that wasn’t attractive for first-time visitors, displaying a list of its top features in lieu of a YouTube-esque stream of featured documents. The old design made it clear that Scribd worked well as a utility, but didn’t make it attractive as a destination site. Now, the new site highlights a sampling of its top documents and includes a number of UX changes that Scribd hopes will remedy this issue.
One of the major changes in the design is a new emphasis on search. Scribd has seen impressive growth since its launch in Spring 2007, and now claims more than 20 million unique visitors monthly. But more than half of that traffic comes from search engines - something that the site would like to change. The new design is intended to make the search function more prominent, encouraging users to turn to Scribd instead of Google or Yahoo when they’d like to find a document. And CEO Trip Adler says that it’s working: while A/B bucket testing the new design, Scribd has seen the number of searches double (the number of uploads increased by 70% as well).
Finally, in conjunction with the redesign, Scribd has ditched its yellow generic “document” logo in favor of something that reminds me of colored pencils.
Scribd’s biggest competitor is DocStoc, a document sharing portal that offers a similar Flash-based viewer.
Crunch Network: MobileCrunch Mobile Gadgets and Applications, Delivered Daily.
The SQL function TRIM has been around since Oracle 8i and maybe earlier. TRIM enables you to trim characters from a character string. The following examples demonstrate its usage and show you a few little known features of this simple function.
Remove leading and trailing blank spaces:
SQL> SELECT TRIM (' mystring ') FROM dual;
TRIM('MY
--------
mystring
Remove any leading characters equal to ‘x’:
SQL> SELECT TRIM (LEADING 'x' FROM 'xxmystringxx') FROM dual;
TRIM(LEADI
----------
mystringxx
Remove any trailing characters equal to ‘x’:
SQL> SELECT TRIM (TRAILING 'x' FROM 'xxmystringxx') FROM dual;
TRIM(TRAIL
----------
xxmystring
Removes leading and trailing characters equal to ‘x’:
SQL> SELECT TRIM (BOTH 'x' FROM 'xxmystringxx') FROM dual;
TRIM(BOT
--------
mystring
Removes leading and trailing characters equal to ‘x’ (Same as BOTH):
SQL> SELECT TRIM ('x' FROM 'xxmystringxx') FROM dual;
TRIM('X'
--------
mystring
My usage of this function has mostly been to trim blanks from both ends of a string. How about you?
Related functions: RTRIM and LTRIM.
---
Related Articles at Eddie Awad's Blog:
- Yet Another Oracle Social Network in the Works
- Oracle REF CURSOR and ColdFusion
- Cool SQL function: EXTRACT
- Previously Undocumented LNNVL SQL Function Buggy
- SYS_CONTEXT in Oracle
The title alone is a mouthful, but you have to love a book that knows what it’s about.
‘Unix and Linux Systems Administration’. We all know what that is. Balding, bearded, bespectacled wizards wearing t-shirts, nestled deep in a corporate office, on a floor the CEO and VP’s never visit, tapping out incantations day and night, feeding the temperamental beasts caged in the data center.
No? What about a growing group of dedicated, professional, hard-working experts who keep servers–and consequently the rest of the business–running smoothly? Sure, some of them may have less than a full head of hair, or wear the occasional t-shirt to work, but if your job (which you only call ‘System Administrator’ on your resume) involves monitoring and maintaining expensive hardware that performs critical business functions, and if the CEO only notices you or your group when things have going horribly, horribly wrong… then this is the book for you.
Back up a bit. How did ‘Python’ sneak into the title? This is a book for System Administrators–I mean, sysadmins. These guys write bash scripts to do their laundry. Sure, some of them may have joined the cult of Perl, and what proper Linux shop doesn’t have a zsh fanatic locked in the supply closet (in case of emergency)?
Unless you’ve been asleep at the keyboard for a few years, it’s hard to miss the rise of Python as a language of choice among web developers–along with old favorites Perl, PHP, and Java, and the new kid on the block, Ruby.
Perl is an old standby for many sysadmins, especially in those moments when you realize there’s a CPAN module that does 90% of what you need, or you’re tired of guessing whether brackets should go around the test condition in an ‘if’ statement. Is Python ready to take it’s place alongside Perl in a sysadmin’s toolbox? The authors of this book make an excellent case that yes, it is.
The first chapter starts with some exposition and justification, then segues into a comparison of simple code examples using bash, Perl, and Python. A tour of python using the IPython interactive shell fills out the rest of the chapter. This section, which is skippable for those with python experience and not systematic or detailed enough to count as a true tutorial, gives the reader a taste of the example-based approach of the rest of the book and a gentle introduction to Python syntax and the Python shell.
The second chapter, the longest in the book, dives into the Ipython shell in detail, including more detailed instructions for installation. These might have been better placed before the interactive examples in the previous chapter.
Chapter two then proceeds to describe IPython and many of its features in detail, and will probably teach even experienced IPython users some new tricks. While the authors are correct to tout the impressive power of IPython, I question the wisdom of including such a detailed tutorial this early in the book. As useful as IPython is, there is a lot of material for readers to work through here that distracts from the book’s true focus. Much of this material may have been better introduced later on, or relegated to a final chapter or appendix. Strangely, there is no corresponding material introducing the Python language itself. There are, however, plenty of resources available online and in book form for those looking for a more thorough introduction to Python.
The third chapter gives some concrete examples of data gathering and reporting. It covers subjects as diverse as processing log files, sending and receiving email, and generating charts and reports, providing an excellent overview of some useful Python modules.
However, the need for a more in-depth tutorial to Python becomes apparent in this and future chapters. Previous chapters emphasize the usefulness of creating and using custom modules, and this chapter offers some building blocks from which readers could begin to create such a library. However, not enough information is provided about module creation; most readers would not yet be comfortable creating and using their own modules.
Chapter eight discusses creating python eggs, and chapter one describes how modules are imported, but nothing between the two (such as how Python treats a directory containing an __init__.py file when loading modules) is covered. Similarly, concepts such as regular expressions, list comprehensions, and exception handling are presented in example code throughout the book with little or no comment or explanation.
The fourth chapter reviews most of the primary networking modules in the python core library, starting with the low level socket module and proceeding up the stack through
urllib and urllib2. It then documents the usage of more specialized modules, such as Pyro as an XMLRPC replacement, paramiko for SSH support, Twisted for event-driven networking code, and Scapy for interactive and scripted packet-level network introspection.
The next two chapters follow the same pattern established in chapter four. Chapter five, rather ambitiously named ‘Data,’ is really about file and directory manipulation, and gives a good introduction to the same. Chapter six covers SNMP programming in similar detail.
Chapter seven returns to the formula of chapter three, and starts with the broad goal of cross-platform management, and guides the user through the implementation of a multi-threaded ssh-based command dispatch tool. It then describes using the PyInotify module to monitor filesystem changes.
Chapter seven then switches gears , discussing several techniques for use with OS X systems, then lightly touching on Red Hat-based technologies, Ubuntu, and Solaris. Next, it covers virtualization, followed by cloud computing with Amazon and Google. Finally, it describes using Zenoss to manage Windows systems.
Chapter eight covers installing Python packages using setuptools and Easy Install, and then moves on to creating and distributing Python packages with setuptools and distutils.
Chapter nine discusses process management and threading, including recipes for proper threading and daemonizing processes. Chapter ten covers the basics of creating simple GUIs, for both traditional and web-based applications. Chapter eleven covers data persistence in similar detail, starting with the pickle, shelve, and yaml modules, and moving quickly into sqlite and ORM with storm and sqlalchemy.
Chapter twelve provides an equally thorough introduction to making python scripts run well on the command line.
Chapter thirteen seems a bit out of place, as it is a discussion of callbacks, a fairly esoteric (though useful) feature of Python. If the authors are going to devote a chapter to this feature, why is there barely any mention of most of the other Python features used throughout the book?
Chapter fourteen is back on track, however, with simple but useful examples for managing DNS, using LDAP, another try at Apache log parsing, and a simple FTP mirror program.
Summary
Overall, this book provides a grand tour of core and optional Python modules that are likely to be useful for a sysadmin, along with a bevy of practical examples.
However, this book does not–by itself–serve as an introduction to Python for sysadmins. It skims over many important basics of the language.
Those already familiar with Python will get the most out of this book. If not, I’d recommend purchasing a beginner’s Python book as a companion, or you can rely on the many online Python tutorials and extensive documentation.
Similarly, while the book mentions writing and importing your own modules, and even using Python eggs and distutils to package and distribute them, a true stones-to-soup guide for creating and maintaining a library of useful modules is missing.
These caveats aside, if the reader has already acquired the basics of Python from another source, then Python For Unix and Linux System Administrators is likely to provide plenty of inspiration and guidance.
Note: One of the book’s authors, Noah Gift, is a frequent contributor to Red Hat Magazine.

豆瓣网的前身虽然不是蔬菜交易市场,但是没有人怀疑豆瓣网盛产精神食粮,同样没有人怀疑文化人也需要吃饭。于是豆瓣的小组开始一起飘香,豆友们逐渐不满足于仅在餐厅见面撮一顿,更喜欢在小组里探讨情有独钟的餐饮,甚至细节到会去在意店家使用的每套餐具,会去搜集促销活动发售的每个玩具。在品尝以外,到小组把更多相关的有趣发现分享给 “口味相投”的朋友。在豆瓣,每个豆子在品尝的同时也在快乐的“被品尝”着。
这周将豆瓣上的品牌餐饮大组搜集整理,虽然这些餐饮现在或者曾经与我们的生活擦肩而过无数次,但是相信豆友的分享会使你的每一次品尝变得不一样。
说下搜集过程中印象最深的两个第一名:
< 大众最喜爱>
星巴克Starbucks,是豆瓣餐饮品牌类第一大组,在小组搜索中键入“Starbucks”,会出现10余个相关小组,最大的 Starbucks Fans Club,目前已有组员近5000人,看看小组收藏你就知道大家有多热爱这间开遍全球的咖啡馆,甚至连所有关于Starbucks的书籍、电影你都可以在这里找到。现在,上海、深圳、西安、重庆、天津的Starbucks fans都已经有了在豆瓣的居所,全国的店铺众多,你也建一个属于自己城市的聚点呼朋唤友?当然,众口永远难调,如果你是anti-的一份子,请到这里来。
< 大众最怀念>
在品牌小组中,单品食物里跃居第一的是竟然是如此怀旧的——-麦丽素。小组里每个人都有关于麦丽素不同的回忆,甚至连吃法也拿出来讨论,味道是否“全国标准”现在难去一一考证,但它却牢牢的打在70、80后的心里,虽然不断有厂家推出不同品牌的麦丽素,但是这味道永远少了点什么,我们都知道,那是童年的味道。
以下的小组,都是豆瓣上品牌餐饮类值得被品尝的好推荐,大家慢慢来:
Starbucks (4969)
Mcdonalds (2744)
NapCafe (2666)
Dairy Queen (1163)
KFC (897)
M&K玩具收藏小组 (447)
Haagen-Dazs (794)
>>>> 查看更多小组
在上午安装完数据库,配置完监听之后,中午休息,记得中午休息之前把数据库备份一下。
下午的Section是安装Grid Control。在OCM考试的Linux操作系统环境中安装Grid Control应该来说是一件很简单的事情,恩,实际上是我安装Grid Control最顺畅的一次了。
每个人面前会有两台机器,一台称为奇数机(ODD),一台称为偶数机(EVEN),注意,考题上也会这样表述的,要你在ODD机器上做什么或者在EVEN 机器上做什么,偶数还是奇数是依靠机器的hostname最后一位或者两位数字来定的,通常会要求你在奇数机上创建数据库,在偶数机上安装Grid Control的OMS。
偶数机上是没有Oracle软件的,因此OMS需要的Repository这个数据库也需要创建在奇数机上,再加上之后第二天会要求创建的Standby实例,总共会有三个实例运行在奇数机上,正常情况下奇数机的内存是2G,所以请预先考虑好分配给每个实例的内存。
为什么上午就要求配置监听?因为下午的考试中OMS需要通过监听来访问创建的数据库,总之,OCM考试中基本上都是这样环环相扣的,其中某一步做慢了或者没完成就很可能影响接下来的考试。
Grid Control的安装软件会预先放置在偶数机的某个目录下,考题里面会告诉你的。但是,不要着急安装,为了一次就安装成功我们需要预先做一些工作。再次强调一下,安装OMS我们基本上只有一次的机会,因为大部分的错误都会是在等待了一个漫长的Configuration过程之后再报出来,而这时候通常已经没有剩余的时间让你去找到问题发生的原因,然后清理已经安装了残迹再重新安装OMS了。
1. Use DBCA
按照要求,通常会创建一个新数据库在奇数机上(不同于上午的Section中要求创建的SID),用于存储OMS需要的Repository信息,下午的时候应该是已经可以使用图形界面了,所以我们可以用dbca来创建这个数据库。
2. Check Pacakage
数据库创建完毕以后,也许仍然你习惯用手动的方法创建,所以请检查数据库里面有没有dbms_shared_pool这个package,如果没有,运行$ORACLE_HOME/rdbms/admin/dbmspool.sql来创建这个package,因为安装OMS时候某些自动的检查需要调用这个包,没有的话将会报错。
3. Implement SSH
快速地建立两台机器之间的ssh信任关系,如果还不会的,请务必去网上查资料并且牢记每一步操作。这里有个小陷阱,默认情况下,两台机器上的oracle 用户的home目录权限是0777,也就是完全的可读些权限,但是在这种情况下,建立oracle用户的ssh信任关系,即使你完全配正确了,也同样无法正常地不输入密码就登陆到另外一台机器上。据说很多人折在这里,怎么也配不通两机的信任关系,那时候焦躁的心情应该可想而之了。 需要做的是将oracle用户的home目录权限改为0755。
4. Transfer X Window
尽量在一台机器上操作,不要在两台机器面前一会儿敲敲这个的键盘,一会儿动动那个的鼠标。字符界面的话,用terminal ssh过去就可以了,图形界面呢?不需要费劲地去检查vnc server有没有启动,启动在哪个端口了什么的,直接用ssh -X hostname这样的方式,就可以将远程的X界面显示在本机上。
5. Follow the Error Messege
安装OMS,对于Repository库是有一些初始化参数的要求的,比如java池该多大,shared pool该多大,job queue该多大,但是不要去阅读安装文档,那个浪费时间。我们需要做的就是设置SGA_TARGET = 300M,这样内存参数就自动管理了,安装OMS不会报任何错误,另外对于job queue等其它的参数,在点击开始安装之后的某个界面,会弹出一个警告框,告诉你哪些参数不符合要求,需要改为多少多少,OK,安装这个界面里的要求,依次修改数据库的参数,然后重新启动数据库,不需要退出安装界面,在重启完数据库之后,点确定,直接继续安装就可以了。
6. Be Patient
要有耐心,OMS安装的时候,在Configuration那一步时会非常慢,千万不要等不及了就准备关掉重来,时刻监控安装的log文件(log文件的位置在安装界面上应该可以找到),只要不停地有输出,你就可以安心地等待。
7. Install Agent
OMS安装完毕,也启动成功了。还需要在奇数机上安装Grid Control的Agent,有好多种方法可以安装,但是我们需要选择最简单最快速的方法,那就是使用agentDownload.linux程序,将这个程序从偶数机的OMS安装目录中copy到奇数机的某个目录下,随便哪个目录都行。然后运行下面的命令:
./agentDownload.linux -b /u01/app/oracle/product
最后一个参数是我们希望将agent安装到的BASE目录。
用这种方法安装Agent的速度很快,而且无需任何人工参与,简直是杀人越货考取OCM的必备良器。
8. Learning GUI
OMS也启动了,Agent也启动了,通过浏览器去检查一下Grid Control的管理界面是不是好用吧,到这里,基本上就没什么问题了,下面会是一些要求你通过Grid Control来创建一些表空间或者一些用户或者一些什么别的操作,按照要求来就好。不过,对于命令行死忠派来说,还是预先去熟悉一下图形界面的操作吧,否则到时候找个按钮都要找半天。
9. Lucky
运气很重要,点儿背的同学就不要去考了 ![]()
1930年,并不附属于普林斯顿大学的高等研究院在普林斯顿成立,也是全国第一所给学者研究的住宿学院。爱因斯坦是研究院第一批教授之一。可以说,整个20世纪就是一个全世界各地学者、研究员和企业从世界各地流入普林斯顿的过程。(——引自百度百科)
从今天的眼光来看,究竟是“罗马不是一天建成的”还是“条条大路通罗马”抑或普林斯顿分享着众人的荣耀还是其荣耀吸引了众人,这是一个先有鸡还是先有蛋的问题么?而对于一个早年求学于这所学校的学生我们又能说些什么呢?对他来说,是在现在分享了既成的将来事实,还是在当时影响了将来的既成事实?
也许一个游离于两者之间的答案是一个更接近真理的看法。千里马本身就是千里马,伯乐本身亦是伯乐,一个特定的《遇见》是一个“美丽的意外”,但如果可以加总,则或可计算实证。
在此之外,一些蝴蝶效应总是无法避免的。
Oracle Database 12g ?没错,就是还没有发布的未来版。
Oracle最近宣布将来的12g中将不再支持Raw Device. Oracle Database 12g什么时候会发布呢?也许是2012年。这一消息来自Metalink Note:578455.1
不支持裸设备意味着什么呢?Oracle这样说:
This means customers can no longer keep their datafiles, OCR or Voting disks on raw devices in Oracle 12g.
也就是说在RAC中,我们将不能使用裸设备存储OCR或VD,这个实际上是一个改进,在使用了ASM之后,还要划分几个裸设备用于存储OCR及VD,怎么看都不伦不类,所以在RAC中的这个De-Support实际上算是一个增强。
而且据说,在Oracle即将推出的Oracle Database 11g中,已经支持在ASM中存储OCR及VD,那么到12g的改变可以说是水到渠成的了。
而不再支持使用裸设备存储数据文件,这的确是个需要及早通知的消息,因为的确有很多客户仍然使用Raw Device来部署RAC环境。那么这些用户需要注意,在将来升级到12g的时候,这些文件必须进行迁移。
这就是未来,Oracle主导的变化,这一变化,在我看来是一大技术进步,虽然这期间需要ASM快速完善和成熟起来。
关于这一消息的其他内容可以参考:
Ningoo的 Oracle12G将不再支持裸设备?
ITPUB的 如何看待对于风传的Oracle 12g RAC将不再支持裸设备
-The End-
相关文章|Related Articles
- Oracle 10g RAC的相关概念
- RAC基本概念:PCM、IDLM、DLM等
- 10g OCR工具ocrcheck ocrconfig ocrdump
- Oracle进程:LMS 进程与Oracle RAC
- Oracle10g OCR及Voting Disk的备份
评论数量(3)|Add Comments
本文网址:http://www.eygle.com/archives/2008/08/oracle_12g_rawdevice.html
作者:d.c.b.a, 订阅AnySQL, Oracle数据库恢复及服务, Sybase恢复, 磁盘及RAID恢复
活运活用, 用Perl写了一个看AIX主机网卡流量的脚本, 差不多和"Hello, World"一样简单了.
#!/home/oracle/dbaperl/bin/perl -w
#
use AIX::Perfstat;
my $nettotal = AIX::Perfstat::netinterface_total();
my $preipkt = $nettotal->{ipackets};
my $preopkt = $nettotal->{opackets};
my $preibyt = $nettotal->{ibytes};
my $preobyt = $nettotal->{obytes};
while(1)
{
sleep(10);
$nettotal = AIX::Perfstat::netinterface_total();
print($nettotal->{ipackets} - $preipkt,",");
print($nettotal->{ibytes} - $preibyt, ",");
print($nettotal->{opackets} - $preopkt,",");
print($nettotal->{obytes} - $preobyt, "\n");
$preipkt = $nettotal->{ipackets};
$preopkt = $nettotal->{opackets};
$preibyt = $nettotal->{ibytes};
$preobyt = $nettotal->{obytes};
}
输出的样本数据, 前面加个时间就更好了.
209293,25449294,179547,45651583
217798,26535501,188151,47684198
204486,25331561,175493,45920902
204652,25110514,175301,45952904
205024,25172192,176165,46227715
202194,24638398,172954,45765479
只能一步一步来了. 好象需要加上Int64位运算支持, 才能准确显示数据.
相关文章 | Related Artiles
我要留言(当前0)
Development of YUI 3.0, the latest version of Yahoo's User Interface toolset and widgets for Web development, is now available as a preview release. YUI has long been a popular choice for client-side Web development, both because of its liberal BSD license, and because of the number of features that the library includes. YUI 3.0, when it is released, will offer a variety of new JavaScript classes and widgets. However, this will come at a price, namely compatibility with YUI 2.x APIs.
YUI and other libraries for Web development have become a standard fixture, partly because they make it easier to program in JavaScript, allowing developers to ignore browser differences and to use objects and methods that dramatically increase the coding process. While some JavaScript libraries, most notably Prototype, come without any higher-level user-interface widgets, YUI offers a variety of such widgets that programmers can use to create calendars, charts, a rich text editor, and even an image cropper that help to create useful Web applications. YUI also includes a variety of tools and effects for drag-and-drop, Ajax programming, and animation which would otherwise be cumbersome to write. YUI also includes resources for layout with CSS, to ease the creation of attractive Web pages.
What's new in YUI 3.0? Many things, both large and small, According to a posting on their developer blog, YUI will load more intelligently and efficiently than was the case before. Not only will YUI detect which modules it needs to load, and then download them from a server -- it will also join the modules' JavaScript source files together, in order to optimize download time. YUI 3.0 will change to a "YUI" namespace, rather than a "Yahoo" namespace. YUI 3 will combine DOM events with custom events, making it possible to work with all events in a unified way. Selectors, which are similar to those used in the jQuery library, will be used in a variety of contexts, and will make it possible to find and work with nodes on an individual and group basis.
The YUI team has announced a number of in-person meetings for YUI developers (and other interested parties) during the first week in September. These meetings are aimed at demonstrating YUI 3.x code, while getting feedback from current users about the direction that YUI is taking.
Trackback URL for this post:
Related Activities |
Related Software |
Related Blog Posts |
今天,在北京Oracle总部出席"Oracle DBA圆桌会议"活动。
这是老万(万正勇)加盟Oracle公司后组织的活动,今天下午一共三个主题演讲,wzy,我和Kamus各有45分钟的演讲时间。
不过我的又超时了。
很多朋友是熟悉的面孔了,我的主题《自动工作负载库(AWR)与数据库性能诊断实践》,实际上扩展的要广一些。
本来准备了很细致的内容,不过还没讲到主题时,老万已经提醒我时间到了,所以没能深入到预计的程度。
希望以后还有机会讲讲这个主题。
-The End-
相关文章|Related Articles
- 《深度解析Oracle》之《故障诊断分析方法》
- 《深度解析Oracle》之《Oracle优化工具》
- 《深度解析Oracle》之《从等待分析开始》
- 《深度解析Oracle》之《Oracle内存管理》
- 《深度解析Oracle》之 Redo & Undo
评论数量(3)|Add Comments
本文网址:http://www.eygle.com/archives/2008/08/dba_round_table.html
作者:d.c.b.a, 订阅AnySQL, Oracle数据库恢复及服务, Sybase恢复, 磁盘及RAID恢复
AIX Perfstat提供了一个访问主机性能数据的接口, 可以参考libperfstat.h和API接口文档来了解. 在AIX-Perfstat接口中, 每一个API调用都返回一个hash. 先是了解一下, 这个接口提供了那些数据.
cpu_total
processorHZ lwrite sysexec phwrite phread idle
lread ncpus_cfg bwrite sysread writech syswrite
user runque devintrs pswitch sysfork swpque sys
softintrs syscall readch bread ncpus description
loadavg wait lbolt
memory_total
numperm real_free pgsp_rsvd pgexct real_inuse
pgsp_free real_pinned pgspins pgouts pgspouts
pgsp_total real_total cycles scans pgins
pgsteals pgbad virt_total
disk_total
free number time wblks rblks xrate xfers size
netinterface_total
oerrors number collisions opackets ibytes obytes
ipackets ierrors
在AIX 5.3上面, 用C的接口的话可以看到更多的数据, 说明这个接口有些偏老了, 有空时改改.
相关文章 | Related Artiles
我要留言(当前0)
2008-08-27 Wed
2008-08-26 Tue
2008-08-25 Mon
AnySQL.net
DBA notes
Oracle & Starcraft
eagle's home
Give you some color to see see!
AnySQL.net English
Oracle Scratchpad
Oracle Life
OracleDBA Blog---Please enjoy the pain which is unable to avoid!
Uploads from Fenng(dbanotes)
Chanel [K]
xzh2000的博客
Oracle Security Blog
ERN空间
Eddie Awad's Blog
MySQL Performance Blog
The Tom Kyte Blog
Delicious/Fenng/oracle
AIXpert
O'Reilly Databases
Red Hat Magazine
DBASupport
DB2 Magazine 中文版
developerWorks 中国 : 技术文章 , 教程 AIX
Pythian Group Blog » Log Buffer
车东[Blog^2]
blue_prince
玉面飞龙的BLOG
此生 今世
人生就是如此
Orange Tiger 木匠 的 移民生活
生活帮-LifeBang
Hey!! Sky!
dba on unix
Oracle Notes Wiki
Brotherxiao's Home
柔嘉维则@life.oracle.eng
Fenng's shared items in Google Reader
jametong's shared items in Google Reader
缥缈游侠-logzgh
Tanel Poder's blog: Core IT for geeks and pros
DBA Tools
ilonng
yangtingkun
Oracle & Unix
Inside the Oracle Optimizer - Removing the black magic
Ricky's Test Blog
DBA@Taobao
存储部落
Think in 88
Alibaba DBA Team
Oracle Team @SNC
淘宝数据仓库团队
OracleBlog.cn
中国雅虎_站长天下_www.dbaleading.com_原创文章








