ulimit - Erklärung

P

placebo

Mitglied
Hi Community,

wer kann mir den ulimit Befehl näher erläutern?
Ich weiß das man mit diesem Befehl auf dem System Ressourcen begrenzen kann. Doch was bedeuten diese im einzelnen?

Code:
linux:~# 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) unlimited
cpu time             (seconds, -t) unlimited
max user processes            (-u) 8192
virtual memory        (kbytes, -v) unlimited

Einige sind klar, was mich näher interessiert ist, was steckt hinter:
core file size
data seg size
stack size
pipe size
virtual memory (Swap?!)

Merci
 
Tja, mit dem Ausführen des Befehls aus Deiner Signatur ist Dir wohl ein kleines Mißgeschick passiert - dumm sowas, aber läßt sich recht einfach wieder nachinstallieren - einfach mal den Paketmanager Deines Vertrauens bemühen.

Dann sollte Dir ein einfaches
Code:
man ulimit
weiterhelfen.

Falls das allerdings ein Ausdruck von Faulheit ist, dann ein ganz besonders herzliches RTFM + STFW - und natürlich auch noch die hier
 
Zuletzt bearbeitet von einem Moderator:
Nein, ulimit ist ein shell - buildin.

Deshalb man bash /ksh oder was immer verwendet wird.

Auszug aus man bash:
ulimit [-SHacdefilmnpqrstuvx [limit]]
Provides control over the resources available to the shell and to processes started by it, on systems that
allow such control. The -H and -S options specify that the hard or soft limit is set for the given
resource. A hard limit cannot be increased once it is set; a soft limit may be increased up to the value
of the hard limit. If neither -H nor -S is specified, both the soft and hard limits are set. The value
of limit can be a number in the unit specified for the resource or one of the special values hard, soft,
or unlimited, which stand for the current hard limit, the current soft limit, and no limit, respectively.
If limit is omitted, the current value of the soft limit of the resource is printed, unless the -H option
is given. When more than one resource is specified, the limit name and unit are printed before the value.
Other options are interpreted as follows:
-a All current limits are reported
-c The maximum size of core files created
-d The maximum size of a process’s data segment
-e The maximum scheduling priority (‘nice’)
-f The maximum size of files created by the shell
-i The maximum number of pending signals
-l The maximum size that may be locked into memory
-m The maximum resident set size
-n The maximum number of open file descriptors (most systems do not allow this value to be set)
-p The pipe size in 512-byte blocks (this may not be set)
-q The maximum number of bytes in POSIX message queues
-r The maximum rt priority
-s The maximum stack size
-t The maximum amount of cpu time in seconds
-u The maximum number of processes available to a single user
-v The maximum amount of virtual memory available to the shell
-x The maximum number of file locks

If limit is given, it is the new value of the specified resource (the -a option is display only). If no
option is given, then -f is assumed. Values are in 1024-byte increments, except for -t, which is in sec‐
onds, -p, which is in units of 512-byte blocks, and -n and -u, which are unscaled values. The return sta‐
tus is 0 unless an invalid option or argument is supplied, or an error occurs while setting a new limit.

Wolfgang
 
Genau aus diesem Grund habe ich die Signatur.
Ich lese die Manpage, bevor ich was schreibe.
Ich google bevor ich was schreibe.
Und ich bekomme immer noch solche Antworten, obwohl ich das gemacht habe.
Ich formuliere nun meine Frage präzieser:


Was bedeutet diese einzelnen Werte genau???
Was ist: core file size
Was ist: data seg size
Was ist: stack size
Was ist: pipe size
Was ist: virtual memory (Swap?!)

... und bitte um eine vernünftige Antwort.
Danke
 
Was ist: core file size
core-dumps bzw. files enthalten exakt den Speicherinhalt eines Programmes zum Zeitpunkt des Absturzes. Wenn sich also ein Programm verabschiedet, sorgt das Betriebssystem dafuer, dass der Speicherinhalt auf der Festplatte verewigt wird. Sowas eignet sich sehr fuer Programmierer, die herausfinden wollen, warum ihre Software fehlerhaft ist und abschmiert. Mit einem Debugger koennen sie den core-dump untersuchen und Fehler lokalisieren.

Was ist: data seg size
http://en.wikipedia.org/wiki/Maximum_segment_size

Was ist: stack size
http://www.isd.mel.nist.gov/projects/rtlinux/rtutorial-2.0/doc/ex10_stack.htm

Was ist: virtual memory
http://de.wikipedia.org/wiki/Virtuelle_Speicherverwaltung

Und btw, zu schreiben das du die man-Pages bereits gelesen hast, macht ein wesentlich besseren Eindruck als der hier: http://www.unixboard.de/vb3/images/smilies/thefinger.gif
Die Ergebnise mit Hilfe von Google in ca. 7 Minuten gefunden...
 
Zuletzt bearbeitet:
Danke für deine Antwort, sowas wollte ich hören!


Und btw, zu schreiben das du die man-Pages bereits gelesen hast, macht ein wesentlich besseren Eindruck als der hier: :finger:
Ich bin ein lustiger Mensch und fand den Smiley komisch ;)
Trotzdem werde ich meine Signatur ändern, da die umgekehrte Psychologie immer noch funktioniert ;)
 
Zuletzt bearbeitet:

Ähnliche Themen

Rollei Mini Wifi Camcorder

ulimit greift nicht ?

NagiosGrapher 1.7.1 funktioniert nicht

Displayport + externer Monitor zeigt bei startx nichts erst bei DVI

dovecot und postfix Konfiguration Problem

Zurück
Oben