所以,我需要运行这个命令:
vnstat -tr
但是作为我刚刚创建的用户,不是 root,作为 root 它工作正常,但作为普通用户我得到这个:
Error: Unable to get interface "eth0" statistics.
Error: Interface "eth0" not available, exiting.
操作系统:Debian Linux 6.0.6
最佳答案
问题是 grsecurity 锁定/proc/net/dev 以防止用户查看它。解决方案是将 ovhs linux 核心从 3.10.X 降级到 3.8.13。
关于linux - 除非在 debian 中以 root 身份运行,否则无法运行 vnstat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18447757/