Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
rv54ntjwfm3ug8
V2EX  ›  Linux

Ubuntu Server 启动时为什么会出现 Started Session 1 of user xxx?

  •  
  •   rv54ntjwfm3ug8 · Feb 24, 2022 · 2778 views
    This topic created in 1564 days ago, the information mentioned may be changed or developed.

    Google 了一下应该是 systemd 输出的。正常情况下在没有用户登录时不应该没有任何进程通过普通用户 session 运行吗,这个 session 是用来做什么的?

    3 replies    2022-02-25 12:27:54 +08:00
    julyclyde
        1
    julyclyde  
       Feb 25, 2022
    你既然已经查到是 systemd 了,应该问 systemd 啊
    不能假定情况正常然后问为什么有异常的现象
    而应该根据异常的现象去找异常的原因

    试试 loginctl 命令
    liuxu
        2
    liuxu  
       Feb 25, 2022
    这个是 systemd 中 session_start_scope() 在创建 cgroup 时打印的普通日志,https://access.redhat.com/solutions/1564823

    “用户”登录时,systmd 会为“用户”创建 cgroup ,而这里的“用户“即可以代表用户,也可以是一个通过 dbug 发送信息的应用程序

    之所以会以普通用户的 session 运行,可能是 crontab 设置了用户名,或者 systemd 中某些任务设置了用户名,执行时会归于这个用户
    liuxu
        3
    liuxu  
       Feb 25, 2022
    s/dbug/dbus/g
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5516 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 01:29 · PVG 09:29 · LAX 18:29 · JFK 21:29
    ♥ Do have faith in what you're doing.