- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- prevent file size is too large
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-02-2005 01:45 PM
03-02-2005 01:45 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 02:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 02:27 PM
03-02-2005 02:27 PM
Re: prevent file size is too large
if I am not mis-understand your solution , the system can't generate any file to a limited size ( eg. 2G ) , but i don't want that , I just want to restrict some specifc file size not all files , can I do that ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 03:43 PM
03-02-2005 03:43 PM
Re: prevent file size is too large
If the logs generated is not important you can try to cron a script that deletes the files.
cat /dev/null > logfile
or you can cron a script that rename/move the file to another filesystem.
mv logfile /newdir/logfile.old
Regards,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 05:05 PM
03-02-2005 05:05 PM
Re: prevent file size is too large
but my problem is the log size is increased when the user is testing something , so the log will be increased very fast , I want to limit the size to prevent the system crash suddenly when the log size become too large ( when we are unatteded ) .
thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 05:17 PM
03-02-2005 05:17 PM
Re: prevent file size is too large
What filesystem is the log located? is it in the / filesystem?
I am running out of suggestions, I hope the guru's have better idea.
Regards,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 05:28 PM
03-02-2005 05:28 PM
Re: prevent file size is too large
the size will be increased until system full within 1 hour (some testing program will generate unlimited files to the system), so I think I can't move it or delete it before system is crashed . thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2005 07:40 PM
03-02-2005 07:40 PM
Re: prevent file size is too large
Your best bet would be to run an occassional cron script that would mv and gzip the file (an ascii log should zip-up to small size). Then re-touch the logfile. A ksh example follows:
#!/bin/ksh
DATE=`date +%m%d%H%M`
mv /location/mylogfile /location/mylogfile.$DATE
touch /location/mylogfile
gzip /location/mylogfile.$DATE
Keith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2005 05:15 AM
03-04-2005 05:15 AM
Re: prevent file size is too large
Regards
Andrew