1

I have a vendor log file that repeatedly grows to hundreds of gigabytes in size. I've reported the bug a few times without resolution. Are there any issues with symbolic linking the file in question to /dev/null ? System is a current generation iMac running latest system.

I understand I'll lose any logs in those files but with 200Gb of repeated copyright notices I'm OK with that until they eventually find the cause of the bug.

rjmoggach
  • 1,013
  • 1
  • 8
  • 11
  • Just in case... Did you consider a log rotation solution? http://serverfault.com/questions/352942/equivalent-of-logrotate-on-osx – JayMcTee May 27 '16 at 14:42
  • I considered it but then decided I didn't want multiple 200Gb files full of useless vendor copyright information... – rjmoggach Jun 03 '16 at 23:05
  • Interestingly the symbolic link I created was rotated as part of the normal rotation schedule for this software!!! I have yet to identify what piece is generating the logs so I've resorted to a brute force root cron job to remove the offending file. I really hate this solution but for now it works. – rjmoggach Jun 03 '16 at 23:11

2 Answers2

3

The most obvious issue with symlinking it to /dev/null would be that you would then be unable to read its contents.

If you do not need to read the contents of the log file, then there is no problem symlinking to /dev/null - although you may want to look into the ability to simply disable the logging facility of the software in question in the first place.

Additionally, if you do in fact need to read the contents of the log file, I recommend that you deploy something to rotate the logs (such as newsyslog for Mac OS X) and have it rotate the logs at regular intervals and/or after they reach a certain (defined) size.

BE77Y
  • 2,667
  • 3
  • 18
  • 23
0

It's all ok if you dont want them. No worry there.

I did that tip on a xenserver, as by default the install partition is done small by the installer, thus the filesystem was hitting 90%+ of usage. (even with logrotation or log compression added)

yagmoth555
  • 16,758
  • 4
  • 29
  • 50