½â¾öLinuxÖÐToo many open filesÎÊÌâ
1¡¢Ïà¹ØÃüÁ
ulimit –a //²é¿´µ±Ç°ÉèÖÃ
ulimit –n 2048 //¼´Éè³É2048£¬°´Êµ¼ÊÐèÒªÉèÖÃ
2¡¢Óû§»·¾³²ÎÊýÎļþÅäÖãº
ÔÚ/etc/profileÖмÓÈëÈçÏÂÄÚÈÝ£º
if
[ $SHELL
=
"
/bin/ksh
"
]; then
ulimit
-
p
16384
ulimit
-
n
65536
else
ulimit
-
u
16384
-
n
65536
fi
3. ÐÞ¸Ä /etc/security/limits.confÎļþÖÐÉèÖÃ×î´ó´ò¿ªÎļþÊý
Ìí¼ÓÈçÏÂÕâÐС£
* - nofile 30000
ÕâÐÐÉèÖÃÁËÿ¸öÓû§µÄĬÈÏ´ò¿ªÎļþÊýΪ30000¡£×¢Òâ"nofile"ÏîÓÐÁ½¸ö¿ÉÄܵÄÏÞÖÆ´ëÊ©¡£¾ÍÊÇÏîϵÄhardºÍsoft¡£ÒªÊ¹Ð޸ĹýµÃ×î´ó´ò¿ªÎļþÊýÉúЧ£¬±ØÐë¶ÔÕâÁ½ÖÖÏÞÖÆ½øÐÐÉ趨¡£ Èç¹ûʹÓÃ"-"×Ö·ûÉ趨, ÔòhardºÍsoftÉ趨»áͬʱ±»É趨¡£
* hard nofile 65535
* soft nofile 65535
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
linux shell pwd ÏÔʾµ±Ç°Â·¾¶
¼ÙÈôÓÐtest.cpp
g++ test.cpp -o test
./test
ÏëÔÚtestÖÐÕÒµ½µ±Ç°Ö´ÐгÌÐòËùÔڵķ¾¶
¿ÉÒÔÔÙtest.cppÖÐʹÓÃreadlinkº¯Êý
¾ßÌå¼ûÈçÏÂʵÀý£º
#include<iostream>
#include<unistd.h>
#include<dirent.h>
#include<string.h>
#include<string>
using ......
#include <errno.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <s ......
/******************************
*
* server.c
*
******************************/
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<errno.h>
#include<string.h>
#include<netinet/in.h>
#include<sys/wait.h> ......