Latest Posts »
Latest Comments »
Popular Posts »

lsof操作实例

Written by bixuan on 2010年01月7号 – 09:18

lsof 工具可列出某个Unix 进程所打开文件信息的清单,被打开文件的类型可能包括了:本地文件,目录,网络共享文件,块设备文件,字符设备文件,共享库,管道,软链接,套接字等等.

以下是具体的lsof 操作实例总结:

1,列出所有被打开文件信息

#lsof

2,查看某个被打开文件信息

#lsof /path/to/file
#lsof /path/to/file1 /path/to/file2

3,列出某个目录下的被打开文件

#lsof +D /path
#lsof | grep “/path”

4,列出某个用户下的被打开文件

#lsof -u nobody
#lsof -u nobody,root

5,列出某个进程下的被打开文件

#lsof -c httpd
#lsof -c httpd -c mysqld

6,复合查询(OR)被打开文件信息

#lsof -u nobody -c httpd

7,复合查询(AND)被打开文件信息

#lsof -a -u root -c httpd

8,查看除root之外所有用户的被打开文件

#lsof -u ^root

9,查看具体进程PID的被打开文件

#lsof -p 10101
#lsof -p 10101,10102,10103

10,列出所有网络连接

#lsof -i

11,列出所有网络TCP或者UDP连接

#lsof -i tcp
#lsof -i udp

12,查看具体网络端口信息

#lsof -i :80
#lsof -i tcp:80
#lsof -i udp:53

13,查看具体用户下所有网络连接

#lsof -a -u www -i

14,列出NFS 文件

#lsof -N

15,列出Unix 套接字文件

#lsof -U

16,列出某个特定文件描述符相关联的文件

#lsof -d 2
#lsof -d 0-2
#lsof -d mem

0 1 2 => FD: standard input, output, and error

17,列出所有网络连接关联的PID

#lsof -t -i

#kill -9 `lsof -t -i`  => kill all process use network

18,重复lsof 输出

#lsof -r 1 -a -u www -i

from: http://feedproxy.google.com/~r/blogspot/HpnK/~3/v-rLmhbiVmA/lsof.html


Tags: , , ,
Posted in 运维小技巧 | No Comments »

[招聘]PHP|Mysql|Linux人才

Written by bixuan on 2009年10月17号 – 16:40

朋友公司招聘PHP|Mysql|Linux人才:

要求:有对高负载站点的PHP开发、mysql管理、Linux系统管理、优化丰富经验即可!
PHP+mysql(1人):2万月薪 + 干股
———— 或 —————–
php(1人): 8K-10k月薪
mysql+sa(1人):18K月薪

上班地点:上海陆家嘴软件园(东方路和峨山路口)

有兴趣的朋友,可以联系我gtalk:bixuan@gmail.com(邮件也可以) 或者QQ:6149968


Tags: , , ,
Posted in 招聘 | 1 Comment »

2008年度最佳开源软件大奖

Written by bixuan on 2008年09月3号 – 15:48

为开源社区贡献绵薄之力

 InfoWorld历年的开源软件大奖都相当有分量,不过国内知道或者关注这个奖项的用户并不是特别多。InfoWorld 2008年的“开源软件大奖”最新出炉,CHIP软件社区乘此机会将InfoWorld 2008年的“开源软件大奖”中文化并进行整理,希望能够为中国用户带来便利,也希望能够为开源社区共享绵薄之力。
由于InfoWorld的评选软件范围广、类别多,很多时候在同一个类别中,桌面版软件和服务器版软件常常混杂在一起,限于时间和水平,这个专题的组织和本地化肯定有不妥甚至是错漏之处,欢迎用户和网友批评指正。

  Read more »


Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Posted in Softs, 运维小技巧 | No Comments »

Q4M

Written by bixuan on 2008年08月7号 – 10:13

What is Q4M?

Q4M (Queue for MySQL) is a message queue licensed under GPL that works as a pluggable storage engine of MySQL 5.1, designed to be robust, fast, flexible. The development started in late December of 2007, and although it is very primitive, operates quite swiftly.
To start using Q4M, download either a binary or source distribution from the install page, and follow the installation instructions. A small tutorial is also avialable. You may use SQL to access Q4M queues, or there is a wrapper module available for perl (Queue::Q4M).
For more information, please read the developer’s weblog (Kazuho@Cybozu Labs) or subscribe to the mailing list
看上去非常不错,自己没实际用过,希望有用过的朋友分享一下经验。

Tags: , , , ,
Posted in Softs, 运维小技巧 | No Comments »

rhms-0.5.0 发布了

Written by bixuan on 2008年06月29号 – 19:30

邮件服务器解决方案 rhms-0.5.0 发布了。这个版本的亮点主要有:

* 增加了 SPF 检测功能,有效抵挡垃圾邮件;
* 增加了 DKIM/DomainKeys 的检测和签署功能;
* 增加了 Horde WebMail 1.1;
* 为 Apache 增加了 TLS/SSL 支持;
* 更灵活的用户收发邮件权限控制;
* 增加了对已有 MySQL 环境的支持;
* Postfix, Dovecot, Amavisd-new, SquirrelMail 都升级到了最新版本;

下载地址:
Read more »


Tags: , , , , , , , , , ,
Posted in Softs, 运维小技巧 | No Comments »

异步MySQL API

Written by bixuan on 2008年06月26号 – 17:27

I’ve been telling to people that we need async MySQL client API. The fact that you have to block while database box is thinking (doesn’t happen too often, but still..) is holding back some nice response-time oriented coding practices.

Read more »


Tags: , ,
Posted in Softs, 运维小技巧 | No Comments »

比较关注的几个和mysql相关的GPL软件

Written by bixuan on 2007年12月16号 – 11:43


Tags: , , ,
Posted in 运维小技巧 | No Comments »
 Page 1 of 1  1