Nethogs: Unterschied zwischen den Versionen

Aus Foxwiki
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
{{DISPLAYTITLE:nethogs}}
{{DISPLAYTITLE:nethogs}}
'''nethogs''' - Gruppierung der Bandbreite nach Prozessen


'''topic''' kurze Beschreibung
== Beschreibung ==
== Beschreibung ==
; Net top tool grouping bandwidth per process
NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups bandwidth by process - and does not rely on a special kernel module to be loaded. So if there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this, and if it's some kind of spinning process, kill it.
== Installation ==
== Installation ==
== Anwendungen ==
== Anwendungen ==
=== Fehlerbehebung ===
== INTERACTIVE CONTROL ==
== Syntax ==
{| class="wikitable sortable options"
=== Optionen ===
|-
=== Parameter ===
! Option !! Beschreibung
=== Umgebungsvariablen ===
|-
=== Exit-Status ===
| q ||  quit
== Konfiguration ==
|-
=== Dateien ===
| s ||  sort by SENT traffic
== Sicherheit ==
|-
| r ||  sort by RECEIVED traffic
|-
| l ||  display command line
|-
| b ||  display the program basename
|-
| m ||  switch between total (KB, B, MB) and throughput (KB/s, MB/s, GB/s) mode
|}


== Siehe auch ==
== RUNNING WITHOUT ROOT ==
=== Dokumentation ===
In order to be run by an unprivileged user, nethogs needs the cap_net_admin and cap_net_raw capabilities. These can be set on the executable by using the setcap(8) command, as follows:
==== RFC ====
$ sudo setcap "cap_net_admin,cap_net_raw+pe" /usr/local/sbin/nethogs
==== Man-Pages ====
==== Info-Pages ====
=== Links ===
==== Einzelnachweise ====
<references />
==== Projekt ====
==== Weblinks ====


== Testfragen ==
; Note
<div class="toccolours mw-collapsible mw-collapsed">
: When using the -P <pid> option, in a case where a process exited (normally or abruptly), Nethogs does not track that it exited. So, the operating system might create a new process (for another program) with the same pid. In this case, this new process will be shown by Nethogs.
''Testfrage 1''
<div class="mw-collapsible-content">'''Antwort1'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 2''
<div class="mw-collapsible-content">'''Antwort2'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 3''
<div class="mw-collapsible-content">'''Antwort3'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 4''
<div class="mw-collapsible-content">'''Antwort4'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 5''
<div class="mw-collapsible-content">'''Antwort5'''</div>
</div>


[[Kategorie:Entwurf]]
=== Fehlerbehebung ===


= Manpage =
== Syntax ==
== SYNOPSIS ==
# nethogs [-V] [-h] [-x] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s] [-a] [-l] [-f filter] [-C] [-b] [-g period] [-P pid] [device(s)]
nethogs [-V] [-h] [-x] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s] [-a] [-l] [-f filter] [-C] [-b] [-g period] [-P pid] [device(s)]


== DESCRIPTION ==
=== Optionen ===
NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups bandwidth by process - and does not rely on a special kernel module to be loaded. So if there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this, and if it's some kind of spinning process, kill it.
 
== Options ==
{| class="wikitable sortable options"
{| class="wikitable sortable options"
|-
|-
Zeile 96: Zeile 78:
|-
|-
| device(s) || ... to monitor. Default is all interfaces up and running excluding loopback
| device(s) || ... to monitor. Default is all interfaces up and running excluding loopback
== INTERACTIVE CONTROL ==
{| class="wikitable sortable options"
|-
! Option !! Beschreibung
|-
| q ||  quit
|-
| s ||  sort by SENT traffic
|-
| r ||  sort by RECEIVED traffic
|-
| l ||  display command line
|-
| b ||  display the program basename
|-
| m ||  switch between total (KB, B, MB) and throughput (KB/s, MB/s, GB/s) mode
|}
|}


== RUNNING WITHOUT ROOT ==
=== Parameter ===
In order to be run by an unprivileged user, nethogs needs the cap_net_admin and cap_net_raw capabilities. These can be set on the executable by using the setcap(8) command, as follows:
=== Umgebungsvariablen ===
$ sudo setcap "cap_net_admin,cap_net_raw+pe" /usr/local/sbin/nethogs
=== Exit-Status ===
== Konfiguration ==
=== Dateien ===
== Sicherheit ==


; Note
== Siehe auch ==
: When using the -P <pid> option, in a case where a process exited (normally or abruptly), Nethogs does not track that it exited. So, the operating system might create a new process (for another program) with the same pid. In this case, this new process will be shown by Nethogs.
 
== SEE ALSO ==
# netstat(8)
# netstat(8)
# tcpdump(1)
# tcpdump(1)
# pcap(3)
# pcap(3)
=== Dokumentation ===
==== RFC ====
==== Man-Pages ====
==== Info-Pages ====
=== Links ===
==== Einzelnachweise ====
<references />
==== Projekt ====
==== Weblinks ====
== Testfragen ==
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 1''
<div class="mw-collapsible-content">'''Antwort1'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 2''
<div class="mw-collapsible-content">'''Antwort2'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 3''
<div class="mw-collapsible-content">'''Antwort3'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 4''
<div class="mw-collapsible-content">'''Antwort4'''</div>
</div>
<div class="toccolours mw-collapsible mw-collapsed">
''Testfrage 5''
<div class="mw-collapsible-content">'''Antwort5'''</div>
</div>
[[Kategorie:Entwurf]]
[[Kategorie:Linux:Befehl]]
[[Kategorie:Linux:Befehl]]
[[Kategorie:Netzwerk:Befehl]]
[[Kategorie:Netzwerk:Befehl]]
{{DEFAULTSORT:nethogs}}
{{DEFAULTSORT:nethogs}}

Version vom 15. Februar 2023, 13:37 Uhr

nethogs - Gruppierung der Bandbreite nach Prozessen

Beschreibung

Net top tool grouping bandwidth per process

NetHogs is a small 'net top' tool. Instead of breaking the traffic down per protocol or per subnet, like most such tools do, it groups bandwidth by process - and does not rely on a special kernel module to be loaded. So if there's suddenly a lot of network traffic, you can fire up NetHogs and immediately see which PID is causing this, and if it's some kind of spinning process, kill it.

Installation

Anwendungen

INTERACTIVE CONTROL

Option Beschreibung
q quit
s sort by SENT traffic
r sort by RECEIVED traffic
l display command line
b display the program basename
m switch between total (KB, B, MB) and throughput (KB/s, MB/s, GB/s) mode

RUNNING WITHOUT ROOT

In order to be run by an unprivileged user, nethogs needs the cap_net_admin and cap_net_raw capabilities. These can be set on the executable by using the setcap(8) command, as follows:

$ sudo setcap "cap_net_admin,cap_net_raw+pe" /usr/local/sbin/nethogs
Note
When using the -P <pid> option, in a case where a process exited (normally or abruptly), Nethogs does not track that it exited. So, the operating system might create a new process (for another program) with the same pid. In this case, this new process will be shown by Nethogs.

Fehlerbehebung

Syntax

  1. nethogs [-V] [-h] [-x] [-d seconds] [-v mode] [-c count] [-t] [-p] [-s] [-a] [-l] [-f filter] [-C] [-b] [-g period] [-P pid] [device(s)]

Optionen

Option Beschreibung
-V prints version.
-h prints available commands usage.
-x bughunt mode - implies tracemode.
-d delay for update refresh rate in seconds. default is 1.
-v view mode (0 = KB/s, 1 = total KB, 2 = total B, 3 = total MB, 4 = MB/s, 5 = GB/s). default is 0.
-c number of updates. default is 0 (unlimited).
-t tracemode.
-p sniff in promiscuous mode (not recommended).
-s sort output by sent column.
-l display command line.
-a monitor all devices, even loopback/stopped ones.
-C capture TCP and UDP.
-b Display the program basename.
-g garbage collection period in number of refresh. default is 50.
-P Show only processes with the specified pid(s).
-f EXPERIMENTAL: specify string pcap filter (like tcpdump). This may be removed or changed

in a future version.

device(s) ... to monitor. Default is all interfaces up and running excluding loopback

Parameter

Umgebungsvariablen

Exit-Status

Konfiguration

Dateien

Sicherheit

Siehe auch

  1. netstat(8)
  2. tcpdump(1)
  3. pcap(3)

Dokumentation

RFC

Man-Pages

Info-Pages

Links

Einzelnachweise

Projekt

Weblinks

Testfragen

Testfrage 1

Antwort1

Testfrage 2

Antwort2

Testfrage 3

Antwort3

Testfrage 4

Antwort4

Testfrage 5

Antwort5