- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: create e.g. a logfile which is not increasing...
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
03-06-2001 05:09 AM
03-06-2001 05:09 AM
Does anyone know how to create a file which
e.g. has a max size of 100MB and is not increasing if data is written to it. Would be
helpful for logfiles which should not grow more
than a defined size.
Thanks for any help
Roger
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 05:21 AM
03-06-2001 05:21 AM
Re: create e.g. a logfile which is not increasing in size
Check manpage ulimit
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 12:15 PM
03-06-2001 12:15 PM
SolutionIf you want the file to continuously get updated, yet not grow beyond a certain size, I'm not sure ulimit is best. I think ulimit will just stop writing to the file after it grows too large. See the man page for sh-posix and search for ulimit to find out.
Anyway, attached is a simple (that is, crude and inefficient) script that will trim a file below a certain size. Drop it into a crontab and you will never have to worry about it again :).
--Bruce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 12:48 PM
03-06-2001 12:48 PM
Re: create e.g. a logfile which is not increasing in size
if you have an idea how fast the file grows you could actually setup a cronjob where the file will be renamed to log.1 or similiar and a new one will be touched.
Logfiles will always grow and some pretty fast, so it is up to you to determine what timeframe you need to empty the files.
Hope that helps a bit,
Steffi Jones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2001 04:30 PM
03-06-2001 04:30 PM