sqlserver T-sql中的top()函数在取表中的一部分数据很方便, 但在oracle中好像没有类似的函数啊 有知道的吗?
by Northwindrocker - Oracle - 2005-06-08 18:08:30 阅读(2216) 回复(3)
us -> User sy -> system ni -> nice id -> idle wa -> iowait hi -> H/w interrupt requests si -> S/w interrupt requests 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/28158/showart_1764381.html
本文通过实际业务系统中调整的一个案例,试图给出一个常见cpu消耗问题的一个诊断方法.大多数情况下,系统的性能问题都是由不良sql代码引起的,那么作为DBA,怎样发现和解决这些sql问题就显得尤为重要. 本案例平台为UNIX,所以不可避免的应用了一些Unix下常用的工具.如vmstat,top等. 本文适宜读者范围:中高级. 系统环境: OS: Solaris8 oracle: 8.1.7.4 问题描述: 开发人员报告系统运行缓慢,...
机器系统RH AS3 cpu states: cpu user nice system irq softirq iowait idle total 25.0% 0.0% 0.0% 0.0% 0.0% 1.4% 73.5% cpu00 100.0% 0.0% 0.0% 0.0% 0.0% 0.0% 0.0% cpu01 0.0% 0.0% 0.0% 0.0% 0.0% 1.9% 98.0% cpu02 0.0% 0.0% 0.0% 0.0% 0.0% 1.9% 98.0% cpu03 ...
top cpu(s): 17.0% us, 32.3% sy, 0.0% ni, 49.5% id, 1.2% wa, 0.0% hi, 0.0% si 220 root 15 0 0 0 0 S 0.3 0.0 12:48.04 md0_raid5 7074 root 16 0 2424 928 748 R 0.3 0.0 0:00.24 top 1 root 16 0 2484 336 308 S 0.0 0.0 0:00.74 init 2 root RT 0 0 0 0 S 0.0 0.0 0:00.53 migration/0 3 root 34 19 0 0 0 S ...
top cpu(s): 17.0% us, 32.3% sy, 0.0% ni, 49.5% id, 1.2% wa, 0.0% hi, 0.0% si 220 root 15 0 0 0 0 S 0.3 0.0 12:48.04 md0_raid5 7074 root 16 0 2424 928 748 R 0.3 0.0 0:00.24 top 1 root 16 0 2484 336 308 S 0.0 0.0 0:00.74 init 2 root RT 0 0 0 0 S 0.0 0.0 0:00.53 migration/0 3 root 34 19 0 0 0 S ...
select count(*) from (select top 10 * from table1) a 返回的是 table1的所有行数的count 而不是10..... 应该嗯如何写才行呢?这语句一点也不多余...因为要在 table1 不到10行的时候 做其他一些处理...
大家好,请教一个 top 命令中的 %cpu 计算问题。 根据帮助是 %cpu=elapsed cpu time/total cpu time 而 total cpu time 对应 top 命令出来 的 TIME 那列, 那 elapsed cpu time 用 top 命令 哪个参数查看呢? 因为我要看 %cpu 如何 计算 出来。 请大侠 帮忙哈。
[root@serv~]# top top - 16:55:07 up 85 days, 3:18, 3 users, load average: 0.00, 0.00, 0.00 Tasks: 271 total, 1 running, 270 sleeping, 0 stopped, 0 zombie cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.8%id, 0.1%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 16612924k total, 8833064k used, 7779860k free, 188308k buffers Swap: 4095992k total, 76k used, 4095916k free, 7788532k cached PID USER ...
top - 16:32:12 up 10:23, 1 user, load average: 16.78, 15.93, 14.98 Tasks: 23204 total, 2 running, 12544 sleeping, 0 stopped, 10658 zombie cpu(s): 13.0%us, 7.3%sy, 0.0%ni, 19.8%id, 58.8%wa, 0.1%hi, 0.9%si, 0.0%st Mem: 6229564k total, 6211500k used, 18064k free, 10948k buffers Swap: 6144820k total, 40336k used, 6104484k free, 1444016k cached PID USER PR NI VIRT R...
如图:top显示的cpu百分比已经超出100%。这令我很费解,因为貌似计算机并没有出现滞慢的现象。用sar工具看了一下。cpu仍有60%左右的空闲。 请问,应该怎么理解top给出的cpu占用数值呢?top又是如何计算每个进程占用cpu数值的?