- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lmit file size
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
02-23-2005 10:00 PM
02-23-2005 10:00 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 10:06 PM
02-23-2005 10:06 PM
Re: lmit file size
Or write a script that trims log files periodically.
> /var/adm/syslog/syslog.log
That trims the size to zero and saves a lot of space.
I have cron do this once a week with all big ugly, growing logs, if its important, I copy it off to tape before I do that.
If you were to try and limit the log by directing it to a small filesystem, you might find your system stops suddenly.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 11:27 PM
02-23-2005 11:27 PM
Re: lmit file size
-dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 11:27 PM
02-23-2005 11:27 PM
Re: lmit file size
-dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 11:31 PM
02-23-2005 11:31 PM
Re: lmit file size
-dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 11:51 PM
02-23-2005 11:51 PM
SolutionYou could monitor the size of log files and then execute an e-mail to the admin. Unfortunately, some log files can be missed during the setup. This is especially possible when new applications are loaded.
I suggest monitoring the filesystem space. Here is an excerpt from the "sec" script.
CHK_BDF () {
echo "CHK_BDF: Begin section code." >> $log_cur
bdf | grep -E "9.%|10.%" >> $log_cur
echo "CHK_BDF: End section code." >> $log_cur
}
This function lets me know when a filesystem reaches 90% or higher usage.
You could also use 'find' to search for any file over a certain size. That could get a little hairy depending on your environment.
find / -type f -size +# -exec ls -lad {} \;
where # is the size
If needed you can restrict the search to a directory or filesystem. See 'man find' for details.
-dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 03:40 AM
02-24-2005 03:40 AM
Re: lmit file size
Look at the following url:
http://packages.qa.debian.org/l/logrotate.html
Logrotate is a tool which will rotate your logfiles.
Regards
Darrel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 07:50 PM
02-24-2005 07:50 PM
Re: lmit file size
I check louis's solution , it is quite easy to use
I hv man the logrotate , it seems very good , but I am not too understand how to use it , I find the below example , I want to ask if I want to compress the /var/log/messages and mail to administrator when it reach 100M size , how to set it ? thx in advance.
# sample logrotate configuration file
compress
/var/log/messages {
rotate 5
weekly
postrotate
/sbin/killall -HUP syslogd
endscript
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2005 10:19 PM
02-27-2005 10:19 PM
Re: lmit file size
For messages you can set the following in the /etc/logrotate.conf file:
/var/adm/messages {
daily
size=1000k
rotate 4
}
Don't know if your messages file will be filled that much.
Regards
Darrel