AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1414940

Marco Ferrara's questions

Martin Hope
Marco Ferrara
Asked: 2025-02-27 19:33:07 +0800 CST

Ubuntu 24 - Auditd 未释放 SReclaimable

  • 5

我正在尝试将我的 jumphost 从 Ubutnu 20.04 升级到 Ubuntu 24.04.2 LTS,并启用审核。

这是我的会议:

$ cat /etc/audit/rules.d/000.audit.rules
-D
-b 64
-r 1000
-f 1

# Logging All user commands
-a always,exit -F arch=b64 -S execve -F auid>=1000 -F auid!=4294967295 -k user_commands
-a always,exit -F arch=b32 -S execve -F auid>=1000 -F auid!=4294967295 -k user_commands

...

但是当用户登录系统(40-70 个用户)时,我注意到系统会消耗所有 RAM,因为 RAM 的使用是内核缓冲区,这是由于速率限制而使用的,这会导致系统性能下降直至冻结

$ grep -E 'Slab|SReclaimable|SUnreclaim' /proc/meminfo && free -m
Slab:            2690568 kB
SReclaimable:      14672 kB
SUnreclaim:      2675896 kB
               total        used        free      shared  buff/cache   available
Mem:            2972        2961          70           0          56          10
Swap:           4521         467        4054

这在 Ubuntu 20 中不会发生。
有什么想法可以解决它吗?

感谢您的帮助。

kernel
  • 1 个回答
  • 41 Views
Martin Hope
Marco Ferrara
Asked: 2023-11-13 19:35:06 +0800 CST

Ubuntu 22.04无法正确设置ipv6地址

  • 5

我正在尝试配置一台具有两个网络的 Ubuntu 22.04 服务器,一个具有 ipv4,一个具有 ipv6(双堆栈)。

这是我的/etc/network/interfaces(我文件中的ipv6地址是正确的,这里我替换了)

# The loopback network interface
auto lo
iface lo inet loopback

auto be0
iface be0 inet static
  address 10.0.100.138
  netmask 255.255.255.192
  network 10.0.100.128
  broadcast 10.0.100.191
  gateway 10.0.100.129

  post-up ip route flush cache
  post-down ip route flush cache
  post-up sleep 10s && ping -q -c 60 10.0.100.129 > /dev/null 2>&1 || true &

iface be0 inet6 static
  pre-up modprobe ipv6
  address 0x00:x00:000:0000::4
  netmask 64

  post-up ip -6 route add table be default via 0x00:x00:000:0000::1 dev be0
  post-up ip -6 route add table be 0x00:x00:000:0000::/64 dev be0 proto kernel scope link src 0x00:x00:000:0000::4
  post-up ip -6 rule add prio 10 from 0x00:x00:000:0000::4 lookup be
  pre-down ip -6 rule del from 0x00:x00:000:0000::4 lookup be
  pre-up ip -6 route flush table be
  post-up ip -6 route flush cache
  post-down ip -6 route flush cache

auto mgmt0
iface mgmt0 inet static
  address 10.0.100.44
  netmask 255.255.255.192
  network 10.0.100.0
  broadcast 10.0.100.63

  post-up ip route add table mgmt default via 10.0.100.1 dev mgmt0
  post-up ip route add table mgmt 10.0.100.0/26 dev mgmt0 proto kernel scope link src 10.0.100.44
  post-up ip rule add prio 20 from 10.0.100.44 lookup mgmt
  pre-down ip rule del from 10.0.100.44 lookup mgmt
  pre-up ip rule add prio 10000 to 10.245.253.29 lookup mgmt
  pre-down ip rule del to 10.245.253.29 lookup mgmt
  pre-up ip route flush table mgmt || /bin/true

  post-up ip route flush cache
  post-down ip route flush cache
  post-up sleep 10s && ping -q -c 60 10.0.100.1 > /dev/null 2>&1 || true &

但networking.service返回此错误:

# systemctl status networking.service
× networking.service - Raise network interfaces
     Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2023-11-13 10:54:09 GMT; 2min 57s ago
       Docs: man:interfaces(5)
    Process: 499 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
   Main PID: 499 (code=exited, status=1/FAILURE)
        CPU: 142ms

Nov 13 10:54:09 test-jammyv6 systemd[1]: Starting Raise network interfaces...
Nov 13 10:54:09 test-jammyv6 ifup[574]: RTNETLINK answers: File exists
Nov 13 10:54:09 test-jammyv6 ifup[499]: ifup: failed to bring up be0
Nov 13 10:54:09 test-jammyv6 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 10:54:09 test-jammyv6 systemd[1]: networking.service: Failed with result 'exit-code'.
Nov 13 10:54:09 test-jammyv6 systemd[1]: Failed to start Raise network interfaces.

我可以用命令修复它:

root@test-jammyv6:~# systemctl status networking.service
× networking.service - Raise network interfaces
     Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2023-11-13 11:00:56 GMT; 35s ago
       Docs: man:interfaces(5)
    Process: 522 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
   Main PID: 522 (code=exited, status=1/FAILURE)
        CPU: 136ms

Nov 13 11:00:56 test-jammyv6 systemd[1]: Starting Raise network interfaces...
Nov 13 11:00:56 test-jammyv6 ifup[573]: RTNETLINK answers: File exists
Nov 13 11:00:56 test-jammyv6 ifup[522]: ifup: failed to bring up be0
Nov 13 11:00:56 test-jammyv6 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Nov 13 11:00:56 test-jammyv6 systemd[1]: networking.service: Failed with result 'exit-code'.
Nov 13 11:00:56 test-jammyv6 systemd[1]: Failed to start Raise network interfaces.
root@test-jammyv6:~# modprobe ipv6
root@test-jammyv6:~# ip -6 route add table be default via 0x00:x00:000:0000::1 dev be0
RTNETLINK answers: No route to host
root@test-jammyv6:~# ip -6 route add  default via 0x00:x00:000:0000::1 dev be0
RTNETLINK answers: No route to host
root@test-jammyv6:~# service networking restart
Job for networking.service failed because the control process exited with error code.
See "systemctl status networking.service" and "journalctl -xeu networking.service" for details.
root@test-jammyv6:~# ip addr flush dev be0
root@test-jammyv6:~# service networking restart
root@test-jammyv6:~# systemctl status networking.service
● networking.service - Raise network interfaces
     Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
     Active: active (exited) since Mon 2023-11-13 11:02:07 GMT; 2s ago
       Docs: man:interfaces(5)
    Process: 1035 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
   Main PID: 1035 (code=exited, status=0/SUCCESS)
      Tasks: 2 (limit: 9440)
     Memory: 688.0K
        CPU: 430ms
     CGroup: /system.slice/networking.service
             ├─1050 /bin/sh -c "sleep 10s && ping -q -c 60 10.0.100.129 > /dev/null 2>&1 || true &"
             └─1052 sleep 10s

Nov 13 11:02:05 test-jammyv6 systemd[1]: Starting Raise network interfaces...
Nov 13 11:02:07 test-jammyv6 ifup[1097]: Waiting for DAD... Done
Nov 13 11:02:07 test-jammyv6 systemd[1]: Finished Raise network interfaces.

如何修复它并在每次重新启动时进行正确的配置?

22.04
  • 1 个回答
  • 95 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve