linux下应用软件突然丢失的的故障
来源:互联网 发布:js onclick 变量 编辑:程序博客网 时间:2024/06/10 03:15
问题描述:
某小系统早上发现应用软件被删除了,系统无法正常运行,相关人员均为找到原因.OS本版是RHEL6
1,登录主机发现,/dev/sdb1同时挂载了两个文件系统,注意/tmp也被mount
2,操作系统会每天删除/tmp目录下的文件,应该是默认删除10天前的文件,所以/spmwls安装的中间件软件按被系统删除了
a、/var/spool/cron目录下的文件,这个目录下和用crontab -l命令查看处理的相同
b、/etc/cron.d目录下的文件
c、/etc/anacrontab文件中的内容,本次的tmpwatch就是通过这个文件执行的,这个文件会在3点钟开始执行
man cron
Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; The founded crontabs are loaded into memory. Cron also
searches for /etc/anacrontab and the files in the /etc/cron.d directory,
参考资料:
https://access.redhat.com/site/documentation/zh-CN/Red_Hat_Enterprise_Linux/6/html/Migration_Planning_Guide/ch04s14.html
某小系统早上发现应用软件被删除了,系统无法正常运行,相关人员均为找到原因.OS本版是RHEL6
1,登录主机发现,/dev/sdb1同时挂载了两个文件系统,注意/tmp也被mount
[root@localhost ~]# df -h文件系统 容量 已用 可用 已用%% 挂载点/dev/mapper/VolGroup-lv_root 14G 6.8G 6.0G 54% /tmpfs 4.0G 176K 4.0G 1% /dev/shm/dev/sda1 485M 51M 409M 11% /boot/dev/sdb1 40G 8.5G 29G 23% /spmwls/dev/sdb1 40G 8.5G 29G 23% /tmp
2,操作系统会每天删除/tmp目录下的文件,应该是默认删除10天前的文件,所以/spmwls安装的中间件软件按被系统删除了
[root@localhost cron.daily]# pwd/etc/cron.daily[root@localhost cron.daily]# cat /etc/cron.daily/tmpwatch#! /bin/shflags=-umc/usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \ -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \ -X '/tmp/hsperfdata_*' 10d /tmp/usr/sbin/tmpwatch "$flags" 30d /var/tmpfor d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do if [ -d "$d" ]; then /usr/sbin/tmpwatch "$flags" -f 30d "$d" fidone3,再看cron的执行日志
Oct 10 03:11:03 localhost run-parts(/etc/cron.daily)[62997]: starting tmpwatchOct 10 03:11:04 localhost run-parts(/etc/cron.daily)[63215]: finished tmpwatch删除部分文件失败的日志/etc/cron.daily/tmpwatch:error: failed to rmdir /tmp/weblogic1036/user_projects/domains/cmb/lib: Device or resource busy
4,备注: RHEL 6的cron的执行原理
a、/var/spool/cron目录下的文件,这个目录下和用crontab -l命令查看处理的相同
b、/etc/cron.d目录下的文件
c、/etc/anacrontab文件中的内容,本次的tmpwatch就是通过这个文件执行的,这个文件会在3点钟开始执行
[root@localhost lib]# cat /etc/anacrontab# /etc/anacrontab: configuration file for anacron# See anacron(8) and anacrontab(5) for details.SHELL=/bin/shPATH=/sbin:/bin:/usr/sbin:/usr/binMAILTO=root# the maximal random delay added to the base delay of the jobsRANDOM_DELAY=45# the jobs will be started during the following hours onlySTART_HOURS_RANGE=3-22#period in days delay in minutes job-identifier command1 5 cron.daily nice run-parts /etc/cron.daily7 25 cron.weekly nice run-parts /etc/cron.weekly@monthly 45 cron.monthly nice run-parts /etc/cron.monthly
man cron
Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; The founded crontabs are loaded into memory. Cron also
searches for /etc/anacrontab and the files in the /etc/cron.d directory,
参考资料:
https://access.redhat.com/site/documentation/zh-CN/Red_Hat_Enterprise_Linux/6/html/Migration_Planning_Guide/ch04s14.html
- linux下应用软件突然丢失的的故障
- Linux下应用软件的安装
- 突然丢失文件的情况下应该注意哪些
- linux的应用软件
- linux 应用软件的安装方法
- Linux常用的网络应用软件
- 如何安装Linux的应用软件
- Linux下常用的故障排查命令行
- linux下常用的故障排查命令行
- Oracle redolog 丢失的故障处理
- 丢失(移动)数据文件后的故障表现
- mysql linux下密码丢失的解决方案
- Fedora下的应用软件大集合
- 云服务器Linux下的tomcat突然不能访问
- 应用软件成Linux发展的关键
- RedHat Enterprise Linux 4的应用软件
- 安装Linux应用软件的基本方法
- 打造自己的Linux 常用应用软件列表
- jQuery中的Ajax几种请求方法
- struts2效验框架学习笔记(第一季)
- 第一个C++程序
- HDU 1796 How many integers can you find (简单容斥)
- SpringContextUtil工具类实现
- linux下应用软件突然丢失的的故障
- Map接口实现类HashMap之实现原理
- VC++实现NAT穿透之NAT类型检测
- 算法习题6:查找最小的k个元素
- 关于内网或者本机域名解析导致服务无法正常运行
- hadoop研究:mapreduce研究前的准备工作
- Spring事务的传播行为 @Transactional
- OpenMP: OpenMP多核编程配置与测试
- 文件自删除的几种实现方式