A shell script to rotate the log files of web servers

In order to save disks pace and processing time, log files of servers should be rotated (backedup) on aregular
base. Ifyouuse http? analyze tocreateastatisticsreport, log files must be kept in tact forthe wholecurrent
monthuntilit can be»finalized«(processedalasttime)inthefollowingmonth. The time bywhichastatistics
reportcanbe finally created without havingchangesisat00:00at the1st dayofthefollowingmonth.This
reportexplains

The script first getsthe dateandcomputesthelast
month.It then changesinto SERVERROOT andsavesthelogfilesforeachserverinthe appropriatesubdirectory.
Thescriptthenrestarts the web serverand delays20minutestonotdisturbother jobs runningatthistime
beforeitstartsresolvingIPnumbersintohostnames

DOWNLOAD

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s