all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add nethogs.
@ 2016-10-30  7:16 Arun Isaac
  2016-10-30  7:26 ` Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2016-10-30  7:16 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/networking.scm (nethogs): New variable.
---
 gnu/packages/networking.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ac88673..89641fa 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -991,3 +991,39 @@ the bandwidth, loss, and other parameters.")
                    license:ncsa              ; src/{units,iperf_locale,tcp_window_size}.c
                    license:expat             ; src/{cjson,net}.[ch]
                    license:public-domain)))) ; src/portable_endian.h
+
+(define-public nethogs
+  (package
+    (name "nethogs")
+    (version "0.8.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/raboof/nethogs/archive/v"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1k4x8r7s4dgcb6n2rjn28h2yyij92mwm69phncl3597cdxr954va"))
+              (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libpcap" ,libpcap)
+       ("ncurses" ,ncurses)))
+    (arguments
+     `(#:make-flags `("CC=gcc"
+                      ,(string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://github.com/raboof/nethogs")
+    (synopsis "Linux 'net top' tool")
+    (description "NetHogs is a small 'net top' tool.  Instead of
+breaking the traffic down per protocol or per subnet, like most tools
+do, it groups bandwidth by process.
+
+NetHogs does not rely on a special kernel module to be loaded.  If
+there's suddenly a lot of network traffic, you can fire up NetHogs and
+immediately see which PID is causing this.  This makes it easy to
+identify programs that have gone wild and are suddenly taking up your
+bandwidth.")
+    (license license:gpl2+)))
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30  7:16 [PATCH] gnu: Add nethogs Arun Isaac
@ 2016-10-30  7:26 ` Arun Isaac
  2016-10-30 12:18   ` Marius Bakke
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Arun Isaac @ 2016-10-30  7:26 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]


Arun Isaac writes:

> +    (arguments
> +     `(#:make-flags `("CC=gcc"
> +                      ,(string-append "PREFIX=" %output))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure))))

Currently, the nethogs binary goes to /sbin. Should I make it go to
/bin? I'll have to run substitute* on src/MakeApp.mk for that.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30  7:26 ` Arun Isaac
@ 2016-10-30 12:18   ` Marius Bakke
  2016-10-30 13:40   ` Alex Kost
  2016-10-30 16:44   ` Arun Isaac
  2 siblings, 0 replies; 10+ messages in thread
From: Marius Bakke @ 2016-10-30 12:18 UTC (permalink / raw)
  To: Arun Isaac, guix-devel

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

Arun Isaac <arunisaac@systemreboot.net> writes:

> Arun Isaac writes:
>
>> +    (arguments
>> +     `(#:make-flags `("CC=gcc"
>> +                      ,(string-append "PREFIX=" %output))
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (delete 'configure))))
>
> Currently, the nethogs binary goes to /sbin. Should I make it go to
> /bin? I'll have to run substitute* on src/MakeApp.mk for that.

I am in favor of this. Maybe in the long run we can restore sbin to its
former glory, that is static binaries ;)

Other than that this package looks great. I'm not sure how bash knows to
tab-complete my network interfaces, but I'm not complaining! :)

One minor suggestion, feel free to disregard this: Perhaps synopsis
could be "Per-process bandwidth monitor" and then "for Linux" added to
the first sentence of the description.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30  7:26 ` Arun Isaac
  2016-10-30 12:18   ` Marius Bakke
@ 2016-10-30 13:40   ` Alex Kost
  2016-10-30 16:44   ` Arun Isaac
  2 siblings, 0 replies; 10+ messages in thread
From: Alex Kost @ 2016-10-30 13:40 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

Arun Isaac (2016-10-30 12:56 +0530) wrote:

> Arun Isaac writes:
>
>> +    (arguments
>> +     `(#:make-flags `("CC=gcc"
>> +                      ,(string-append "PREFIX=" %output))
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (delete 'configure))))
>
> Currently, the nethogs binary goes to /sbin. Should I make it go to
> /bin? I'll have to run substitute* on src/MakeApp.mk for that.

I would leave it in /sbin.  It's not a problem, and there are other
packages that put binaries there, so I think we shouldn't modify an
upstream choice for this.

-- 
Alex

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] gnu: Add nethogs.
  2016-10-30  7:26 ` Arun Isaac
  2016-10-30 12:18   ` Marius Bakke
  2016-10-30 13:40   ` Alex Kost
@ 2016-10-30 16:44   ` Arun Isaac
  2016-10-30 17:04     ` Arun Isaac
  2 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2016-10-30 16:44 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/networking.scm (nethogs): New variable.
---
 gnu/packages/networking.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index ac88673..d0e0a79 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -991,3 +991,39 @@ the bandwidth, loss, and other parameters.")
                    license:ncsa              ; src/{units,iperf_locale,tcp_window_size}.c
                    license:expat             ; src/{cjson,net}.[ch]
                    license:public-domain)))) ; src/portable_endian.h
+
+(define-public nethogs
+  (package
+    (name "nethogs")
+    (version "0.8.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/raboof/nethogs/archive/v"
+                    version ".tar.gz"))
+              (sha256
+               (base32
+                "1k4x8r7s4dgcb6n2rjn28h2yyij92mwm69phncl3597cdxr954va"))
+              (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libpcap" ,libpcap)
+       ("ncurses" ,ncurses)))
+    (arguments
+     `(#:make-flags `("CC=gcc"
+                      ,(string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure))))
+    (home-page "https://github.com/raboof/nethogs")
+    (synopsis "Per-process bandwidth monitor")
+    (description "NetHogs is a small 'net top' tool for Linux.
+Instead of breaking the traffic down per protocol or per subnet, like
+most tools do, it groups bandwidth by process.
+
+NetHogs does not rely on a special kernel module to be loaded.  If
+there's suddenly a lot of network traffic, you can fire up NetHogs and
+immediately see which PID is causing this.  This makes it easy to
+identify programs that have gone wild and are suddenly taking up your
+bandwidth.")
+    (license license:gpl2+)))
-- 
2.10.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30 16:44   ` Arun Isaac
@ 2016-10-30 17:04     ` Arun Isaac
  2016-10-30 17:09       ` Leo Famulari
  0 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2016-10-30 17:04 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 629 bytes --]


> +    (arguments
> +     `(#:make-flags `("CC=gcc"
> +                      ,(string-append "PREFIX=" %output))
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure))))

I haven't moved the binary to /bin yet. If we can come to some consensus
on that, I'll make that change as well.

> +    (synopsis "Per-process bandwidth monitor")
> +    (description "NetHogs is a small 'net top' tool for Linux.
> +Instead of breaking the traffic down per protocol or per subnet, like
> +most tools do, it groups bandwidth by process.

I've updated the synopsis and description as discussed earlier.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30 17:04     ` Arun Isaac
@ 2016-10-30 17:09       ` Leo Famulari
  2016-10-30 17:46         ` Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2016-10-30 17:09 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On Sun, Oct 30, 2016 at 10:34:54PM +0530, Arun Isaac wrote:
> 
> > +    (arguments
> > +     `(#:make-flags `("CC=gcc"
> > +                      ,(string-append "PREFIX=" %output))
> > +       #:phases
> > +       (modify-phases %standard-phases
> > +         (delete 'configure))))
> 
> I haven't moved the binary to /bin yet. If we can come to some consensus
> on that, I'll make that change as well.

We typically package what the upstream maintainers offer, and only make
changes in order to fix bugs or to adapt the software to the functional
packaging paradigm. In this case, I don't see a reason to change the
directory the software is installed to. Is there a reason to change it?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30 17:09       ` Leo Famulari
@ 2016-10-30 17:46         ` Arun Isaac
  2016-10-30 19:41           ` Leo Famulari
  0 siblings, 1 reply; 10+ messages in thread
From: Arun Isaac @ 2016-10-30 17:46 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]


> We typically package what the upstream maintainers offer, and only make
> changes in order to fix bugs or to adapt the software to the functional
> packaging paradigm. In this case, I don't see a reason to change the
> directory the software is installed to. Is there a reason to change it?

/sbin is for programs that need superuser privileges. nethogs does need
superuser privileges. So, I don't think we should move it to /bin.

If everything else is fine, please consider the patch for inclusion into
Guix.

Thanks.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30 17:46         ` Arun Isaac
@ 2016-10-30 19:41           ` Leo Famulari
  2016-10-31  6:00             ` Arun Isaac
  0 siblings, 1 reply; 10+ messages in thread
From: Leo Famulari @ 2016-10-30 19:41 UTC (permalink / raw)
  To: Arun Isaac; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

On Sun, Oct 30, 2016 at 11:16:55PM +0530, Arun Isaac wrote:
> 
> > We typically package what the upstream maintainers offer, and only make
> > changes in order to fix bugs or to adapt the software to the functional
> > packaging paradigm. In this case, I don't see a reason to change the
> > directory the software is installed to. Is there a reason to change it?
> 
> /sbin is for programs that need superuser privileges. nethogs does need
> superuser privileges. So, I don't think we should move it to /bin.
> 
> If everything else is fine, please consider the patch for inclusion into
> Guix.

Okay, pushed! This is another package I can now install from Guix
instead of my host distro :)

Thank you!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gnu: Add nethogs.
  2016-10-30 19:41           ` Leo Famulari
@ 2016-10-31  6:00             ` Arun Isaac
  0 siblings, 0 replies; 10+ messages in thread
From: Arun Isaac @ 2016-10-31  6:00 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]


> Okay, pushed!

Thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-10-31  6:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-30  7:16 [PATCH] gnu: Add nethogs Arun Isaac
2016-10-30  7:26 ` Arun Isaac
2016-10-30 12:18   ` Marius Bakke
2016-10-30 13:40   ` Alex Kost
2016-10-30 16:44   ` Arun Isaac
2016-10-30 17:04     ` Arun Isaac
2016-10-30 17:09       ` Leo Famulari
2016-10-30 17:46         ` Arun Isaac
2016-10-30 19:41           ` Leo Famulari
2016-10-31  6:00             ` Arun Isaac

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.