Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung Nächste Überarbeitung Beide Seiten, nächste Überarbeitung | ||
admin_grundlagen:prozesse [2016/01/13 15:58] ingo_wichmann |
admin_grundlagen:prozesse [2018/10/16 09:50] ingo_wichmann [Wieviel Speicher ist noch frei?] |
||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
====== Prozessverwaltung ====== | ====== Prozessverwaltung ====== | ||
- | |||
===== Prozesse anzeigen ===== | ===== Prozesse anzeigen ===== | ||
==== ps ==== | ==== ps ==== | ||
Zeile 8: | Zeile 7: | ||
)) | )) | ||
ps -e | ps -e | ||
+ | |||
+ | Anzeigen aller Prozesse und Threads: | ||
+ | ps -T -e | ||
+ | |||
+ | === Status === | ||
+ | {{:admin_grundlagen:process_status.png?direct&200|}} (( aus ''man waitpid'': //A child that terminates, but has not been waited for becomes a "zombie". The kernel maintains a minimal set of information about the zombie process (PID, termination status, resource usage information) in order to allow the parent to later perform a wait to obtain information about the child. As long as a zombie is not removed from the system via a wait, it will consume a slot in the kernel process table, and if this table fills, it will not be possible to create further processes. If a parent process terminates, then its "zombie" children (if any) are adopted by init(1), (or by the nearest "subreaper" process ...; init(1) automatically performs a wait to remove the zombies.//)) | ||
+ | |||
Anzeigen aller Prozesse, incl. Benutzer: | Anzeigen aller Prozesse, incl. Benutzer: | ||
(( | (( | ||
Zeile 26: | Zeile 32: | ||
ps auxw | ps auxw | ||
ps auxwf | ps auxwf | ||
- | + | ||
- | | + | |
Anzeige aller Prozesse incl. cgroup: | Anzeige aller Prozesse incl. cgroup: | ||
Zeile 37: | Zeile 42: | ||
Anzeigen, welche Dateien ein Prozess geöffnet hat: | Anzeigen, welche Dateien ein Prozess geöffnet hat: | ||
lsof -p 4711 | lsof -p 4711 | ||
+ | oder | ||
+ | lsof -c update-notifier | ||
Prozesse baumartig darstellen: | Prozesse baumartig darstellen: | ||
pstree | pstree | ||
Zeile 45: | Zeile 52: | ||
Prozesse nach Ressourcenverbrauch sortiert anzeigen: | Prozesse nach Ressourcenverbrauch sortiert anzeigen: | ||
top | top | ||
+ | Modernere Variante von top: | ||
+ | htop | ||
===== Prozess Prioritäten ===== | ===== Prozess Prioritäten ===== | ||
Zeile 52: | Zeile 61: | ||
ps -p $$ -o pid,nice,cmd | ps -p $$ -o pid,nice,cmd | ||
- | Prozess mit um 5 erhöhter Priorität starten: | + | Prozess mit um 5 abgesenkter Priorität starten: |
nice -5 bash | nice -5 bash | ||
Zeile 113: | Zeile 122: | ||
- Die gesamte Menge an Swapspace, die zur Verfügung steht. | - Die gesamte Menge an Swapspace, die zur Verfügung steht. | ||
- Der belegte Swapspace | - Der belegte Swapspace | ||
- | - Der noch freie Swapspace, also (9) abzüglich (10) | + | - Der noch freie [[Swap|Swapspace]], also (9) abzüglich (10) |
Das bedeutet also, dass im Falle ganz oben insgesamt 167M von | Das bedeutet also, dass im Falle ganz oben insgesamt 167M von |