Bo's Oracle Station

查看: 1189|回复: 0

红帽7以后新的调度方法与临时文件删除机制

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-11-21 15:00:43 | 显示全部楼层 |阅读模式
sysstat包中的sysstat-collect.timer/sysstat-collect.service/sa命令(没有配置文件)

分别相当于systemd-tmpfiles-clean.timer/systemd-tmpfiles-setup.service/systemd-tmpfiles --create      systemd-tmpfiles --remove (这个有配置文件
/usr/lib/tmpfiles.d/*.conf   /run/tmpfiles.d/*.conf  /etc/tmpfiles.d/*.conf)

  1. [Unit]
  2. Description=Daily Cleanup of Temporary Directories
  3. Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)

  4. [Timer]
  5. OnBootSec=15min
  6. OnUnitActiveSec=1d
  7. ~                       
复制代码
开机以后15分钟检查一次,以后每隔1天检查1次。
具体怎么删除:
/usr/lib/tmpfiles.d/tmp.conf
  1. #  This file is part of systemd.
  2. #
  3. #  systemd is free software; you can redistribute it and/or modify it
  4. #  under the terms of the GNU Lesser General Public License as published by
  5. #  the Free Software Foundation; either version 2.1 of the License, or
  6. #  (at your option) any later version.

  7. # See tmpfiles.d(5) for details

  8. # Clear tmp directories separately, to make them easier to override
  9. q /tmp 1777 root root 10d
  10. q /var/tmp 1777 root root 30d

  11. # Exclude namespace mountpoints created with PrivateTmp=yes
  12. x /tmp/systemd-private-%b-*
  13. X /tmp/systemd-private-%b-*/tmp
  14. x /var/tmp/systemd-private-%b-*
  15. X /var/tmp/systemd-private-%b-*/tmp

  16. # Remove top-level private temporary directories on each boot
  17. R! /tmp/systemd-private-*
  18. R! /var/tmp/systemd-private-*
  19. ~                                                                              
  20. ~                                                   
复制代码
  1. [root@servera tmpfiles.d]# man 5 tmpfiles.d
复制代码












回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-9 11:06 , Processed in 0.034829 second(s), 24 queries .

快速回复 返回顶部 返回列表