{"id":309,"date":"2023-09-02T11:06:31","date_gmt":"2023-09-02T09:06:31","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=309"},"modified":"2023-09-02T11:06:33","modified_gmt":"2023-09-02T09:06:33","slug":"top-systemmonitor-unter-linux-am-terminal","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/02\/top-systemmonitor-unter-linux-am-terminal\/","title":{"rendered":"top &#8211; Systemmonitor unter Linux am Terminal"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Der Befehll:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>top<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">dient unter Linux am\u00a0Terminal\u00a0dazu, sich die laufenden Prozesse und die Ressourcen des Systems anzeigen zu lassen. In diesem Beitrag sehen wir uns diese Software etwas genauer an.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Der Befehl &#8222;<strong><code>top<\/code><\/strong>&#8220; ist automatisch in jedem mir bekannten Linux-System vorhanden, braucht also nur genutzt zu werden. Gestartet wird nat\u00fcrlich ganz einfach mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>top<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1024x576.jpg\" alt=\"\" class=\"wp-image-310\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Die Software aktualisiert die Anzeige alle drei Sekunden und wird mit der Taste\u00a0<strong><kbd>q<\/kbd><\/strong>\u00a0beendet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Zu Beginn sehen wir ganz oben links einmal die Uhrzeit, es folgen weitere Daten:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"149\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1-1024x149.jpg\" alt=\"\" class=\"wp-image-311\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1-1024x149.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1-300x44.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1-768x112.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-1.jpg 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Diese Daten sehen wir uns nun etwas genauer an:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>up<\/strong>&nbsp;&#8211; Die Zeit die das System in dieser Sitzung aktuell l\u00e4uft<\/li>\n\n\n\n<li><strong>users<\/strong>&nbsp;&#8211; Angemeldete Nutzer, dies sind meist Sie selbst und virtuelle System-Nutzer.<\/li>\n\n\n\n<li><strong>load average<\/strong>&nbsp;&#8211; Die durchschnittliche Last der CPU&#8217;s<\/li>\n\n\n\n<li><strong>Tasks<\/strong>&nbsp;&#8211; Alle Prozesse<\/li>\n\n\n\n<li><strong>running<\/strong>&nbsp;&#8211; Laufende Prozesse<\/li>\n\n\n\n<li><strong>sleeping<\/strong>&nbsp;&#8211; Gerade nicht aktive Prozesse<\/li>\n\n\n\n<li><strong>stopped<\/strong>&nbsp;&#8211; Gestoppte Prozesse<\/li>\n\n\n\n<li><strong>zombie<\/strong>&nbsp;&#8211; Prozesse, die eigentlich keinen Sinn mehr haben aber trotzdem noch laufen und Ressourcen ben\u00f6tigen, sollten gestoppt werden<\/li>\n\n\n\n<li><strong>%CPU(s)<\/strong>&nbsp;&#8211; Die Auslastung der CPU&#8217;s &#8211;&nbsp;<strong>us<\/strong>&nbsp;&#8211; Prozesse der Benutzer,&nbsp;<strong>sy<\/strong>&nbsp;&#8211; Prozesse des Systems,&nbsp;<strong>ni<\/strong>&nbsp;&#8211; Prozesse mit ge\u00e4nderter Priorit\u00e4t,&nbsp;<strong>id<\/strong>&nbsp;&#8211; Leer laufende Prozesse,&nbsp;<strong>wa<\/strong>&nbsp;&#8211; Prozesse die auf eine Aufgabe warten,&nbsp;<strong>hi<\/strong>&nbsp;&#8211; Prozesse die auf Verbindung mit Hardware warten,&nbsp;<strong>si<\/strong>&nbsp;&#8211; Prozesse die auf Software warten (<em>auf andere Prozesse<\/em>),&nbsp;<strong>st<\/strong>&nbsp;&#8211; Prozesse in Verbindung mit virtuellen Maschinen<\/li>\n\n\n\n<li><strong>MiB Spch<\/strong>&nbsp;&#8211; Auslastung des Arbeitsspeichers<\/li>\n\n\n\n<li><strong>MiB Swap<\/strong>&nbsp;&#8211; Auslastung des SWAP<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Nun folgt die Liste der Prozesse, die zugeh\u00f6rigen Daten sind in Spalten angezeigt:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"432\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-2-1024x432.jpg\" alt=\"\" class=\"wp-image-312\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-2-1024x432.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-2-300x126.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-2-768x324.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-2.jpg 1331w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Folgende Spalten beinhalten folgende Daten:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>PID<\/strong>&nbsp;&#8211; Die Prozess-ID, die Identifikationsnummer des Prozesses<\/li>\n\n\n\n<li><strong>USER<\/strong>&nbsp;&#8211; Der Benutzer, der den Prozess gestartet hat<\/li>\n\n\n\n<li><strong>PR<\/strong>&nbsp;&#8211; Die Priorit\u00e4t des Prozesses, unter &#8222;<strong>0<\/strong>&#8220; h\u00f6here Priorit\u00e4t, \u00fcber &#8222;<strong>0<\/strong>&#8220; niedrigere Priorit\u00e4t<\/li>\n\n\n\n<li><strong>NI<\/strong>&nbsp;&#8211; Die vom Nutzer oder vom Administrator ge\u00e4nderte Priorit\u00e4t<\/li>\n\n\n\n<li><strong>VIRT<\/strong>&nbsp;&#8211; Der gesamte genutzte Speicher der Prozesses in Bytes<\/li>\n\n\n\n<li><strong>RES<\/strong>&nbsp;&#8211; Der Speicher des Prozesses im Arbeitsspeicher<\/li>\n\n\n\n<li><strong>SHR<\/strong>&nbsp;&#8211; Der Speicher des Prozesses im SWAP<\/li>\n\n\n\n<li><strong>S<\/strong>&nbsp;&#8211; Der Status des Prozesses &#8211;&nbsp;<strong>D<\/strong>&nbsp;= nicht unterbrechbarer Schlaf,&nbsp;<strong>R<\/strong>&nbsp;= l\u00e4uft,&nbsp;<strong>S<\/strong>&nbsp;= schl\u00e4ft,&nbsp;<strong>T<\/strong>&nbsp;= mit &#8222;trace&#8220; auf Fehlersuche oder gestoppt,&nbsp;<strong>Z<\/strong>&nbsp;= Zombie<\/li>\n\n\n\n<li><strong>%CPU<\/strong>&nbsp;&#8211; Die genutzte CPU-Zeit in Prozent<\/li>\n\n\n\n<li><strong>%MEM<\/strong>&nbsp;&#8211; Die Auslastung des Arbeitsspeichers in Prozent<\/li>\n\n\n\n<li><strong>TIME+<\/strong>&nbsp;&#8211; Die CPU-Zeit die der Prozess bereits genutzt hat<\/li>\n\n\n\n<li><strong>COMMAND \/ BEFEHL<\/strong>&nbsp;&#8211; Der Prozess \/ der Befehl<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Nutzbare Optionen<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">F\u00fcr den Start k\u00f6nnen Sie auch folgende Optionen nutzen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>-c<\/code><\/strong>\u00a0&#8211; Zeigt nicht nur den Befehl, sondern den kompletten Pfad zum Prozess, also:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>top -c<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-3-1024x576.jpg\" alt=\"\" class=\"wp-image-313\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-3-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-3-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-3-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-3-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-3.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>-i<\/code><\/strong>\u00a0&#8211; Prozesse, die auf etwas warten, also keine Last verursachen, werden nicht angezeigt.<\/li>\n\n\n\n<li><strong><code>-u - benutzer<\/code><\/strong>\u00a0&#8211; Zeigt nur die Prozesse des angegebenen Nutzers &#8211; etwa:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>top -u robert<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>-S<\/code><\/strong>\u00a0&#8211; Zeigt die Zeit die der Prozess schon aktiv ist<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Arbeiten mit&nbsp;<strong>top<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>top<\/strong>&nbsp;ist nicht einfach nur eine starre Software die, die laufenden Prozesse anzeigt, Sie k\u00f6nnen folgende Tasten nutzen:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><kbd>z<\/kbd><\/strong>\u00a0&#8211; F\u00e4rbt die Ausgabe ein und macht dies wieder r\u00fcckg\u00e4ngig (<em>ist bei schlechtem Licht hilfreich<\/em>):<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-4-1024x576.jpg\" alt=\"\" class=\"wp-image-314\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-4-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-4-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-4-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-4-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-4.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>P<\/code><\/strong>\u00a0&#8211; Sortiert die Liste der Prozesse nach deren Last an der CPU<\/li>\n\n\n\n<li><strong><code>m<\/code><\/strong>\u00a0&#8211; Schaltet die Ausgabe etwas um (<em>grafische Speicherlast<\/em>), nach dreimaligem Dr\u00fccken ist man wieder in der Standard-Ansicht:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-5-1024x576.jpg\" alt=\"\" class=\"wp-image-315\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-5-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-5-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-5-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-5-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-5.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>M<\/code><\/strong>\u00a0&#8211; Sortiert die Liste der Prozesse nach der Last am Arbeitsspeicher.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>n<\/code><\/strong>\u00a0&#8211; l\u00e4sst die anzuzeigende Prozesse reduzieren, Sie dr\u00fccken einfach\u00a0<strong>n<\/strong>\u00a0und geben anschlie\u00dfend die Anzahl ein und best\u00e4tigen mit Eingabe:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"323\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-6-1024x323.jpg\" alt=\"\" class=\"wp-image-316\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-6-1024x323.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-6-300x95.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-6-768x242.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-6.jpg 1172w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>k<\/code><\/strong>\u00a0&#8211; Startet das Beenden eines Prozesses, anschlie\u00dfend geben Sie einfach die PID des zu t\u00f6tenden Prozesses ein und best\u00e4tigen mit\u00a0<strong><kbd>Eingabe<\/kbd><\/strong>:<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"203\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-7-1024x203.jpg\" alt=\"\" class=\"wp-image-317\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-7-1024x203.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-7-300x59.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-7-768x152.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/top-7.jpg 1170w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Der Befehll: dient unter Linux am\u00a0Terminal\u00a0dazu, sich die laufenden Prozesse und die Ressourcen des Systems anzeigen zu lassen. In diesem Beitrag sehen wir uns diese Software etwas genauer an. Der Befehl &#8222;top&#8220; ist automatisch in jedem mir bekannten Linux-System vorhanden, braucht also nur genutzt zu werden. Gestartet wird nat\u00fcrlich ganz einfach mit dem Befehl: Die [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":316,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,4],"tags":[12,5,7,15],"class_list":["post-309","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-system","category-terminal","tag-kommandozeile","tag-linux","tag-shell","tag-system"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":318,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/309\/revisions\/318"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/316"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}