1994.8.24



SUBJECT: Axil-311 ¿¡¼­ ÇϳªÀÇ Process °¡ ÃÖ´ë file open #

MEANING OF THIS MEMO:
1. Çö´ëÁõ±Ç ÀÇ Axil 311 ¿¡¼­ Communication  Server Process °¡ µ¹°íÀÖÀ¸¸é¼­
LAN »óÀÇ PC °¡ Áõ±ÇÀÇ °ü½ÉÁ¾¸ñÀ̳ª, ÇöÀç°¡¸¦ Á¶È¸ÇÒ°æ¿ì¿¡ Socket
ConnectionÀ¸·Î ÇϳªÀÇ fd(file descriptors) ¸¦ ÇÒ´çÇϴµ¥ 64°³ °¡ ÃÖ´ë.
256 À¸·Î ´ÃÀÌ´Â ¹æ¹ýÀ» ¼­¼úÇÔ. 

2. fd °¡ 64 °¡ µÇ¸é error #24 "Too many files open"
3. fd Áß¿¡¼­ 0(stdin), 1(stdout), 2(stdout), Application ¿¡¼­ »ç¿ëÇÑ´À°ÍµµÀ־ ´Ü¸»À» 50 ´ë ÀÌ»óÀ» ¹°¸±¼ö°¡ ¾øÀ½.
4. HelpDesk ¿¡¼­ "Too many files open" ãÀ½.

DESC:  man limit ÂüÁ¶

1. more a.c

#include 
#include 
main()
{
	int  fd;

	fd = open("/tmp/aaa",O_CREAT);
	printf("fd is %d\n", fd);

	fd = open("/tmp/aa0",O_CREAT);
	printf("fd is %d\n", fd);

	fd = open("/tmp/aa1",O_CREAT);
	printf("fd is %d\n", fd);
	...............
	...............

	fd = open("/tmp/a80",O_CREAT);
	printf("fd is %d\n", fd);

}

2. a > a.result

fd is 3
fd is 4
fd is 5
......
......
fd is 59
fd is 60
fd is 61
fd is 62
fd is 63
fd is -1
fd is -1  <-----Error 24:Too many files open
.....
.....
fd is -1
fd is -1
fd is -1
fd is -1

3. vi /.cshrc
...
limit descriptors 256
...
4. a > a.result2


fd is 3
fd is 4
fd is 5
...
....
fd is 62
fd is 63
fd is 64
fd is 65
fd is 66
fd is 67
fd is 68
fd is 69
fd is 70
fd is 71
fd is 72
fd is 73
fd is 74
fd is 75
fd is 76
fd is 77
fd is 78
fd is 79
fd is 80
fd is 81
fd is 82
fd is 83
fd is 84

4.°á·Ð.
csh ¿¡¼­´Â application ÀÌ file open À» ¼öÇàÇÒ¶§ ½Ã½ºÅÛ¿¡¼­ Á¦ÇÑÀ» ÇÒ¼ö°¡ÀÖ´Ù.
Default ´Â soft-limit ÀÇ descriptors °¡ 64 ÀÌ°í hard-limit(-h option) Àº 256.

ex)
atom# limit
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       8192 kbytes
coredumpsize    unlimited
memoryuse       unlimited
descriptors     64 

atom# limit -h
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       unlimited
coredumpsize    unlimited
memoryuse       unlimited
descriptors     256 

******************************************
* .cshrc ¿¡ limit descriptos 256 À¸·Î ÇÔ *
******************************************

atom# limit
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       unlimited
coredumpsize    unlimited
memoryuse       unlimited
descriptors     256 

    
Revision History
Created             on Dec  24 ,1994