Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

½â¾öLinuxÖÐToo many open filesÎÊÌâ

1¡¢Ïà¹ØÃüÁ
ulimit –a //²é¿´µ±Ç°ÉèÖÃ
ulimit –n 2048 //¼´Éè³É2048£¬°´Êµ¼ÊÐèÒªÉèÖÃ
2¡¢Óû§»·¾³²ÎÊýÎļþÅäÖãº
ÔÚ/etc/profileÖмÓÈëÈçÏÂÄÚÈÝ£º
if
 [ $SHELL 
=
 
"
/bin/ksh
"
 ]; then 
ulimit 
-

16384
 ulimit 
-

65536
 
else
 
ulimit 
-

16384
 
-

65536
 
fi
3. ÐÞ¸Ä /etc/security/limits.confÎļþÖÐÉèÖÃ×î´ó´ò¿ªÎļþÊý
Ìí¼ÓÈçÏÂÕâÐС£
* - nofile 30000
ÕâÐÐÉèÖÃÁËÿ¸öÓû§µÄĬÈÏ´ò¿ªÎļþÊýΪ30000¡£×¢Òâ"nofile"ÏîÓÐÁ½¸ö¿ÉÄܵÄÏÞÖÆ´ëÊ©¡£¾ÍÊÇÏîϵÄhardºÍsoft¡£ÒªÊ¹Ð޸ĹýµÃ×î´ó´ò¿ªÎļþÊýÉúЧ£¬±ØÐë¶ÔÕâÁ½ÖÖÏÞÖÆ½øÐÐÉ趨¡£ Èç¹ûʹÓÃ"-"×Ö·ûÉ趨, ÔòhardºÍsoftÉ趨»áͬʱ±»É趨¡£
* hard nofile 65535
* soft nofile 65535


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

linux ²éÕÒÖ´ÐгÌÐòµÄµ±Ç°Â·¾¶

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 ......

linuxÏÂudp¿Í»§¶ËÔ´ÂëʾÀý

#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 ......

linuxÏÂIP v6 tcp·þÎñÆ÷¶ËÔ´ÂëʾÀý

/******************************
*
* 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> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ