The server went down. At midnight, I was called by phone. I went online to find a problem and waited until Nima was finished !! Yes !!~ _~
------------------- Sad cut line -----------------------
Symptom:
The system/directory was accidentally filled, and it was found that the/var/spool directory was too large.
Analysis:
Spool stores the System Mail! Not email !) By viewing the mail content, it is found that it is caused by cron.
The system automatically sends a mail to the root user by default because this machine adds a monitoring interface to the/etc/crontab for scheduled calls and frequent calls with invocation commands and execution output.
You can view the beginning of the/etc/crontab file.
Shell =/bin/bash
Path =/sbin:/bin:/usr/sbin:/usr/bin
Mailto = root ------------- "is here
Home =/
Can I simply close the mail sending service? For example, service Sendmail stop
But, after the mail is generated, it will not be sent, and will be directly accumulated into the system queue (/var/spool/clientmqueue/), it will also cause the disk to be fully written.
Swollen?
Solution:
At present, the best solution is to prevent the command from having any output, or redirect the command output to an empty location, that is, add
>/Dev/null 2> & 1
That is, discard the execution result of the command and discard the errors.
Over!
------------------- Sad cut line -----------------------
Nima sang, a technical child, cannot afford it !!! The previous generation of paper is full of wings !!! Yes !!! Yes !!!