{"id":10090,"date":"2023-10-08T20:35:26","date_gmt":"2023-10-08T18:35:26","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=10090"},"modified":"2023-10-08T20:35:28","modified_gmt":"2023-10-08T18:35:28","slug":"htop-interaktiver-prozessmonitor-auf-dem-linux-terminal","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/10\/08\/htop-interaktiver-prozessmonitor-auf-dem-linux-terminal\/","title":{"rendered":"htop &#8211; interaktiver Prozessmonitor auf dem Linux-Terminal"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Die meisten Benutzer, die sich unter Linux mit Prozessen am Terminal besch\u00e4ftigen, kennen den Prozessmonitor <a href=\"https:\/\/linux-bibel.at\/index.php\/2023\/09\/02\/top-systemmonitor-unter-linux-am-terminal\/\" data-type=\"post\" data-id=\"309\">top<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-scaled.jpeg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-1024x640.jpeg\" alt=\"\" class=\"wp-image-10091\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/top-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Nat\u00fcrlich l\u00e4sst sich damit vieles anfangen &#8211; die meisten kennen die Software ganz einfach nicht (<em>siehe erster Link<\/em>), aber unbequem ist <code>top<\/code> trotzdem etwas. Eine Alternative zu top ist nun der Prozessmonitor <code>htop<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">htop installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software wie \u00fcblich ganz einfach \u00fcber die Paket-Verwaltung durch das Paket &#8222;htop&#8220; &#8211; etwa gleich als root auf dem Terminal mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install htop<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">htop nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Wie <code>top<\/code>, starten Sie auch htop ganz einfach mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>htop<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">M\u00f6chten Sie nur die Prozesse eines bestimmten Benutzers sehen, nutzen Sie die Option <code>-u<\/code> mit dem gew\u00fcnschten Benutzernamen &#8211; etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>htop -u robert<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-scaled.jpeg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1024x640.jpeg\" alt=\"\" class=\"wp-image-10092\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Im oberen Bereich sehen Sie grobe Systemdaten, etwa die Auslastung der Prozessoren und des Speichers, darunter zeigen sich die einzelnen Prozesse tabellarisch aufgelistet und live aktualisiert.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nutzen Sie die <kbd>Pfeiltasten<\/kbd> (auf \/ ab), k\u00f6nnen Sie Prozesse markieren:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-scaled.jpeg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-1024x640.jpeg\" alt=\"\" class=\"wp-image-10093\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-1-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Prozesse, die am meisten Leistung ben\u00f6tigen, finden sich nat\u00fcrlich ganz oben. Markieren Sie einen Prozess und dr\u00fccken <kbd>F9<\/kbd>, k\u00f6nnen Sie diesem Prozess ein Signal senden, um diesen etwa zu beenden &#8211; alle M\u00f6glichkeiten zeigen sich dann links:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-scaled.jpeg\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-1024x640.jpeg\" alt=\"\" class=\"wp-image-10094\" style=\"width:750px;height:469px\" width=\"750\" height=\"469\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-2-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mit den <kbd>Pfeiltasten<\/kbd> (auf \/ ab) w\u00e4hlen Sie das gew\u00fcnschte Signal, mit <kbd>Eingabe<\/kbd> senden Sie das markierte Signal, mit <kbd>Esc<\/kbd> brechen Sie ab.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Mit <kbd>F<\/kbd> &#8211; also gro\u00dfes F markieren Sie einen Prozess, dieser bleibt dann auch markiert &#8211; auch, wenn dieser durch mehr oder weniger ben\u00f6tigte Leistung nach oben oder nach unten springt. Auf dieselbe Weise heben Sie die Markierung wieder auf:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-scaled.jpeg\" rel=\"lightbox-4\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-1024x640.jpeg\" alt=\"\" class=\"wp-image-10095\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-3-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Dr\u00fccken Sie die Taste <code>u<\/code>, wird links eine Liste aller Benutzer angezeigt &#8211; auch Systembenutzer. Mit den <kbd>Pfeiltasten<\/kbd> w\u00e4hlen Sie einen aus und best\u00e4tigen mit Eingabe, so werden nur noch die Prozesse des ausgew\u00e4hlten Benutzers angezeigt:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-scaled.jpeg\" rel=\"lightbox-5\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-1024x640.jpeg\" alt=\"\" class=\"wp-image-10096\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-4-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mit <kbd>t<\/kbd> lassen Sie sich eine Baumansicht, also zusammenh\u00e4ngende Prozesse anzeigen, mit der gleichen Taste deaktivieren Sie dies wieder:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-scaled.jpeg\" rel=\"lightbox-6\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-1024x640.jpeg\" alt=\"\" class=\"wp-image-10097\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-5-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mit <kbd>F7<\/kbd> k\u00f6nnen Sie die Priorit\u00e4t eines Prozesses verringern (<em>nur eigene Prozesse &#8211; nice-Wert<\/em>) und mit <kbd>F8<\/kbd> erh\u00f6hen (<em>nur als root<\/em>). Markieren Sie einen Prozess und dr\u00fccken <kbd>s<\/kbd>, k\u00f6nnen Sie dessen Aufrufe im Dateisystem und im Netzwerk ansehen (<em>hierzu muss \u00fcber die Paket-Verwaltung das Paket &#8222;<strong>strace<\/strong>&#8220; installiert sein<\/em>):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-scaled.jpeg\" rel=\"lightbox-7\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"640\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-1024x640.jpeg\" alt=\"\" class=\"wp-image-10098\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-1024x640.jpeg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-300x188.jpeg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-150x94.jpeg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-768x480.jpeg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-1536x960.jpeg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/10\/htop-6-2048x1280.jpeg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mit <kbd>F1<\/kbd> rufen Sie die Hilfe auf, um an noch mehr Informationen zu kommen, mit <kbd>q<\/kbd> beenden Sie die Software.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Die meisten Benutzer, die sich unter Linux mit Prozessen am Terminal besch\u00e4ftigen, kennen den Prozessmonitor top. Nat\u00fcrlich l\u00e4sst sich damit vieles anfangen &#8211; die meisten kennen die Software ganz einfach nicht (siehe erster Link), aber unbequem ist top trotzdem etwas. Eine Alternative zu top ist nun der Prozessmonitor htop. htop installieren Unter auf Debian basierenden [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":10095,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,7,6],"class_list":["post-10090","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-terminal","tag-kommandozeile","tag-shell","tag-terminal"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/10090","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=10090"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/10090\/revisions"}],"predecessor-version":[{"id":10099,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/10090\/revisions\/10099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/10095"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=10090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=10090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=10090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}