用于配置yum日志的选项

时间:2015-09-17 13:41:14

标签: logging centos yum

您知道是否有任何选项可以将yum命令的控制台的所有信息写入yum.los文件?

例如默认情况下,在yum.log中,它只会编写已安装,已创建或更新的有关进度或错误的内容

1 个答案:

答案 0 :(得分:0)

您是否尝试过yum history,然后选择所需的事件ID并使用yum history info <number>

查看历史记录列表;

[root@vm0]# yum history
Loaded plugins: fastestmirror, security
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
   238 | root <root>              | 2018-06-20 08:28 | Update         |    8   
   237 | root <root>              | 2018-06-17 21:44 | E, I, U        |    5 EE

详细信息;

[root@vm0]# yum history info 237
Loaded plugins: fastestmirror, security
Transaction ID : 237
Begin time     : Sun Jun 17 21:44:06 2018
Begin rpmdb    : 509:98441772be4b269ecf6aac591192709f124cf359
End time       :            21:45:37 2018 (91 seconds)
End rpmdb      : 509:d76a7996c2e749e10675b824fba225121b5e5333
User           : root <root>
Return-Code    : Success
Command Line   : update
Transaction performed with:
    Installed     rpm-4.8.0-55.el6.x86_64                       @anaconda-CentOS-201605220104.x86_64/6.8
    Installed     yum-3.2.29-81.el6.centos.noarch               @base
    Installed     yum-metadata-parser-1.1.2-16.el6.x86_64       @anaconda-CentOS-201605220104.x86_64/6.8
    Installed     yum-plugin-fastestmirror-1.1.30-40.el6.noarch @base
Packages Altered:
    Erase   kernel-ml-4.17.0-1.el6.elrepo.x86_64         @elrepo-kernel
    Install kernel-ml-4.17.2-1.el6.elrepo.x86_64         @elrepo-kernel
    Erase   kernel-ml-devel-4.17.0-1.el6.elrepo.x86_64   @elrepo-kernel
    Install kernel-ml-devel-4.17.2-1.el6.elrepo.x86_64   @elrepo-kernel
    Updated kernel-ml-headers-4.17.1-1.el6.elrepo.x86_64 @elrepo-kernel
    Update                    4.17.2-1.el6.elrepo.x86_64 @elrepo-kernel
Scriptlet output:
   1 warning:    erase unlink of /lib/modules/4.17.0-1.el6.elrepo.x86_64/modules.networking failed: No such file or directory
   2 warning:    erase unlink of /lib/modules/4.17.0-1.el6.elrepo.x86_64/modules.modesetting failed: No such file or directory
   3 warning:    erase unlink of /lib/modules/4.17.0-1.el6.elrepo.x86_64/modules.drm failed: No such file or directory
   4 warning:    erase unlink of /lib/modules/4.17.0-1.el6.elrepo.x86_64/modules.block failed: No such file or directory
history info