摘要:背景 select 和epoll的背景不同,select是POSIX标准,代码移植性好,epoll是Linux标准,代码可移植性只在Linux操作系统之间。 触发条件 select只支持条件触发(level-triggered),epoll支持条件触发和边缘触发。 条件触发(level-trigge
阅读全文
随笔分类 - linux
摘要:背景 select 和epoll的背景不同,select是POSIX标准,代码移植性好,epoll是Linux标准,代码可移植性只在Linux操作系统之间。 触发条件 select只支持条件触发(level-triggered),epoll支持条件触发和边缘触发。 条件触发(level-trigge
阅读全文
摘要:同步/异步 同步IO:同步IO操作导致请求进程阻塞直到IO操作完成。( A synchronous I/O operation causes the requesting process to be blocked until that I/O operation completes) 异步IO:异
阅读全文
摘要:[Unit] Description=Zookeeper service After=network.target [Service] User=www Group=www SyslogIdentifier=zookeeper ExecStart=/usr/local/zookeeper/bin/zkServer.sh start ExecStop=/usr/local/zookeeper/b...
阅读全文
摘要:sed '/^.* shareId=.*/s/shareId=.*/ /g' 任意包含shareId=的行执行/s操作,行内所有匹配shareId=.*正则表达式的替换成一个空格
阅读全文
摘要:shell命令如下 关于怎么shell里面执行redis命令,简单如下 echo "commad" | redis-cli echo "keys '*' " | redis-cli
阅读全文
摘要:好久没写shell了,花了半个小时才写对,不常用果然不够熟悉,以后还是得每天花半个小时写写shell
阅读全文
摘要:开机启动tomcat 1:在/etc/rc.d/init.d目录下生成一个文件tomcat8080 2:在文件里添加如下内 修改文件权限 chmod 755 tomcat8080 添加到开机启动的服务中 chkconfig --add tomcat8080 至于为什么要这样写启动文件 service
阅读全文
|