周末翻阅了以前写在msn space上的文章,不经意间找到了一篇2006年写的关于Linux内核的文章,那时想不到自己会变成一个Database Performance Engineer,不过里面的一些观点却和现在的工作不谋而合,只不过那时面对的Linux Kernel,现在面对的却是Oracle Database……
|
||||||
|
周末翻阅了以前写在msn space上的文章,不经意间找到了一篇2006年写的关于Linux内核的文章,那时想不到自己会变成一个Database Performance Engineer,不过里面的一些观点却和现在的工作不谋而合,只不过那时面对的Linux Kernel,现在面对的却是Oracle Database…… 除了上一篇文章提到的collectl, IBM出品的nmon其实也是一个不错的Linux上的性能监控工具,在写这篇文章时顺带google了nmon一把,惊喜地发现nmon也open source了。还是以sourceforge为根据地,网址是http://nmon.sourceforge.net. nmon在监控数据与易用性方面几乎与collectl不相上下,对监控单台机器的系统性能还是不错的选择的。 不过,nmon却做出了另一个突出贡献。这就是推出了一个nmon analyser,而且以开放源代码的形式提供,它的目的是实现对nmon产生的历史性能数据的分析,产生一系列的图表。nmon analyser其实就是一个Excel文件,里面嵌套了VBA脚本用来分析nmon产生的文本文件并产生一系列的图形报表。深入地分析这些脚本,你会发现,这个analyser其实是一个极好的框架,很容易利用这个analyser来分析自己的数据,而不局限于nmon产生的文件…… 对系统资源的监控,是系统管理者一个必备的任务。从OS角度讲,包括CPU/IO/Network/FS等等,从Database的角度讲,包括Active Sessions/ON CPU/Disks/Top Segments/Top SQL等等。而Database对资源的利用也反映在OS一级上,对OS计算资源的充分均衡利用是我们的目标。那么,如何有效的掌握OS的资源利用情况就成为了一个System Administrator,Database Administrator日常工作的一个重点。 罗列一下apt的一系列命令,也借以感受感受apt带给我们的方便与快捷。 APT相关命令 /etc/apt/sources.list 命令 用法 备注 apt-cdrom [options] command apt-cdrom is a tool to add CDROM’s to APT’s source list. The CDROM mount point and device information is taken from apt.conf and /etc/fstab. Commands: add – Add a CDROM ident – Report the identity of a CDROM apt-get [options] command apt-get [options] install|remove [...] Ubuntu 的意思是’Humanity to others’,从innovation的perspective出发,第一个让人震捍的就是安装程序的设计。技术上而言,没什么突出的,就是整合了linux live cd的功能(一张光盘就是一个安装好了的OS),然后在这个OS上提供了一个双击即运行的安装程序,同时,提供了一些桌面应用的sample让新手们体验体验。可是,从用户的角度出发,这应该是一个极佳的创意,为什么以前的OS安装程序都那么简陋呢,即使如XP,也没有让你体验体验先再接着安装的功能呢。That’s really what ‘Humanity to others’ means. 心里头的一个担忧,就是从Redhat的使用经验转到其它distribution,会不会耗费一些无谓的精力呢? 促使我接触Ubuntu的根本原因在于它们间包管理机制的不同。对RPM其实早已抱怨己久,RPM把包与包之间的依赖关系都留给用户自己解决了,而这本应该由系统解决的,这给升级带来了海量的工作负担,甚至导致一些升级工作的无法进行! 出乎意料的是,Ubuntu采用的包管理机制就是Debian的那一套。RPM与Deb应该是目前Linux世界两种最流行的binary级别的包管理机制了。(source级别的独gentoo一家?)Deb应该做得比RPM好吧,起码在包与包间的依赖的智能处理上。当然,目前的RPM应该早就借鉴了Deb的优点了,就是那个叫yum的东西吗?没深究了。无论如何,就凭着Deb能动态地网络安装与升级,就好好地熟悉一下吧。 利用已知的东西,对比一些未知的东西还是比较值得的。嗯,先对RPM与Deb都有的东西在用法上做个对比。 RPM与DEB包管理方式的对比 对比项目 RPM DEB 备注 查询 查询当前系统所有以安装的包的信息 rpm -qa dpkg -l 查看软件包的详细情况 rpm -qi pkg rpm -qpi pkg.rpm dpkg -s pkg dpkg -I pkg.deb 查询软件包的文件列表 rpm -ql pkg rpm -qpl pkg.rpm dpkg -L pkg dpkg [...] What’s going on in a Oracle session? Usually, you turn on tracing a session, then analyse the output of trace file. But the raw trace file are difficult to read and understand. So you must use some tools to help you do this job. The most popular tool is what Oracle offer, tkprof, which parse the [...] Maybe these tools are not Oracle related, just are complemental to the lack of readline functionality for the tools such as sqplus, rman, ftp etc. From the design perspective, these tools stands a level higher than gqlplus. They are more general and more extensible. The usage of these tools are similiar, just put the [...] These days, my gqlplus has some problems when started. [oracle@rac1 gqlplus-1.11]$ ./gqlplus*** glibc detected *** free(): invalid pointer: 0x082804bc ***Aborted[oracle@rac1 gqlplus-1.11]$ A bad news! After debugging, I found that this is just a minor bug in gqlplus source code, it free a array point of two dimension, but this point has increased itself before [...] As I have said, sqlplus is simple but powerful, just like bash in Linux. But everyone don’t like to type a lot, so the DBA scripts, which is written by someone and shared by them, are a great help for the lazy people. And keep in mind, a good programer is a lazy one. In [...] The more I use sqlplus, the more I feel uncomfortable about the ugly interface of it. what I hope is an environment like bash shell, support history command, completion etc. gqlplus, come into my eye then. A greate substitution tool for sqlplus, gqlplus is a drop-in replacement for sqlplus, an Oracle SQL client, for [...] |
||||||
|
Copyright © 2012 OS与Oracle - All Rights Reserved |
||||||
最近评论