[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[LDM #FMU-883839]: LDM log rotate
- Subject: [LDM #FMU-883839]: LDM log rotate
- Date: Wed, 24 Sep 2014 14:15:21 -0600
Hi Ajay,
re:
> Need help in log role. In LDM 6 version is there any way that we automatically
> roll the logs under
>
> /local/home/ldm/data/gempak/logs directory
>
> Under this directory the logs are big and we wanted to do log role for space
> management .
>
> -rw-r--r--. 1 ldm weather 40835 Sep 24 13:50 dcgrib2_RUC.log
> -rw-r--r--. 1 ldm weather 41337 Sep 24 13:51 dcwarn.log
> -rw-r--r--. 1 ldm weather 119677 Sep 24 13:51 dcgrib2_NWSother.log
> -rw-r--r--. 1 ldm weather 4036600 Sep 24 13:53 dcrdf.log
> -rw-r--r--. 1 ldm weather 34632 Sep 24 13:54 dcgrib2_AWC_TURB.log
> -rw-r--r--. 1 ldm weather 28868614 Sep 24 13:54 dclsfc.log
> -rw-r--r--. 1 ldm weather 67212487 Sep 24 13:55 dcmetr.log
>
>
> I know that we have #ldmadmin newlog but that’s for only ldmd.log.
The Unidata distribution of GEMPAK contains a CShell script, 'dcrotatelog.csh',
that is designed to be used to rotate the GEMPAK log files.
'dcrotatelog.csh', which can be found in the ~gempak/NAWIPS/bin directory,
should
be copied to a directory in the PATH of your LDM user (typically 'ldm').
NB: you should _NOT_ copy it to ~ldm/bin as this directory should be a
runtime link to the bin directory of the LDM distribution, and this will get
changed when you upgrade your LDM installation! We suggest that you create
the ~ldm/util directory and copy 'dcrotatelog.csh' to it.
Also, you should edit the contents of 'dcrotatelog.csh' and adjust the
line that sources the file Gemenviron so that the file gets read.
Finally, add a cron entry for 'ldm' that runs 'dcrotatelog.csh' once
per day. For instance, the crontab entry that we use to rotate
the GEMPAK log files is:
0 17 * * * util/dcrotatelog.csh >/dev/null 2>&1
If you use this crontab entry, you should adjust the hour it runs
to be shortly after 0 UTC (like 1 UTC).
re:
> Thank you for your help in advance
No worries. Please let us know if you run into any snags when setting up
or running 'dcrotatelog.csh'.
Cheers,
Tom
--
****************************************************************************
Unidata User Support UCAR Unidata Program
(303) 497-8642 P.O. Box 3000
address@hidden Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage http://www.unidata.ucar.edu
****************************************************************************
Ticket Details
===================
Ticket ID: FMU-883839
Department: Support GEMPAK
Priority: Normal
Status: Closed