한 사용자가 쓸 수 있는 량(?)을 제한할 수가 있습니다.
프리해킹존의 상황은 정확히 알 수는 없으나 제한을 하는 방법은 있습니다.
뭐 프로세스 수 뿐 아니라 여러가지를... 참고로 아래와 같은 아이템으로 제한을 할 수가
있네요... <item> can be one of the following:
- core - limits the core file size (KB)
- data - max data size (KB)
- fsize - maximum filesize (KB)
- memlock - max locked-in-memory address space (KB)
- nofile - max number of open files
- rss - max resident set size (KB)
- stack - max stack size (KB)
- cpu - max CPU time (MIN)
- nproc - max number of processes
- as - address space limit
- maxlogins - max number of logins for this user
- priority - the priority to run user process with
각각 제한을 하게 되면 제한된 한계 내에서만 사용이 가능하게 되겠죠 ^^
저기에서 nproc 가 max number of processes 로써 최대 사용할 수 있는 프로세서 수를 제한할 수가
있지요... : - a.c -
:
: #include <stdio.h>
:
: main()
: {
: for(;;) system("cp a b");
: }
:
:
:
:
: - loop.c -
:
: #include <stdio.h>
:
: main()
: {
: for(;;) system("./a");
: }
:
:
: -----------------------------------------------
:
:
: 위처럼 작성해서 한번은 제가 운영하는 서버에서, 그리고 한번은 프리해킹존에서
: 해봤습니다.
:
: 그런데 제 컴에서는 무한루프로 a라는 프로그램이 실행되고 계속해서 cp를 진행해서
: load average가 계속해서 올라가더군요.. (한 200이상 정도까지 봤습니다.)
:
: 그런데 프리해킹존에서는 프로세서가 하나만 생성되고 말더군요..
: load avrage도 안올라가고..
:
: 어떻게 해서 그런겁니까??
--
Hi - http://www.hi.pe.kr/ -=- ICQ#14555857 MSN:choibit at chollian.net