• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Renaming the logs in Unix without shutting the server

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i rename the big log files in Unix environment without shutting down the applicatio server.Here iam using websphere.
Can anyone help me out?
 
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried the mv command?
 
Chak Radar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Leslie
In the real time environment i have few server instances within an websphere application server.
This is a production environment and i cannot shut down the server to take a back up of existing logs.Again when the server is started the application will create a new log file with 0 bytes.My question is CAN i take a back up of the log files with out shutting down the server.
That is with out an outage to the production environment can i take a back up of huge logs .The huge logs may cause slowness in accessing the application.I think iam clear in my question this time.
Thanks
Chak Radar
 
Leslie Chaim
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chak,
It really does not matter which application is writing to the log file.
I understand your problem as follows:
Q. I have a process which writes to a log file which grows very rapidly. How do I truncate the file without shutting down my process.
A. Simply clubber the file as in (from the shell):

Q. Will I lose the data from the log.
A. Yes! If you want to preserve it you can do something like this:

I hope this is helpful. Here's some more
Cheers,
Leslie
[ May 06, 2003: Message edited by: Leslie Chaim ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic