Fundamental automated tasks
What are the fundamental automated tasks through crontab that a server has to do?
Self-maintenance |
That would depend on what type of server it is. A mail server is going to need to do different things to a file server, a *ahem* CD server, etc, etc. One thing that should be done on all machines, servers or otherwise, is logrotate.
|
How to do that?
simply 0 3 * * * /sbin/logrotate /var/log/messages Is that ok? |
My crontab has the following entries:
Code:
SHELL=/bin/bash Code:
#!/bin/sh Code:
# see "man logrotate" for details |
alright, and how logrotate finds where the log files reside?
|
In the logrotate.conf file it says that "RPM packages drop log rotation information into this director" and then lists /etc/logrotate.d. In that dir there are yet more files, each a config file corresponding to a service that generates logs that need to be rotated. Try saying that after a few beers :D
Basically, cron reads from the script that tells it to run logrotate. logrotate reads from the logrotate.conf file that tells it to look in /etc/logrotate.d to get information about which logs need rotating. I doubt very much that /etc/logrotate.d is RPM specific, so it should work on any system. |
Alright, i think that suse does logrotation automatically, doesn't it?
|
All times are GMT -5. The time now is 10:14 PM. |