Skip to the content.

man user@.service

才似乎发现是和

systemctl status user@1000.service
● user@1000.service - User Manager for UID 1000
     Loaded: loaded (/etc/systemd/system/user@.service; static)
    Drop-In: /nix/store/gnb5rm52j3dlxvlqxkzi79j8sjclnpf2-system-units/user@.service.d
             └─overrides.conf
     Active: active (running) since Fri 2024-12-06 17:24:26 CST; 1 week 1 day ago
       Docs: man:user@.service(5)
   Main PID: 6012 (systemd)
     Status: "Ready."
         IP: 12.1G in, 11.1G out
         IO: 185.1G read, 214.6G written
      Tasks: 572
     Memory: 3.0G (peak: 53.2G swap: 418.4M swap peak: 1.0G zswap: 48.0M)
        CPU: 2d 10h 15min 43.382s
     CGroup: /user.slice/user-1000.slice/user@1000.service
             ├─app.slice
             │ ├─app-gnome-.clash\x2dverge\x2dwrapped-7035.scope
             │ │ ├─7035 /nix/store/d684ggnsqsvqb9w0nzcxa7dr74l13ax6-clash-verge-rev-1.6.2/bin/.clash-verge-wrapped
             │ │ └─7557 /nix/store/d684ggnsqsvqb9w0nzcxa7dr74l13ax6-clash-verge-rev-1.6.2/bin/clash-meta -d /home/martins3/.local/share/io.github.clash-verge-rev.cla>
             │ ├─app-gnome-org.flameshot.Flameshot-7042.scope
             │ │ └─7042 /nix/store/jhgn4yn6aqzbhjyrz6f859nypg63yj5l-flameshot-12.1.0/bin/flameshot
             │ ├─app-gnome-org.gnome.Evolution\x2dalarm\x2dnotify-7020.scope
             │ │ └─7020 /nix/store/xh037cd8xqch4i613ix9axp87bc0irjw-evolution-data-server-3.52.2/libexec/evolution-data-server/evolution-alarm-notify
             │ ├─app-gnome-org.gnome.Settings-7833.scope
             │ │ └─7833 /nix/store/fksps290bii8xlgvqdhxfadhiprzhykn-gnome-control-center-46.2/bin/gnome-control-center
             │ ├─app-gnome-org.gnome.SettingsDaemon.DiskUtilityNotify-7029.scope
             │ │ └─7029 /nix/store/7im5as3mn2p4dd829w7ghzd0m7q63gqn-gnome-disk-utility-46.0/libexec/gsd-disk-utility-notify
             │ ├─app-gnome\x2dsession\x2dmanager.slice
             │ │ └─gnome-session-manager@gnome.service
             │ │   └─6722 /nix/store/mjyjq8l75l4f33hkidyvz4cmgs6837yj-gnome-session-46.0/libexec/gnome-session-binary --systemd-service --session=gnome
             │ ├─dconf.service
             │ │ └─7373 /nix/store/wv07mkwb06kbms7y20kcg174scg9gacl-dconf-0.40.0-lib/libexec/dconf-service
             │ ├─evolution-addressbook-factory.service
             │ │ └─7282 /nix/store/0kz7b940jfqg4lrz7ys5xq0a57pixpgg-evolution-with-plugins/libexec/evolution-addressbook-factory
             │ ├─evolution-calendar-factory.service
             │ │ └─7239 /nix/store/0kz7b940jfqg4lrz7ys5xq0a57pixpgg-evolution-with-plugins/libexec/evolution-calendar-factory
             │ ├─evolution-source-registry.service
             │ │ └─6967 /nix/store/0kz7b940jfqg4lrz7ys5xq0a57pixpgg-evolution-with-plugins/libexec/evolution-source-registry
             │ ├─gnome-session-monitor.service
             │ │ └─6720 /nix/store/mnw9x97syps5w8fyq5298pfa0kw7bdny-gnome-session-ctl-42.0/libexec/gnome-session-ctl --monitor
             │ ├─obex.service
             │ │ └─7745 /nix/store/fn9nwj3ykfmdc46w12l7kjyk17cafypl-bluez-5.75/libexec/bluetooth/obexd

在非图形的地方中:

[root@bogon ~]# sudo systemctl status user@1000.service
○ user@1000.service - User Manager for UID 1000
     Loaded: loaded (/usr/lib/systemd/system/user@.service; static)
     Active: inactive (dead)
       Docs: man:user@.service(5)

nixos 物理机 systemd-cgls

CGroup /:
-.slice
├─user.slice
│ └─user-1000.slice
│   ├─session-33.scope
│   │ ├─761167 sshd: martins3 [priv]…
│   │ ├─761170 sshd: martins3@pts/0…
│   │ ├─761175 -zsh
│   │ └─945578 tmux attach
│   ├─user@1000.service …
│   │ ├─session.slice
│   │ │ ├─gvfs-goa-volume-monitor.service
│   │ │ │ └─7266 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ ├─org.gnome.SettingsDaemon.MediaKeys.service
│   │ │ │ └─7018 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.Smartcard.service
│   │ │ │ └─7033 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─xdg-permission-store.service
│   │ │ │ └─6952 /nix/store/yhf8h0pqdabwpl4gjg66bnj7j7bprylq-xdg-desktop-portal…
│   │ │ ├─org.gnome.SettingsDaemon.Datetime.service
│   │ │ │ └─7012 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─xdg-document-portal.service
│   │ │ │ ├─7337 /nix/store/yhf8h0pqdabwpl4gjg66bnj7j7bprylq-xdg-desktop-portal…
│   │ │ │ └─7343 fusermount3 -o rw,nosuid,nodev,fsname=portal,auto_unmount,subt…
│   │ │ ├─org.gnome.SettingsDaemon.Housekeeping.service
│   │ │ │ └─7013 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.Shell@x11.service
│   │ │ │ ├─6747 /nix/store/0zkhsckqyp4x5sxx16jkviv65nc5bfvh-gnome-shell-46.2/b…
│   │ │ │ └─6920 /nix/store/94mvh28l8k5n0310ydyr27x4dh4ypydr-mutter-46.2/libexe…
│   │ │ ├─xdg-desktop-portal.service
│   │ │ │ └─7331 /nix/store/yhf8h0pqdabwpl4gjg66bnj7j7bprylq-xdg-desktop-portal…
│   │ │ ├─org.freedesktop.IBus.session.GNOME.service
│   │ │ │ ├─7009 /nix/store/d0g99nc9phqrc6f1gh4m2fvra3zr483r-ibus-with-plugins-…
│   │ │ │ ├─7153 /nix/store/7v7nh0clnm6jql90nfvfgf21d9rizqi4-ibus-1.5.30/libexe…
│   │ │ │ ├─7156 /nix/store/7v7nh0clnm6jql90nfvfgf21d9rizqi4-ibus-1.5.30/libexe…
│   │ │ │ ├─7161 /nix/store/7v7nh0clnm6jql90nfvfgf21d9rizqi4-ibus-1.5.30/libexe…
│   │ │ │ └─7369 /nix/store/ji882zq8h460jg3dwlbscs3pyz0f87h3-ibus-rime-1.5.0/li…
│   │ │ ├─org.gnome.SettingsDaemon.Keyboard.service
│   │ │ │ └─7016 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.A11ySettings.service
│   │ │ │ └─7010 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─wireplumber.service
│   │ │ │ └─7418 /nix/store/axs6l8c6m1bgpfai6xzyi4mvnr8v9j1h-wireplumber-0.5.3/…
│   │ │ ├─pulseaudio.service
│   │ │ │ ├─7199 /nix/store/qa3klkj06l058y25i633f00gz400abh0-pulseaudio-17.0/bi…
│   │ │ │ └─7312 /nix/store/qa3klkj06l058y25i633f00gz400abh0-pulseaudio-17.0/li…
│   │ │ ├─org.gnome.SettingsDaemon.Wacom.service
│   │ │ │ └─7047 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─gvfs-daemon.service
│   │ │ │ ├─6756 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ │ ├─6762 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ │ └─7688 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ ├─gvfs-udisks2-volume-monitor.service
│   │ │ │ └─7134 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ ├─org.gnome.SettingsDaemon.Sharing.service
│   │ │ │ └─7032 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.Color.service
│   │ │ │ └─7011 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.ScreensaverProxy.service
│   │ │ │ └─7027 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.PrintNotifications.service
│   │ │ │ ├─7021 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ │ └─7125 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.Power.service
│   │ │ │ └─7019 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─org.gnome.SettingsDaemon.XSettings.service
│   │ │ │ └─7054 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─gvfs-gphoto2-volume-monitor.service
│   │ │ │ └─7261 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ ├─at-spi-dbus-bus.service
│   │ │ │ ├─6704 /nix/store/z527597piwq968khicibhr0pfbgmpka0-at-spi2-core-2.52.…
│   │ │ │ ├─6710 /run/current-system/sw/bin/dbus-daemon --config-file=/nix/stor…
│   │ │ │ └─6925 /nix/store/z527597piwq968khicibhr0pfbgmpka0-at-spi2-core-2.52.…
│   │ │ ├─org.gnome.SettingsDaemon.UsbProtection.service
│   │ │ │ └─7041 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─gvfs-metadata.service
│   │ │ │ └─7399 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ ├─org.gnome.SettingsDaemon.Sound.service
│   │ │ │ └─7038 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─pipewire.service
│   │ │ │ └─7411 /nix/store/l9q4ri0p2avwih9b2wis7sa2hma3cqgm-pipewire-1.0.9/bin…
│   │ │ ├─dbus.service
│   │ │ │ ├─6225 /nix/store/4nyqjyfzdfp87z5illnm6jz6jw95w6ka-dbus-1.14.10/bin/d…
│   │ │ │ ├─6954 /nix/store/0zkhsckqyp4x5sxx16jkviv65nc5bfvh-gnome-shell-46.2/l…
│   │ │ │ ├─6979 /nix/store/ffy45hi6fwps8l3fdsz3fc2hinbdp568-gjs-1.80.2/bin/gjs…
│   │ │ │ ├─7142 /nix/store/ffy45hi6fwps8l3fdsz3fc2hinbdp568-gjs-1.80.2/bin/gjs…
│   │ │ │ ├─7167 /nix/store/7v7nh0clnm6jql90nfvfgf21d9rizqi4-ibus-1.5.30/libexe…
│   │ │ │ ├─7210 /nix/store/lkr3gbr1v1lvvbvbq8zbisrl7p367gwg-gnome-online-accou…
│   │ │ │ ├─7232 /nix/store/lkr3gbr1v1lvvbvbq8zbisrl7p367gwg-gnome-online-accou…
│   │ │ │ ├─7641 /nix/store/n3ba7kkgcbqrjc27yf21r81gnszd2w80-gnome-calendar-46.…
│   │ │ │ ├─7779 gpg-agent --homedir /home/martins3/.gnupg --use-standard-socke…
│   │ │ │ └─7781 scdaemon --multi-server
│   │ │ ├─org.gnome.SettingsDaemon.Rfkill.service
│   │ │ │ └─7022 /nix/store/xyc5yw3k1bsq6s2spshb8wcyfb1qkx2i-gnome-settings-dae…
│   │ │ ├─gvfs-mtp-volume-monitor.service
│   │ │ │ └─7273 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ │ └─gvfs-afc-volume-monitor.service
│   │ │   └─7292 /nix/store/8fpnjsd1dldaq35a5h39nww4ssl63vx4-gvfs-1.54.2/libexe…
│   │ ├─background.slice
│   │ │ └─tracker-miner-fs-3.service
│   │ │   ├─   7806 /nix/store/janz2hf90kgd9pv03b8qhd2bd6b5nbdz-tracker-miners-…
│   │ │   └─1262899 /nix/store/janz2hf90kgd9pv03b8qhd2bd6b5nbdz-tracker-miners-…
│   │ ├─user.slice
│   │ │ └─podman-pause-b71cc91e.scope
│   │ │   └─1190613 /run/current-system/sw/bin/podman
│   │ ├─app.slice
│   │ │ ├─app-gnome-org.gnome.SettingsDaemon.DiskUtilityNotify-7029.scope
│   │ │ │ └─7029 /nix/store/7im5as3mn2p4dd829w7ghzd0m7q63gqn-gnome-disk-utility…
│   │ │ ├─app-gnome-org.gnome.Evolution\x2dalarm\x2dnotify-7020.scope
│   │ │ │ └─7020 /nix/store/xh037cd8xqch4i613ix9axp87bc0irjw-evolution-data-ser…
│   │ │ ├─app-gnome-org.flameshot.Flameshot-7042.scope
│   │ │ │ └─7042 /nix/store/jhgn4yn6aqzbhjyrz6f859nypg63yj5l-flameshot-12.1.0/b…
│   │ │ ├─evolution-calendar-factory.service
│   │ │ │ └─7239 /nix/store/0kz7b940jfqg4lrz7ys5xq0a57pixpgg-evolution-with-plu…
│   │ │ ├─pueued.service
│   │ │ │ ├─   6233 /nix/store/m537j6q4wdma5d0qsx1b6md8w3fy8x7f-pueue-3.4.0/bin…
│   │ │ │ ├─   9834 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─   9870 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─  48917 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─  48950 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─  83950 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─  83967 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─ 776330 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─ 776361 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─ 924504 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─ 924519 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─ 941938 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─ 941953 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─ 989935 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─ 989968 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1252333 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─1252366 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1255084 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1259616 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1259617 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1259618 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1259619 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1259620 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─1259621 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─2364639 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─2364674 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─3823137 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ ├─3823150 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ │ ├─4068877 /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin…
│   │ │ │ └─4068892 /nix/store/vvhd7zgrvvfb6576fws25q3bbaqcanba-python3-3.11.10…
│   │ │ ├─xdg-desktop-portal-gnome.service
│   │ │ │ └─7351 /nix/store/n90ks1w2zkc51j8b2053x84m4zv37673-xdg-desktop-portal…
│   │ │ ├─dconf.service
│   │ │ │ └─7373 /nix/store/wv07mkwb06kbms7y20kcg174scg9gacl-dconf-0.40.0-lib/l…
│   │ │ ├─app-gnome\x2dsession\x2dmanager.slice
│   │ │ │ └─gnome-session-manager@gnome.service
│   │ │ │   └─6722 /nix/store/mjyjq8l75l4f33hkidyvz4cmgs6837yj-gnome-session-46…
│   │ │ ├─evolution-source-registry.service
│   │ │ │ └─6967 /nix/store/0kz7b940jfqg4lrz7ys5xq0a57pixpgg-evolution-with-plu…
│   │ │ ├─gnome-session-monitor.service
│   │ │ │ └─6720 /nix/store/mnw9x97syps5w8fyq5298pfa0kw7bdny-gnome-session-ctl-…
│   │ │ ├─xdg-desktop-portal-gtk.service
│   │ │ │ └─7433 /nix/store/ciiik043d2cc55ra69w20054c93g7ch5-xdg-desktop-portal…
│   │ │ ├─obex.service
│   │ │ │ └─7745 /nix/store/fn9nwj3ykfmdc46w12l7kjyk17cafypl-bluez-5.75/libexec…
│   │ │ ├─evolution-addressbook-factory.service
│   │ │ │ └─7282 /nix/store/0kz7b940jfqg4lrz7ys5xq0a57pixpgg-evolution-with-plu…
│   │ │ ├─app-gnome-org.gnome.Settings-7833.scope
│   │ │ │ └─7833 /nix/store/fksps290bii8xlgvqdhxfadhiprzhykn-gnome-control-cent…
│   │ │ └─app-gnome-.clash\x2dverge\x2dwrapped-7035.scope
│   │ │   ├─7035 /nix/store/d684ggnsqsvqb9w0nzcxa7dr74l13ax6-clash-verge-rev-1.…
│   │ │   └─7557 /nix/store/d684ggnsqsvqb9w0nzcxa7dr74l13ax6-clash-verge-rev-1.…
│   │ └─init.scope
│   │   ├─6012 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/sy…
│   │   └─6028 (sd-pam)
│   ├─session-2.scope
│   │ ├─  4740 gdm-session-worker [pam/gdm-password]
│   │ ├─  6254 /nix/store/l9y56l7jvsmwwpfrsa946syi08a1fij9-gnome-keyring-46.2/b…
│   │ ├─  6402 /nix/store/clh6a71fly2w5sjsw3178zl1ksy1p0ff-gdm-46.2/libexec/gdm…
│   │ ├─  6419 /nix/store/91ajyh6rj3bqva9xwfi4742810w2l99l-xorg-server-21.1.14/…
│   │ ├─  6654 /nix/store/mjyjq8l75l4f33hkidyvz4cmgs6837yj-gnome-session-46.0/l…
│   │ └─119204 /nix/store/bbvgda8yasx63f2l87m7jgc6h9rw3k4j-openssh-9.7p1/bin/ss…
│   └─session-12.scope
│     ├─ 775884 -zsh
│     ├─1176866 tmux
│     ├─1245479 -zsh
│     ├─1246065 /nix/store/dbs8qsz808swc85x2dvzw9jfsm694kjh-neovim-unwrapped-0.…
│     ├─1246067 /nix/store/dbs8qsz808swc85x2dvzw9jfsm694kjh-neovim-unwrapped-0.…
│     ├─1246071 node /home/martins3/.npm-packages/bin/bash-language-server star…
│     ├─1246072 /home/martins3/.nix-profile/bin/efm-langserver
│     ├─1249037 /run/current-system/sw/bin/zsh
│     ├─1249154 bash /home/martins3/core/vn/code/qemu/alpine-action.sh -a run -…
│     ├─1249186 bash /home/martins3/core/vn/code/qemu/alpine.sh
│     ├─1249292 /home/martins3/core/qemu/build/qemu-system-x86_64 -device virti…
│     ├─1250287 -zsh
│     ├─1250576 /nix/store/xf07vm6zr47db4akdjvxpm846mvz1wwq-marksman-2023-12-09…
│     ├─1251988 -zsh
│     ├─1252098 bash /home/martins3/core/vn/code/qemu/alpine-action.sh -a run -…
│     ├─1252136 bash /home/martins3/core/vn/code/qemu/alpine.sh
│     ├─1252386 /home/martins3/core/qemu/build/qemu-system-x86_64 -device virti…
│     ├─1254504 -zsh
│     ├─1255725 -zsh
│     ├─1255839 bash /home/martins3/core/vn/code/qemu/alpine-action.sh -a ssh -…
│     ├─1255875 ssh -p4101 martins3@localhost
│     ├─1255878 -zsh
│     ├─1256119 -zsh
│     ├─1256258 /nix/store/dbs8qsz808swc85x2dvzw9jfsm694kjh-neovim-unwrapped-0.…
│     ├─1256260 /nix/store/dbs8qsz808swc85x2dvzw9jfsm694kjh-neovim-unwrapped-0.…
│     ├─1256264 node /home/martins3/.npm-packages/bin/bash-language-server star…
│     ├─1256265 /home/martins3/.nix-profile/bin/efm-langserver
│     ├─1256387 /nix/store/xf07vm6zr47db4akdjvxpm846mvz1wwq-marksman-2023-12-09…
│     ├─1257914 /run/current-system/sw/bin/zsh
│     ├─1258979 bash /home/martins3/core/vn/code/qemu/alpine-action.sh -a run -…
│     ├─1259013 bash /home/martins3/core/vn/code/qemu/alpine.sh
│     ├─1259108 /home/martins3/core/qemu/build/qemu-system-x86_64 -device virti…
│     ├─1260091 -zsh
│     ├─1260205 bash /home/martins3/core/vn/code/qemu/alpine-action.sh -a ssh -…
│     ├─1260241 ssh -p4063 root@localhost
│     ├─1260856 -zsh
│     ├─1260975 /home/martins3/.nix-profile/bin/man user@.service
│     ├─1260984 less
│     ├─1262880 -zsh
│     └─1263068 systemd-cgls
├─init.scope
│ └─1 /run/current-system/systemd/lib/systemd/systemd
└─system.slice
  ├─systemd-udevd.service …
  │ └─udev
  │   └─989 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/syste…
  ├─nfs-mountd.service
  │ └─3381 /nix/store/vvw8viv74yh5q8zli278f3gq2qwrn67p-nfs-utils-2.6.2/bin/rpc.…
  ├─docker.service …
  │ ├─3316 /nix/store/4iri0mdrz18jzl6wg3m1gnf13pyqkr8w-moby-25.0.6/libexec/dock…
  │ └─3477 containerd --config /var/run/docker/containerd/containerd.toml
  ├─polkit.service
  │ └─1802 /nix/store/yiyywcz8ffpvr7bw5jgnxycxza178835-polkit-124/lib/polkit-1/…
  ├─rtkit-daemon.service
  │ └─3122 /nix/store/vy6jmf6qgk8w617fs4d4f1h97nc76yw3-rtkit-0.13/libexec/rtkit…
  ├─bluetooth.service
  │ └─1528 /nix/store/fn9nwj3ykfmdc46w12l7kjyk17cafypl-bluez-5.75/libexec/bluet…
  ├─accounts-daemon.service
  │ └─1632 /nix/store/bba627hq9pab8jcf92x78d4b04js14g6-accountsservice-23.13.9/…
  ├─nfsdcld.service
  │ └─1494 /nix/store/vvw8viv74yh5q8zli278f3gq2qwrn67p-nfs-utils-2.6.2/bin/nfsd…
  ├─wpa_supplicant.service
  │ └─2116 /nix/store/rfvilg2719kfjy6mz9lrbfmw2x887amv-wpa_supplicant-2.10/sbin…
  ├─ModemManager.service
  │ └─3415 /nix/store/phc0v3xa6i5ajysl9db3z2dki80y4ny4-modemmanager-1.22.0/sbin…
  ├─systemd-journald.service
  │ └─914 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/systemd…
  ├─power-profiles-daemon.service
  │ └─3130 /nix/store/6vh4v08y6hi4121dmb7bd8lz3nr462pf-power-profiles-daemon-0.…
  ├─sshd.service
  │ └─2173 sshd: /nix/store/bbvgda8yasx63f2l87m7jgc6h9rw3k4j-openssh-9.7p1/bin/…
  ├─display-manager.service
  │ └─2208 /nix/store/clh6a71fly2w5sjsw3178zl1ksy1p0ff-gdm-46.2/bin/gdm
  ├─nix-daemon.service
  │ └─96554 nix-daemon --daemon
  ├─colord.service
  │ └─2880 /nix/store/sm36r3jpf3v74l4kn0avj0c9qbc9436g-colord-1.4.6/libexec/col…
  ├─samba-smbd.service
  │ ├─  4169 /nix/store/mcyfbsbxr2hjr53v2yyvqnsnlg894xk2-samba-4.20.1/sbin/smbd…
  │ ├─  4229 smbd: notifyd                                                     …
  │ ├─  4231 smbd: cleanupd                                                    …
  │ └─760872 smbd: client [10.0.0.8]                                           …
  ├─NetworkManager.service
  │ └─1672 /nix/store/7pw06gmwp7fjr0qp3y6556izpxgcmpb2-networkmanager-1.46.2/sb…
  ├─systemd-machined.service
  │ └─1558 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/system…
  ├─rpc-statd.service
  │ └─6915 /nix/store/vvw8viv74yh5q8zli278f3gq2qwrn67p-nfs-utils-2.6.2/bin/rpc.…
  ├─samba-winbindd.service
  │ ├─2159 /nix/store/mcyfbsbxr2hjr53v2yyvqnsnlg894xk2-samba-4.20.1/sbin/winbin…
  │ ├─2277 winbindd: domain child [NIXOS]…
  │ └─4237 winbindd: idmap child…
  ├─rpcbind.service
  │ └─1474 /nix/store/id5hy0z79zagd5cj8b7pv0l552yf4cqi-rpcbind-1.2.6/sbin/rpcbi…
  ├─lldpd.service
  │ ├─2147 /nix/store/bp81qzcbq940bwmqw0kppmg84fr6vnrq-lldpd-1.0.18/sbin/lldpd
  │ └─2188 /nix/store/bp81qzcbq940bwmqw0kppmg84fr6vnrq-lldpd-1.0.18/sbin/lldpd
  ├─nfs-idmapd.service
  │ └─1492 /nix/store/vvw8viv74yh5q8zli278f3gq2qwrn67p-nfs-utils-2.6.2/bin/rpc.…
  ├─nscd.service
  │ └─6895 /nix/store/0m9vwjsc3ryijv9r59zaz10m22nghyxp-nsncd-unstable-2024-01-1…
  ├─upower.service
  │ └─2930 /nix/store/36kklb0x07vnhky8iglba00zsc1yrlsz-upower-1.90.4/libexec/up…
  ├─systemd-oomd.service
  │ └─1476 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/system…
  ├─ovs-vswitchd.service
  │ └─1811 /nix/store/7zszzm6dhlalixyk4dlqyljrl344hhia-openvswitch-2.17.9/bin/o…
  ├─udisks2.service
  │ └─7103 /nix/store/37kyv7d8zl8d6qd5z3b8ms8vkf6k0qsm-udisks-2.10.1/libexec/ud…
  ├─tailscaled.service
  │ └─3328 /nix/store/39bbp4a3r8b1q4fff43cg6n2p46hahis-tailscale-1.76.6/bin/tai…
  ├─samba-nmbd.service
  │ └─2152 /nix/store/mcyfbsbxr2hjr53v2yyvqnsnlg894xk2-samba-4.20.1/sbin/nmbd -…
  ├─ovsdb.service
  │ └─1635 /nix/store/7zszzm6dhlalixyk4dlqyljrl344hhia-openvswitch-2.17.9/bin/o…
  ├─dbus.service
  │ └─1534 /nix/store/4nyqjyfzdfp87z5illnm6jz6jw95w6ka-dbus-1.14.10/bin/dbus-da…
  ├─systemd-timesyncd.service
  │ └─1510 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/system…
  ├─system-getty.slice
  │ └─getty@tty1.service
  │   └─2197 agetty --login-program /nix/store/dazxb0dpc55nkmkyy7i3n9bvrqidfzwj…
  ├─avahi-daemon.service
  │ └─1527 avahi-daemon: running [nixos.local]…
  └─systemd-logind.service
    └─1643 /nix/store/h05qs7dk5i6490ji0f9fndia9q2wwjac-systemd-255.9/lib/system…

没有图形界面的虚拟机中 systemd-cgls

Control group /:
-.slice
├─init.scope
│ └─ 1 /usr/lib/systemd/systemd --switched-root --system --deserialize 16
└─system.slice
  ├─rngd.service
  │ └─ 1228 /sbin/rngd -f
  ├─irqbalance.service
  │ └─ 1224 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
  ├─systemd-udevd.service …
  │ └─udev
  │   └─ 947 /usr/lib/systemd/systemd-udevd
  ├─system-serial\x2dgetty.slice
  │ └─serial-getty@hvc0.service
  │   └─ 1301 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 hvc0…
  ├─polkit.service
  │ └─ 1225 /usr/lib/polkit-1/polkitd --no-debug
  ├─chronyd.service
  │ └─ 1220 /usr/sbin/chronyd
  ├─auditd.service
  │ └─ 1195 /sbin/auditd
  ├─tuned.service
  │ └─ 1285 /usr/bin/python3 -Es /usr/sbin/tuned -l -P
  ├─systemd-journald.service
  │ └─ 916 /usr/lib/systemd/systemd-journald
  ├─sshd.service
  │ ├─ 1282 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
  │ ├─ 1898 sshd: root [priv]
  │ ├─ 1901 sshd: root@pts/0
  │ ├─ 1902 -bash
  │ └─ 1986 systemd-cgls
  ├─crond.service
  │ └─ 1299 /usr/sbin/crond -n
  ├─NetworkManager.service
  │ ├─ 1263 /usr/sbin/NetworkManager --no-daemon
  │ └─ 1558 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/N…
  ├─gssproxy.service
  │ └─ 1287 /usr/sbin/gssproxy -D
  ├─rsyslog.service
  │ └─ 1595 /usr/sbin/rsyslogd -n -i/var/run/rsyslogd.pid
  ├─firewalld.service
  │ └─ 1259 /usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid
  ├─rpcbind.service
  │ └─ 1193 /usr/bin/rpcbind -r -w -f
  ├─restorecond.service
  │ └─ 1229 /usr/sbin/restorecond
  ├─dbus.service
  │ └─ 1216 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfi…
  ├─system-getty.slice
  │ └─getty@tty1.service
  │   └─ 1300 /sbin/agetty -o -p -- \u --noclear tty1 linux
  └─systemd-logind.service
    └─ 1230 /usr/lib/systemd/systemd-logind

无图形界面的虚拟机

CGroup /:
-.slice
├─init.scope
│ └─1 /usr/lib/systemd/systemd --switched-root --system --deserialize=38 nokasl…
└─system.slice
  ├─rngd.service
  │ └─1194 /usr/sbin/rngd -f -O jitter:timeout:10
  ├─irqbalance.service
  │ └─1198 /usr/sbin/irqbalance --hintpolicy=subset --pid=/var/run/irqbalance.p…
  ├─ovsdb-server.service
  │ └─1302 ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -v…
  ├─[0msystemd-udevd.service …
  │ └─udev
  │   └─814 /usr/lib/systemd/systemd-udevd
  ├─system-serial\x2dgetty.slice
  │ ├─serial-getty@ttyS0.service
  │ │ └─2457 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 - vt2…
  │ └─serial-getty@hvc0.service
  │   └─2454 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 - vt2…
  ├─polkit.service
  │ └─2149 /usr/lib/polkit-1/polkitd --no-debug
  ├─chronyd.service
  │ └─1219 /usr/sbin/chronyd
  ├─tuned.service
  │ └─2290 /usr/bin/python3 -Es /usr/sbin/tuned -l -P
  ├─pueued.service
  │ └─1193 /home/martins3/.nix-profile/bin/pueued -vv
  ├─systemd-journald.service
  │ └─780 /usr/lib/systemd/systemd-journald
  ├─sshd.service
  │ ├─2289 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
  │ ├─2592 sshd: martins3 [priv]
  │ ├─2603 sshd: martins3@pts/0
  │ ├─2608 -zsh
  │ ├─3015 sshd: martins3 [priv]
  │ ├─3026 sshd: martins3@pts/1
  │ ├─3031 -zsh
  │ └─3239 systemd-cgls
  ├─crond.service
  │ └─2446 /usr/sbin/crond -n
  ├─NetworkManager.service
  │ ├─1590 /usr/sbin/NetworkManager --no-daemon
  │ └─1642 /sbin/dhclient -d -q -sf /usr/libexec/nm-dhcp-helper -pf /var/run/Ne…
  ├─gssproxy.service
  │ └─2292 /usr/sbin/gssproxy -D
  ├─rsyslog.service
  │ └─2288 /usr/sbin/rsyslogd -n -i/var/run/rsyslogd.pid
  ├─rpcbind.service
  │ └─1184 /usr/bin/rpcbind -r -w -f
  ├─ovs-vswitchd.service
  │ └─1417 ovs-vswitchd unix:/var/run/openvswitch/db.sock -vconsole:emer -vsysl…
  ├─dbus.service
  │ └─1189 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfil…
  ├─system-getty.slice
  │ └─getty@tty1.service
  │   └─2449 /sbin/agetty -o -p -- \u --noclear - linux
  └─systemd-logind.service
    └─1196 /usr/lib/systemd/systemd-logind

为什么我 hacking 的虚拟机,user-1000 是打开的,而且是失败的 systemctl status user-1000.slice

但是在

[root@bogon ~]# systemctl status user-1000.slice
○ user-1000.slice - User Slice of UID 1000
     Loaded: loaded
    Drop-In: /usr/lib/systemd/system/user-.slice.d
             └─10-defaults.conf
     Active: inactive (dead)
       Docs: man:user@.service(5)

显然,似乎是由于我们被 podman 启动的这个影响了:

WARN[0000] The cgroupv2 manager is set to systemd but there is no systemd user session available
WARN[0000] For using systemd, you may need to log in using a user session
WARN[0000] Alternatively, you can enable lingering with: `loginctl enable-linger 1000` (possibly as root)
WARN[0000] Falling back to --cgroup-manager=cgroupfs

果然,使用 loginctl disable-linger 1000 之后

启动之后没有这些问题。

但是 podman 启动还是有这个问题:

 Failed to add pause process to systemd sandbox cgroup: dbus: couldn't determine address of session bus

podman system reset

WARNING! This will remove: - all containers - all pods - all images - all networks - all build cache - all machines - all volumes - the graphRoot directory: “/home/martins3/.local/share/containers/storage” - the runRoot directory: “/tmp/storage-run-1000/containers”

也没用的

https://mp.weixin.qq.com/s/NwbdR9r93RiWR6ndApQ1mg

dbus 到底是啥

https://github.com/Troels51/dtui

systemd 还提供了一个命令 busctl 的

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。