Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chan.log and custom.log --- clean up ?

Status
Not open for further replies.

alykhan

Technical User
Aug 17, 2007
5
CA
We have 2 log files on our root drive that are in var/opt/K directories.

One is chan.log and the other is custom.log.

Not sure what they are for exactly, but they are taking up a ton of space. Can I truncate these without issue ?

Someone once told me not to truncate log files in var/opt/K directories, but when I tail these files, they look truncable.

Before I go ahead, I would like to confirm with everyone else more knowledgable than me.

 
I believe the "chan.log" is related to MMDF (if that is your mail server, as opposed to using sendmail).
That file can be cleared. You may wish to stop the deliver daemon, clear (do not remove!) the file, then restart the deliver daemon.
I'm not too sure about truncating the "custom.log" file. It might be important if you need to remove something you installed using "custom". It looks to me that it is just a log showing actions taken while running custom (some of which are run automatically by CRON when the system verifies packages).

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
Okay, that is what I thought.
The chan.log file seems to have started having data put into it from April 6th of this year and continues every 4 to 8 seconds to write an error to chan.log.

The error is :

4/10 23:12:29 local 8738: [SYSERR(2)No Such file or directory] Unable to open message file 'msg/msg.

To help me from keeping the chan.log file from increasing, do you know what this is ?
 
You might want to look around in the /usr/spool/mmdf/lock/home directory. That is where the "msg" sub-directory is, and it contains all the messages that the system needs to process. The contents of that directory are also reflected in some of the other directories in that same location. For instance, you might have a message named ./msg/msg.aa10234. There would be a corresponding entry in ./q.smtp/msg.aa10234 and addr/msg.aa10234. If you have thousands of files in any of those directories, you've got a problem.
Is this system responsible for dealing with Email? If not, just leave the MMDF deliver daemon off.

"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
How do I turn off the mailer daemen ? We do not use mail in UNIX in any way shape or form.
 
Actually, my main concern is that if there are error messages dumping into chan.log, is there a major problem that is happening behind the scenes that I need to deal with. So, turning of the daemon will just hide the problem .... what do you think ?
 
Okay, I looked in the directory you are talking about. There are roughly 51 300 messages in there !!! All from last week till today !!! Something is screwy and I need to fix.
 
Welcome to the wacky world of MMDF for a mail server.
If you truly don't need mail (you said you don't), turn off the mail daemon. That will stop the problem from continuing. You will also need to disable the CRON-based mail cleanup routine which runs every Sunday (I think that is the default).
Now, you need to go through that directory and remove those files. It's not mandatory, but it will clean up the system and make your backups run faster.

Unfortunately, 51000+ files take a while to remove. I think this will do it (any confirmation from others monitoring this thread would be welcome!):
Stop the deliver daemon:
/usr/mmdf/bin/daemon stop

Remove the files:
cd /usr/spool/mmdf/lock/home
find . -type f -name "msg.*" | xargs rm





"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top