1 | ulimit – n |
1 | ulimit – HSn 2048 |
1 2 3 4 5 6 7 8 9 | # define Maximum 1024 Int i = 0; while(i< Maximum) { fh = open("/home/ychengc/filehandle.c",O_CREAT | O_WRONLY ,S_IRUSR|S_IWU SR); printf("%d\n",fh); i++; } |
1 2 3 4 5 | COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME init 1 root cwd DIR 3,2 4096 2 / init 1 root rtd DIR 3,2 4096 2 / init 1 root txt REG 3,2 32684 1200637 /sbin/init …… |
1 | lsof – p PID |
1 2 3 4 5 6 7 8 9 10 11 | # lsof -p 14946 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME rpc.rquot 14946 root cwd DIR 3,2 4096 2 / rpc.rquot 14946 root rtd DIR 3,2 4096 2 / rpc.rquot 14946 root txt REG 3,2 65292 267543 /usr/sbin/rpc.rquotad rpc.rquot 14946 root mem REG 3,2 45889 535442 /lib/libnss_files-2.3.4.so rpc.rquot 14946 root mem REG 3,2 1454802 541622 /lib/tls/ libc-2.3.4.so …… |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |