【问题标题】:How view the output of the program running through the service (Centos 7)?如何查看通过服务运行的程序的输出(Centos 7)?
【发布时间】:2017-06-24 10:11:43
【问题描述】:

我可以看到服务的状态

systemctl status name_service.service

但我不知道如何查看程序本身在输出什么

【问题讨论】:

    标签: service centos systemd


    【解决方案1】:

    服务的输出(stdout 和 stderr)默认重定向到 journald。

    您可以通过过滤相应的服务将其作为日志条目获取:

    sudo journalctl -u name_service
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-07-02
      • 2013-07-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多