[root@hadoop3 /]# crontab -e
/tmp/crontab.TB7A7w: 设备上没有空间
[root@hadoop3 /]# df -Bg
文件系统 1G-块 已用 可用 已用% 挂载点
/dev/mapper/centos-root 50G 50G 1G 100% /
devtmpfs 8G 0G 8G 0% /dev
tmpfs 8G 0G 8G 0% /dev/shm
tmpfs 8G 1G 8G 3% /run
tmpfs 8G 0G 8G 0% /sys/fs/cgroup
/dev/mapper/centos-home 985G 83G 902G 9% /home
/dev/sda1 1G 1G 1G 25% /boot
tmpfs 2G 0G 2G 0% /run/user/0
[root@hadoop3 /]# du /var/ -Bg -d1
1G /var/lib
1G /var/log
0G /var/adm
1G /var/cache
1G /var/db
0G /var/empty
0G /var/games
0G /var/gopher
0G /var/local
0G /var/nis
0G /var/opt
0G /var/preserve
24G /var/spool
1G /var/tmp
0G /var/yp
0G /var/kerberos
0G /var/crash
24G /var/
[root@hadoop3 /]# du /var/spool/ -Bg -d1
0G /var/spool/lpd
0G /var/spool/mail
1G /var/spool/anacron
1G /var/spool/cron
0G /var/spool/plymouth
1G /var/spool/postfix
24G /var/spool/clientmqueue
0G /var/spool/mqueue
24G /var/spool/
[root@hadoop3 /]#

[root@hadoop3 ~]# ll -as /var/spool/clientmqueue/ | less

总用量 24776176
1604 drwxrwx--- 2 smmsp smmsp 1187840 12月 29 09:43 .
4 drwxr-xr-x. 10 root root 4096 12月 13 08:47 ..
584 -rw-rw---- 1 smmsp smmsp 597740 12月 15 08:49 dfvBF0nSlu026759
4 -rw-rw---- 1 smmsp smmsp 86 12月 15 08:51 dfvBF0prcX002125
588 -rw-rw---- 1 smmsp smmsp 598481 12月 15 08:52 dfvBF0qfgc002156
588 -rw-rw---- 1 smmsp smmsp 598728 12月 15 08:53 dfvBF0rBZd002175
4 -rw-rw---- 1 smmsp smmsp 83 12月 15 08:53 dfvBF0rHm2002178
588 -rw-rw---- 1 smmsp smmsp 598975 12月 15 08:54 dfvBF0sBDL002192
588 -rw-rw---- 1 smmsp smmsp 599222 12月 15 08:55 dfvBF0tBNg002208

[root@hadoop3 ~]# cat /var/spool/clientmqueue/dfvBF19Hu8008608
15 Dec 09:08:07 ntpdate[8526]: adjust time server 182.92.12.11 offset 0.000410 sec
[root@hadoop3 ~]#

[root@hadoop3 ~]# xlcl
#spider
*/20 0-8,20-23 * * * python /home/data/crontab_chk_url/personas/trunk/plugins/spider/chk_url_status_update_tmp_error.py ;
#spider
*/30 * * * * python /home/data/crontab_chk_url/personas/trunk/plugins/spider/chk_url_status_insert_tmp_error_30min.py &> /dev/null;

#db
#*/30 * * * * python /home/data/crontab_chk_url/personas/trunk/plugins/spider/chk_url_status_insert_error_from_tmp_error.py &> /dev/null;

#杀死消耗内存进程
* */2 * * * python /home/data/crontab_chk_url/personas/trunk/plugins/spider/kill_phantomjs_whole_os.py &> /home/data/crontab_chk_url/personas/trunk/plugins/spider/kill_phantomjs_whole_os_log;

#
*/10 * * * * /usr/sbin/ntpdate edu.ntp.org.cn
*/2 * * * * /usr/sbin/ntpdate cn.ntp.org.cn

* */1 * * * cd /home/data/xl_project;cat r1 > rtmp;date >r1; free -g >>r1;cat rtmp>>r1;/usr/sbin/sendmail -s 'zh_cn_xiaomi_buqiang_jiankong' abc@qq.com < r1;

#危险动作
#*/1 * * * * cd /home/data/xl_project/bash_app;echo ' start '$(date +"%Y%m%d_%H%M%S") >> ad_direct_error_temp.del.sh.log;sh ad_direct_error_temp.del.sh; cat ad_direct_error_temp.del.sh >> ad_direct_error_temp.del.sh.log;echo ' end '$(date +"%Y%m%d_%H%M%S") >> ad_direct_error_temp.del.sh.log;
#*/1 * * * * echo start >>/home/data/xl_project/bash_app/ias

*/2 * * * * sh /home/data/xl_project/bash_app/ad_direct_error_temp.del.tmp4log.sh;

[root@hadoop3 ~]#

http://www.linuxweblog.com/sendmail-clientmqueue-mqueue

When submitting mail by using sendmail as a mail submission program, sendmail copies all messages to "/var/spool/clientmqueue" first. Sendmail is a setgid smmsp program and thus gives any user the permission to do so (/var/spool/clientmqueue belongs to user and group smmsp). Later, another sendmail process, the sendmail mail transfer agent (MTA) copies the messages from /var/spool/clientmqueue to /var/spool/mqueue and sends them to their destination.

/var/spool/clientmqueue is thus the holding area used by the MSP (Mail Submission Protocol) sendmail instance before it injects the messages into the main MTA (Mail Transport Agent) sendmail instance.

Sendmail will save the message in /var/spool/clientmqueue for safe keeping before trying to connect to the MTA to get the message delivered. Normally there would be a 'queue runner' MSP sendmail instance which every half hour would retry sending any message that couldn't be sent immediately. Each message will generate a 'df' (message routing info) and 'qf' (message headers and body) file. You can list out all of the messages and their status by:

先备份到数据盘

[root@hadoop3 /]# ll -as /home/data/xl_project/
总用量 15411664
4 drwxr-xr-x 5 root root 4096 12月 26 11:01 .
4 drwxr-xr-x. 11 hadoop hadoop 4096 12月 25 16:06 ..
4 drwxr-xr-x 2 root root 4096 12月 26 14:21 bash_app
4 -rw-r--r-- 1 root root 442 12月 13 11:39 cmd_top
7812 -rw-r--r-- 1 root root 7997472 12月 13 12:39 Django-2.0.tar.gz
4 -rw-r--r-- 1 root root 87 12月 13 15:44 djangoACTION.txt
4 -rw-r--r-- 1 root root 43 12月 13 11:55 e
48 -rw-r--r-- 1 root root 48899 12月 13 12:39 index.html
4 -rw-r--r-- 1 root root 46 12月 13 18:37 mail
4 -rw-r--r-- 1 root root 49 12月 13 11:23 mail.m
0 drwxr-xr-x 4 root root 64 12月 13 17:52 mysite
4948 -rw-r--r-- 1 root root 5065229 12月 29 10:53 r1
4948 -rw-r--r-- 1 root root 5064982 12月 29 10:53 rtmp
0 drwxr-xr-x 2 root root 6 12月 19 10:22 sh_app
15393876 -rw------- 1 root root 15763327868 12月 26 11:03 var_spool_mail_root
[root@hadoop3 /]# cp -r /var/spool/clientmqueue /home/data/xl_project/var_spool_clientmqueue

24G的文件的复制过程

top - 10:57:04 up 4 days, 1:57, 12 users, load average: 2.54, 1.44, 0.71
Tasks: 231 total, 1 running, 227 sleeping, 0 stopped, 3 zombie
%Cpu(s): 0.1 us, 1.3 sy, 0.0 ni, 83.5 id, 15.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 16203484 total, 188920 free, 2938828 used, 13075736 buff/cache
KiB Swap: 8191996 total, 8191996 free, 0 used. 12711548 avail Mem
scroll coordinates: y = 1/231 (tasks), x = 1/12 (fields)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2400 root 20 0 122084 1540 768 D 6.0 0.0 0:11.41 cp
92 root 20 0 0 0 0 S 2.0 0.0 0:05.23 kswapd0
792 root 20 0 0 0 0 D 0.7 0.0 0:02.15 kworker/u32:2
20026 root 20 0 0 0 0 S 0.7 0.0 0:01.91 kworker/6:1
21225 root 20 0 21928 2212 1612 S 0.7 0.0 0:28.69 nload
27522 root 20 0 6027700 727964 21664 S 0.7 4.5 12:07.56 java
25 root 20 0 0 0 0 S 0.3 0.0 2:55.06 rcu_sched
30 root 20 0 0 0 0 S 0.3 0.0 0:21.01 rcuos/4
33 root 20 0 0 0 0 S 0.3 0.0 0:19.55 rcuos/7
733 root 0 -20 0 0 0 S 0.3 0.0 0:06.89 kworker/6:1H
769 dbus 20 0 24964 2156 1320 S 0.3 0.0 0:46.20 dbus-daemon
28545 root 20 0 6018568 337960 21780 S 0.3 2.1 2:55.23 java

对资源的消耗 ,对cpu的消耗程度远大于内存

粗略计时

检查

[root@hadoop3 /]# date
2017年 12月 29日 星期五 11:02:11 CST
[root@hadoop3 /]# cp -r /var/spool/clientmqueue /home/data/xl_project/var_spool_clientmqueue
[root@hadoop3 /]# date
2017年 12月 29日 星期五 11:05:40 CST
[root@hadoop3 /]# du /home/data/xl_project/ -Bg -d1
1G /home/data/xl_project/mysite
0G /home/data/xl_project/sh_app
1G /home/data/xl_project/bash_app
24G /home/data/xl_project/var_spool_clientmqueue
40G /home/data/xl_project/
[root@hadoop3 /]#

http://www.cnblogs.com/ratooner/p/4166735.html

Linux服务器 /var/spool/clientmqueue 目录下产生大量文件的删除办法

当文件没有被其他进程读写时

[root@hadoop3 /]# rm -rf /var/spool/clientmqueue/*
[root@hadoop3 /]# du /var/spool/ -Bg -d1
0G /var/spool/lpd
0G /var/spool/mail
1G /var/spool/anacron
1G /var/spool/cron
0G /var/spool/plymouth
1G /var/spool/postfix
1G /var/spool/clientmqueue
0G /var/spool/mqueue
1G /var/spool/
[root@hadoop3 /]#

成功删除

设备没有可用空间 /var/spool/clientmqueue sendmail的更多相关文章

  1. 清理/var/spool/clientmqueue目录释放大量空间

    清理/var/spool/clientmqueue目录可以释放大量空间,具体命令是:ls | xargs rm -f 文件太大,rm -rf会由于参数太多而无法删除,所以需要用上面的命令. “Argu ...

  2. /var/spool/clientmqueue 下生成太多文件处理

    问题现象: linux操作系统中的/var/spool/clientmqueue/目录下存在大量文件. 原因分析: 系统中有用户开启了cron,而cron中执行的程序有输出内容,输出内容会以邮件形式发 ...

  3. /var/spool/clientmqueue目录下存在大量文件的原因及解决方法

    问题现象:linux操作系统中的/var/spool/clientmqueue/目录下存在大量文件.原因分析: 系统中有用户开启了cron,而cron中执行的程序有输出内容,输出内容会以邮件形式发给c ...

  4. /var/spool/clientmqueue目录~清理

    今天nagios报警,一台服务器的disk满了,使用du -sh * 或 du -sh /* 查看目录的大小,查找占用空间大的目录/var/spool/clientmqueue.... 然后我就想/v ...

  5. /var/spool/clientmqueue 爆满问题

    当你使用简单的sendmail发邮件的时候,或者系统默认要发一些邮件(比如cron发的邮件)的时候,首先会把邮件拷贝到这个目录里,然后等待MTA(mail transfer agent) 来处理,MT ...

  6. Linux服务器 /var/spool/clientmqueue 目录下产生大量文件的删除办法

    检查linux发现server中的磁盘分区空间超过98%,登录到服务器查看 [root@localhost etc]# df -hFilesystem 容量 已用 可用 已用% 挂载点/dev/hda ...

  7. LInux下inode空间报警-CROND出错导致/var/spool/postfix/maildrop/堆积

    Linux下显示磁盘空间不足,,通过 df -ih 查询发现/dev/mapper/*****var 下的inode用满.inode介绍 通过 du -sh * 查询/目录下的问题,最终查到/var/ ...

  8. kali linux 出现 E: 您在 /var/cache/apt/archives/ 上没有足够的可用空间。

    问题: E: 您在 /var/cache/apt/archives/ 上没有足够的可用空间. 软链接到HOME下的一个目录即可,home下新建debs文件夹: 在某个空间大的分区建立一个目录,然后把/ ...

  9. /var/spool/postfix/maildrop 占用inode索引及磁盘空间解决办法

    1.问题表现和检查 运行df -i / 查看inode使用是否满: 2.查看/var/spool/postfix/maildrop是否有非常多的小文件,ls直接卡死等情况 解决: 删除小文件: cd ...

随机推荐

  1. Python旅途——简单语法

    1. 前言 在我们对环境以及pycharm安装好之后,我们就可以开始我们的Python之旅了,那么,我们学习一门语言应该如何开始呢?就像我们学习汉语一样,从abcd这些拼音学起,而对于我们Python ...

  2. POJ 1985 Cow Marathon (求树的直径)

    Description After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to ge ...

  3. 异常 Failed to bind NettyServer on /10.133.7.216:29105, cause: Failed to bind to: /0.0.0.0:29105

    "C:\Program Files\Java\jdk1.7.0_80\bin\java" -agentlib:jdwp=transport=dt_socket,address=12 ...

  4. POJ 1904:King's Quest【tarjan】

    题目大意:给出一个二分图的完美匹配(王子和公主的烧死名单表),二分图x部和y部均只有n个点,问对于每一个x部的点,他能选择哪些点与之匹配 使得与之匹配后,剩余图的最大匹配仍然是n 思路:这题是大白书3 ...

  5. CF778A:String Game

    给出字符串s和t,以及s的长度n的一个全排列,求按照这个排列依次删除s的字符,删到何时s中不含子序列t. 解法一: t中的每个字符的位置在s中跳啊跳,合法的情况下t中的字符在s中的位置应该是单调递增的 ...

  6. 【frameset】frameset设置不能拖动

    <frameset rows='20%,*' >           <!--  row 行 col 列    分行列要为rows  cols  --> <frame s ...

  7. 安装mysql时出现应用程序无法正常启动(0xc000007b)、初始化失败以及密码忘记怎样重置?

    https://blog.csdn.net/zztingfeng/article/details/80155624

  8. poj——2771 Guardian of Decency

    poj——2771    Guardian of Decency Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 5916   ...

  9. mybatis几种开发方式

    mybatis是比较轻巧的半自动化的CRM框架,它有几种开发方式,现今张列于此: 一.注解方式:在接口方法上面写SQL语句,有点类似springdataJPA 的query sql 语句 范例 @se ...

  10. SpringMVC Ueditor1.4.3 未找到上传数据

    ueditor自事的fileupload组件与spring的有冲突.将那个类BinaryUploader 重写就可以了             return storageState;         ...