Centos – Why and how to track /var/log/dmesg with version control

centosdmesgmercurial

On this wiki they recommend tracking /var/log/dmesg using Mercurial. I wanted to set up a cron job on CentOS 6.4 like on this page to remind myself to make commit messages for such a repo. However, the output of hg diff on /var/log/dmesg is pretty long, and I don't really understand what it is I'd be looking for.

If you track this file yourself, why? What problems do you watch out for with it? How frequently does yours change?

Best Answer

On the links you posted about tracking /var/log/dmesg, it's only discussed on the first one, but I don't think this is really even the primary focus of these articles. They're primarily discussing how you'd track changes made to your /etc directory, which is something you'd definitely want to do, and it's pretty easy to do.

However, if you're interested in tracking changes for /etc, I would use a wrapper tool such as etckeeper, instead of doing it with vanilla git/mercurial (there are several reasons for this, the primary being that git and mercurial don't keep track of permissions that become important in /etc). Obviously for /etc, all your configuration information is kept there so it's valuable to track changes on these files over time.

As to whether you should track the changes made to /var/log/dmesg? I don't see any value in this and believe it would be a waste of time and resources to do so.

Related Question