Package Details: netatop 3.1-1

Git Clone URL: (read-only, click to copy)
Package Base: netatop
Description: Atop network kernel module, enables network statistics in atop
Upstream URL:
Keywords: atop kernel module netatop
Licenses: GPL
Groups: modules
Submitter: Spider.007
Maintainer: Spider.007
Last Packager: Spider.007
Votes: 25
Popularity: 0.003026
First Submitted: 2013-02-16 11:58
Last Updated: 2020-05-30 09:43

Latest Comments

1 2 3 4 5 Next › Last »

valandil commented on 2020-04-27 13:18

I have submitted a patch to upstream by building on eggz' work, and my own grep fu :)

This time, it is related to a change in the timespec struct in the kernel, and a move to proc_ops from filesystem_operations. See commits 22b17db4ea05561c7c8e4d770f10751e22e339f9 and d56c0d45f0e27f814e87a1676b6bdccccbc252e9 of the kernel repo.

Here's the patch:

diff -aur src.pristine/netatop-3.0/module/netatop.c
--- src.pristine/netatop-3.0/module/netatop.c   2020-04-27 08:28:05.649361867 -0400
+++    2020-04-27 09:00:29.473109963 -0400
@@ -270,7 +270,12 @@

 static struct task_struct  *knetatop_task;

-static struct timespec boottime;
+               static struct timespec64    boottime;
+               static struct timespec  boottime;

 ** function prototypes
@@ -346,14 +351,22 @@
         .owner          = THIS_MODULE,

+static struct proc_ops netatop_proc_fops = {
+   .proc_open          = netatop_open,
+   .proc_read          = seq_read,
+   .proc_lseek         = seq_lseek,
+   .proc_release       = single_release,
 static struct file_operations netatop_proc_fops = {
-   .open           = netatop_open,
-   .read           = seq_read,
-   .llseek         = seq_lseek,
-   .release    = single_release,
-   .owner          = THIS_MODULE,
+   .open           = netatop_open,
+   .read           = seq_read,
+   .llseek         = seq_lseek,
+   .proc_release   = single_release,
+   .owner                  = THIS_MODULE

 ** hook function to be called for every incoming local packet
@@ -1745,7 +1758,11 @@

-   getboottime(&boottime);
+       getboottime64(&boottime);
+   #else
+       getboottime(&boottime);
+   #endif

    ** register getsockopt for user space communication

frankspace commented on 2020-04-25 19:54

FYI, eggz provided some amendments to prepare() in the comments for the netatop-dkms package that worked for me.

3ndymion commented on 2020-04-09 22:40

Thanks for reporting. I noticed it too, but I've been very busy. If the developer got your message, it will probably take him some time to find the changes that were made in the kernel again. As long as you mentioned the same things you mentioned here, then he'll probably know what to look for.

frankspace commented on 2020-04-09 15:23

It seems that this is broken again with kernel 5.6. I am not entirely sure why, but it seems to have something to do with getboottime or getboottime64, maybe involving changes in timekeeping.h or "struct timespc"... but to be honest, I'm nowhere near clever enough to figure out exactly what changed.

Edit: I have sent a message to the maintainer.

Spider.007 commented on 2020-03-04 17:58

@bartus why are you flagging this package out of date?

3ndymion commented on 2020-03-03 15:43

Please Note: The maintainer of netatop on the atop website has responded to me. Netatop v3.0 is now available. I already tested it with this makepkg, & it works perfectly fine now. He also added a SystemD service file which I have not looked into yet.

Please test it all & see. This should be able to be implemented without any patches now.

bartus commented on 2020-02-28 14:56

Patch for kernel>=5.5

git am < <(curl -s

valandil commented on 2020-02-25 02:06


I also did a bit of digging, and it seems that the real_start_time was renamed to start_boottime in v5.5.0 of the kernel. You can verify that either by running

git diff v5.4.15-arch1:include/linux/sched.h v5.5-arch1:include/linux/sched.h

on the Arch linux kernel repo, or just check the change on the kernel repo itself:

Here are some links to a fixed PKGBUILD with a patch.

Contents of PKGBUILD:

Contents of the patch:


3ndymion commented on 2020-02-13 20:03

Oh, that would certainly make it much easier. Thanks for that.

frankspace commented on 2020-02-13 03:05

3ndymion, that's nice detective work, but there's a vastly easier way to implement the "real_start_time" to "start_time" fix. Just add the following line to build() before invoking make:

sed -ri 's|real_start_time|start_time|g' module/netatop.c

And that'll handle the editing without needing to tamper with the source tarball.