|
Home > Archive > ASE Database forum > October 2005 > Renaming Error Log File while ASE is running.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Renaming Error Log File while ASE is running.
|
|
| Shivakumar K 2005-10-27, 8:21 am |
| Hi All,
I had once come accross a post on this topic ,however I'm
unable to find it, hence the repeat.
I'd like to understand the concerns with renaming the ASE
error log file while the ASE is still running...
If I copied the existing file into another one and then
blanked the original one with either a touch or the
redirection (>> ) command...would ASE recognize the file
correctly and write into it???
Will an ASE restart be compulsory in this case?
Thanks,
Shivakumar Kannan.
| |
| Michael Heaney 2005-10-27, 8:21 am |
| Shivakumar K wrote:
> Hi All,
> I had once come accross a post on this topic ,however I'm
> unable to find it, hence the repeat.
>
> I'd like to understand the concerns with renaming the ASE
> error log file while the ASE is still running...
> If I copied the existing file into another one and then
> blanked the original one with either a touch or the
> redirection (>> ) command...would ASE recognize the file
> correctly and write into it???
> Will an ASE restart be compulsory in this case?
I copy the log, then run "cat /dev/null > errorlog".
Subsequent messages get written correctly to the
errorlog without need for a restart.
Michael Heaney
TIGR
| |
| mpeppler@peppler.org 2005-10-27, 8:21 am |
| You can do the following:
DATE=`date +%Y%m%d_%H%M`
cp SYBASE.log SYBASE.log.$DATE
cp /dev/null SYBASE.log
No restart of ASE is necessary in this situation.
Michael
> Hi All,
> I had once come accross a post on this topic ,however I'm
> unable to find it, hence the repeat.
>
> I'd like to understand the concerns with renaming the ASE
> error log file while the ASE is still running...
> If I copied the existing file into another one and then
> blanked the original one with either a touch or the
> redirection (>> ) command...would ASE recognize the file
> correctly and write into it???
> Will an ASE restart be compulsory in this case?
>
> Thanks,
> Shivakumar Kannan.
| |
| Jesus M. Salvo Jr. 2005-10-27, 8:21 am |
| mpeppler@peppler.org wrote:
> You can do the following:
>
> DATE=`date +%Y%m%d_%H%M`
> cp SYBASE.log SYBASE.log.$DATE
> cp /dev/null SYBASE.log
>
> No restart of ASE is necessary in this situation.
>
> Michael
>
Is this how logrotate works ? ... and does it work across different UNIX
platforms ? ( Linux and Solaris in particular ).
| |
| Michael Peppler 2005-10-27, 8:21 am |
| On Sun, 09 Oct 2005 18:27:26 -0700, Jesus M. Salvo Jr. wrote:
> mpeppler@peppler.org wrote:
>
> Is this how logrotate works ?
That depends. IIRC logrotate can be configured to do a mv followed by a
restart (usually via a SIGHUP), or to do a cp as above. However I've never
tried to configure logrotate to work with ASE.
> ... and does it work across different UNIX
> platforms ? ( Linux and Solaris in particular ).
AFAIK, yes.
Michael
--
Michael Peppler [TeamSybase] mpeppler@peppler.org - http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
|
|
|
|
|