我在Ubuntu桌面20.04上,我在virtualbox中运行一个web服务器,在b/c上,我通过一个定制的systemd服务文件启动VM。
问题:
由于我不知道的原因,vboc正在占用我的所有系统内存,方法是启动多个相同进程的副本,如下所示:

这是启动virtualbox的systemd配置:
/etc/systemd/system/VminRoot2.service
[Unit]
Description=Vmin-Vbox
After=network.target virtualbox.service
Before=runlevel2.target shutdown.target
[Service]
ExecStartPre=/bin/sleep 30
User=root
Group=vboxusers
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
ExecStart=/usr/bin/VBoxManage startvm VminRoot2 --type headless
ExecStop=/usr/bin/VBoxManage controlvm VminRoot2 acpipowerbutton
[Install]
WantedBy=multi-user.target这些是我的机器的设置:

有人看到我做错什么了吗?我怎么能让vbox发射..。就一次?
发布于 2022-08-17 13:36:24
事实证明,这并不是Vbox占用内存(这次)。
对于任何想知道在交换内存中运行的进程的简单而直接的方法的人,我建议使用sudo apt-get install smem。
这一点清楚地列出了使用交换的每个进程--这就是我如何能够发现一个为期6个月的对接器实验仍在启动并隐藏在我的交换内存中,因此我无法通过top或htop直接“查看”它的内存。
https://askubuntu.com/questions/1423849
复制相似问题