??
1 epoll
epoll是Linux下多路复用IO接口select/poll的增强版本,它能显著提高程序在大量并、发连接中只有少量活跃的情况下的系统CPU利用率,因为它会复用文件描述符集合来传递结果而不用迫使开发者每次等待事件之前都必须重新准备要被侦听的文件描述符集合,另一点原因就是获取事件的时候,它无须遍历整个被侦听的描述符集,只要遍历那些被内核IO事件异步唤醒而加入Read...
分类:
其他好文 时间:
2014-10-01 01:34:50
阅读次数:
370
zabbix_agentd.confUserParameter=custom.vfs.dev.read.ops[*],cat/proc/diskstats|grep$1|head-1|awk‘{print$$4}‘UserParameter=custom.vfs.dev.read.ms[*],cat/proc/diskstats|grep$1|head-1|awk‘{print$$7}‘UserParameter=custom.vfs.dev.write.ops[*],cat/proc/diskstats|g..
分类:
其他好文 时间:
2014-10-01 00:40:10
阅读次数:
452
python修改文件内容,不需要read,write多个动作。最简单方法。...
分类:
编程语言 时间:
2014-09-30 21:14:45
阅读次数:
206
Using write and read system call. Following is an example:blk.h:#include #include #include #include #include #include struct data{ char s[20]; i...
分类:
其他好文 时间:
2014-09-30 14:35:19
阅读次数:
153
1、获取web页面#coding:utf-8import sys,urllib2req=urllib2.Request(sys.argv[1])fd=urllib2.urlopen(req)while 1: data=fd.read(1024) if not len(data): ...
分类:
Web程序 时间:
2014-09-30 14:31:59
阅读次数:
147
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:
编程语言 时间:
2014-09-30 07:48:12
阅读次数:
193
I know it well:I read it in the grammar long ago.—William Shakespeare, The Tragedy(悲剧;灾难;惨案) of Titus AndronicusThis chapter introduces the grammar of...
分类:
编程语言 时间:
2014-09-30 04:34:22
阅读次数:
433
Aliasing can make program difficult to read because changes made in one place might have unexpected effects in another place. It is hard to keep track...
分类:
其他好文 时间:
2014-09-30 02:01:51
阅读次数:
298
Java XML - JDOM2 - Introduction (2014/9/28 22:10:49) What is JDOM JDOM is an in-memory XML model that can be used to read, write, create and modify XM...
分类:
编程语言 时间:
2014-09-30 01:59:12
阅读次数:
435
package?main?
import?"fmt"
type?IReader?interface?{
Read(file?string)?[]byte
}
type?IWriter?interface?{
Write(file?string,?data?[]byte)
}
//?接口组合,?这些默认就继承了Reader和...
分类:
其他好文 时间:
2014-09-30 01:10:22
阅读次数:
353