>> Delete Reply from No. 57980 article
No. RE: [질문] 일반 사용자의 메모리 사용량 제한

등록 2002-10-01 20:42:00 By localhost     조회 5
이름 linox    

		다른 곳에서 답을 얻었습니다.
 help ulimit
 pam 의 몇가지 기능이 제대로 수행이 잘 안된다고 하더군여.
그래서 다른 방안으로 ulimit 로 shell 에 의해 움직이는 프로세스에
 대해서 limit 를 둘수 있다고 하더군요.
   : -----BEGIN PGP SIGNED MESSAGE-----
: Hash: SHA1
:
: 질문드릴 내용은 PAM 을 이용해서 일반사용자의 메모리 사용량을
: 제한 하려 합니다.
:
: 다음과 같이 테스트를 했는데 잘 안되어서 질문드리게 되었습니다.
:
: # 테스트 환경
:
: Red Hat Linux release 7.1k (JinDo)
: kernel 2.4.17
: glibc-2.2.4
: gcc-2.96
: pam-0.74-22
:
: memory 256 M
: swap   300 M
: Pentium II (Klamath) 300 MHz
:
: 우선 /etc/pam.d/{login,sshd} 에 다음 라인을 추가 했습니다.
:
: session    required     /lib/security/pam_limits.so
:
: 그리고 /etc/security/limits.conf 에 다음과 같이 설정했습니다.
:
: linox     hard    rss       3000
:
: 그후에 linox 라는 유저가 로긴후 (ssh 를 이용하여 로긴)
: 다음과 같은 코드를 컴파일 해서 실행시켰습니다.
:
: #include <stdio.h>
: int main(void) {
:             char c;
:                     while(1)
:                                   c= malloc(1000);
: }
:
: 실행 시키고 난 후 불과 수초 만에 위의 프로세스는 200M 이상의
: 메모리를 사용합니다.
:
: 위 설정외에 아래의 설정도 같이 해 보았지만 잘 안되었습니다.
:
: linox               hard    stack             3000
: linox               hard    cpu             1
: linox               hard    memlock             3000
: linox               hard    nproc           35
:
:
: 제가 설정한 내용이 올바른 것인지 알길이 없어 이렇게 질문드립니다.
:
: 아울러 /etc/security/limits.conf 의 내용중
:
: #<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
:
: 각 <item> 의 의미가 무엇인지 궁금합니다.
:
: 고맙습니다.  좋은 하루 하루 되시길...
:
: -----BEGIN PGP SIGNATURE-----
: Version: GnuPG v1.2.0 (GNU/Linux)
:
: iD8DBQE9mOJsZkKoOgcbZwYRAtmMAKCiASme9kQJGr+ZKQhZtPHFb9t64ACfSxlh
: CztXL5TaPelM1X1IQP24qis=
: =50/q
: -----END PGP SIGNATURE-----
:
: --
: --
:
: You can download my GnuPG public key from
: http://www.linox.net/Mystuff/ho_ryoung_gpg.html  --
--
 You can download my GnuPG public key from
http://www.linox.net/Mystuff/ho_ryoung_gpg.html
[관리자] 패스워드를 입력 하십시오. 답장이 존재하면 함께 삭제됩니다.[ 목록 | 이전 ]
패스워드:    

Copyleft 1999-2026 by JSBoard Open Project
Theme Designed by IDOO All right reserved