- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- trim large log file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:16 PM
08-21-2007 07:16 PM
trim large log file
How to trim large log file.
6935040073 Aug 22 10:09 wls_production.log
thanks
- Tags:
- trim logfile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:19 PM
08-21-2007 07:19 PM
Re: trim large log file
Asif,
You can do
# > wls_production.log
this will nullify the log.
WK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:23 PM
08-21-2007 07:23 PM
Re: trim large log file
Trim as in clear it?
# cp /dev/null wls_production.log
You could also save the last portion of the file to a backup file.
# tail -10000 wls_production.log > wls_production.log.1
and then empty the file.
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:32 PM
08-21-2007 07:32 PM
Re: trim large log file
cp wls_production.log /newdir/wls_production.log
> wls_production.log
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:33 PM
08-21-2007 07:33 PM
Re: trim large log file
>wls_production.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:37 PM
08-21-2007 07:37 PM
Re: trim large log file
this is also not working
cp /dev/null wls_production.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:41 PM
08-21-2007 07:41 PM
Re: trim large log file
>wls_production.log
What do you mean? Don't want to? Or something prevents you?
>this is also not working
cp /dev/null wls_production.log
How? This isn't the best way to do it. Using ">" is the proper way.
If the file is open and being actively written, it probably won't help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 07:49 PM
08-21-2007 07:49 PM
Re: trim large log file
this file is open and being actively written,
I tried
>wls_production.log
/dev/null >wls_production.log
vi
ex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 08:15 PM
08-21-2007 08:15 PM
Re: trim large log file
I don't know what version of weblogic you are running, but you can set up log rotation. Have a look at this doc.
http://e-docs.bea.com/wls/docs81/ConsoleHelp/logging.html#1047443
Regards,
Robert-Jan
Ps.
Dennis "This isn't the best way to do it" Well then you will need to rewrite a lot of documentation :-) example emr_na-c01025048-1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 08:16 PM
08-21-2007 08:16 PM
Re: trim large log file
As there a way to send a signal to it to restart the log? I.e. kill -HUP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 08:52 PM
08-21-2007 08:52 PM
Re: trim large log file
Thanks, I am using weblogic 8.1 please let me know to set up log rotation
Hi Dennis Handly!Thanks
how send a signal to it to restart the this log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2007 09:40 PM
08-21-2007 09:40 PM
Re: trim large log file
I can't see that. Is there a kmine number in it?
Perhaps the document was written that way as a kindness to users of scummy C shell?
Using ">" doesn't require creating another process. Using cp or cat does.
>how send a signal to it to restart the this log
I don't know if weblogic supports this convention. You should read the documentation. But if you know the PID:
# kill -HUP PID
- Tags:
- scummy C shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 01:11 AM
08-22-2007 01:11 AM
Re: trim large log file
> wls_production.log
as root?
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 01:38 AM
08-22-2007 01:38 AM
Re: trim large log file
have you tried:
cat /dev/null > wls_production.log
be sure to fully qualify the path to wls_production.log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 02:04 AM
08-22-2007 02:04 AM
Re: trim large log file
you may have to see if this file is being held by any process
#fuser -fu wls_production.log
Ensure that no users are holding this file becoz doing a trim while a file is use may create a open file.
If no user us holding the file
Go to the directory of the log do a
#cat /dev/null > wls_production.log
This should work
Try ur luck :)
Cheers
Vijay
Like it or worked !! Click kudos !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2007 05:47 AM
08-22-2007 05:47 AM