'limit.conf' wie einstellen ?

snakeseven

Neuer User
Mitglied seit
17 Mrz 2006
Beiträge
120
Punkte für Reaktionen
0
Punkte
0
Hi,
muss eine große Anzahl an Callfiles für meinen Asterisk generieren. Habe gehört, daß es da zu Problemen mit der Limitierung der Filedescriptoren geben kann !? Das soll man in der 'limit.conf' ändern können. Weiss einer was ich da reinschreiben muss ? Mein Asterisk läuft unter <root>.

Gruss, Seven
 
snakeseven schrieb:
muss eine große Anzahl an Callfiles für meinen Asterisk generieren. Habe gehört, daß es da zu Problemen mit der Limitierung der Filedescriptoren geben kann !? Das soll man in der 'limit.conf' ändern können. Weiss einer was ich da reinschreiben muss ?

Die Datei heißt /etc/security/limits.conf

Ciao,
dev
 
dev schrieb:
Die Datei heißt /etc/security/limits.conf

Ja, das tut sie und ich kenne sie auch, aber trotzdem wüßte ich gerne was ich da reinschreiben muß, damit ich im Extremfall keine logistischen Probleme bekomme.

Seven
 
Hmm, also auf meinen Debian sieht die so aus:

Code:
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<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
#        - locks - max number of file locks the user can hold
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file

Ich ging davon aus, daß bei Suse auch nicht an den Kommentaren gespart wird, deshalb die knappe Antwort. ;-)

man limits.conf gibt aber eine komplett andere Syntax an. Wahrscheinlich stammt die man-page noch aus dem letzten Jahrtausend. Vielleicht sieht das bei Suse ja besser aus?

Falls Du damit nicht weiterkommst, kannst Du es ja auch mal mit dem ulimit aus der bash versuchen

Code:
dev@deep:~$ ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 1024
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) unlimited
virtual memory        (kbytes, -v) unlimited

dev@deep:~$ help ulimit
ulimit: ulimit [-SHacdflmnpstuv] [limit]
    Ulimit provides control over the resources available to processes
    started by the shell, on systems that allow such control.  If an
    option is given, it is interpreted as follows:
    
        -S      use the `soft' resource limit
        -H      use the `hard' resource limit
        -a      all current limits are reported
        -c      the maximum size of core files created
        -d      the maximum size of a process's data segment
        -f      the maximum size of files created by the shell
        -l      the maximum size a process may lock into memory
        -m      the maximum resident set size
        -n      the maximum number of open file descriptors
        -p      the pipe buffer size
        -s      the maximum stack size
        -t      the maximum amount of cpu time in seconds
        -u      the maximum number of user processes
        -v      the size of virtual memory
    
    If LIMIT is given, it is the new value of the specified resource;
    the special LIMIT values `soft', `hard', and `unlimited' stand for
    the current soft limit, the current hard limit, and no limit, respectively.
    Otherwise, the current value of the specified resource is printed.
    If no option is given, then -f is assumed.  Values are in 1024-byte
    increments, except for -t, which is in seconds, -p, which is in
    increments of 512 bytes, and -u, which is an unscaled number of
    processes.

Wobei wenn '1024 open files' wg. der call-files bei Dir ein Limitierung darstellen, frage ich mich eher wie der * auf diese Menge an Dateien reagiert? Und ob da u.U. nicht der Weg via AMI->originate geschickter wäre.

Ciao,
dev
 
Hi dev,
ich bin über diesen Link http://listman.redhat.com/archives/fedora-list/2006-May/msg00811.html darauf gekommen und bin zunächst davon ausgegangen, daß z.B. ulimit -n 10000 reicht !? Aber so wie es aussieht, muss ich auch noch einen Eintrag in limits.conf tätigen. Da kam dann Rätselraten auf, weil 'man 'limits.conf' mir ausserdem ein 'No manual entry for limits.conf' liefert und auch meine limits.conf munter auskommentiert ist, ich aber mit den Comments mangels Dokumentation nichts anfangen kann.
Aber deine Antwort ist sehr ausführlich und so wie ich es verstehe, reicht eine entsprechende ulimit-Anweisung ?

Gruss und thanx, Seven
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.