- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: trimming files created by sar...
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-08-2003 10:43 AM
08-08-2003 10:43 AM
trimming files created by sar...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2003 10:47 AM
08-08-2003 10:47 AM
Re: trimming files created by sar...
Alternativly, if you make use of the /var/adm/sa directory for sar history, you can finfigure how many days of info ( number of files) to keep.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2003 10:49 AM
08-08-2003 10:49 AM
Re: trimming files created by sar...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2003 10:51 AM
08-08-2003 10:51 AM
Re: trimming files created by sar...
cp sar.out sar.out.`date +'%Y%m%d'`
/usr/contrib/bin/gzip sar.out.`date +'%Y%m%d'`
> sar.out
This way you don't lose any data.
HTH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2003 01:51 PM
08-08-2003 01:51 PM
Re: trimming files created by sar...
If what you are looking for is a way to get rid of files older than a week, or any period you choose, then that is a different thing than you are asking. If you want to collect data all day but only keep a few days worth then:
find /var/adm/sa -type f -mtime +7 -exec rm {} \:
This you can put in cron and have it run daily to get rid of the type f(ile) that are older than 7 days (mtime +7).
Good luck.