1827295 Members
3886 Online
109717 Solutions
New Discussion

log files

 
SOLVED
Go to solution
Fadia Almarei
Super Advisor

log files

Dear All
in my linux9 server what should i do for my log file how can i trim them,and how should i do to the server as rutine tasks
fadia.marei
5 REPLIES 5
Fred Ruffet
Honored Contributor
Solution

Re: log files

Hi Fadia,

I suppose linux9 is redhat9.

In order to have your log not to grow too high, too fast, you can setup logrotate. This is available as an RPM, and configurable in /etc/cron.daily. As it is setup in this directory, it will run once a day.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Fadia Almarei
Super Advisor

Re: log files

ok , but how can i get this rpm ,or what is it is name in order to get it.
fadia.marei
Fadia Almarei
Super Advisor

Re: log files

thanks for your help fred, this rpm is already installed in redhatlinux 9 system, and it is also found in /etc/cron.daily.
fadia.marei
Fred Ruffet
Honored Contributor

Re: log files

If :
. /etc/cron.daily/logrotate is executable
. crond is running
then logrotate should be running every day.

Now you should configure /etc/logrotate.conf the way you want (you can include any log file, even for your own programs). It already include some basic confs and "man logrotate" is pretty good.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Ronen Amity
Occasional Advisor

Re: log files