GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- can i trim my pkg.sh.log when the pkg is running?
Operating System - HP-UX
1854699
Members
10241
Online
104102
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp
Knowledge Base
Discussions
Forums
Discussions
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
07-24-2007 01:53 PM
07-24-2007 01:53 PM
hi,i found my / is increasing these days,and it is beacause that the size of pkg.sh.log is increasing(the application is logging something to it time to time).i have checked the itrc forums for solutions,and i think the best way is to trim the pkg.sh.log periodicly. now what i am not sure is that when the pkg is running,can i trim the log file or not ?
i want to do followings:
cp pkg.sh.log /tmp/pkg.sh.log.bak(backup it)
vi pkg.sh.log (trim it)
is it feasible? thank you!
i want to do followings:
cp pkg.sh.log /tmp/pkg.sh.log.bak(backup it)
vi pkg.sh.log (trim it)
is it feasible? thank you!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 02:07 PM
07-24-2007 02:07 PM
Solution
The log file can be trimmed but:
1) Don't copy it to /tmp; /tmp is only intended for directly OS-related temporary files; /var/tmp is the normal location for application-related temporary files unless overridden by the TMPDIR variable.
2) Don't use vi; use Perl, sed, or awk to trim the file so that a scripted solution (possibly a cron'ed task) is possible.
1) Don't copy it to /tmp; /tmp is only intended for directly OS-related temporary files; /var/tmp is the normal location for application-related temporary files unless overridden by the TMPDIR variable.
2) Don't use vi; use Perl, sed, or awk to trim the file so that a scripted solution (possibly a cron'ed task) is possible.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 02:29 PM
07-24-2007 02:29 PM
Re: can i trim my pkg.sh.log when the pkg is running?
why not use vi ?
is there any disadvantage?
i donot to make it a cronjob but manually edit it.
thank you!
is there any disadvantage?
i donot to make it a cronjob but manually edit it.
thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2007 02:34 PM
07-24-2007 02:34 PM
Re: can i trim my pkg.sh.log when the pkg is running?
Because it is the goal of every administrator to do as little as possible. I would much rather have a smart script that looks for unusual messages and finding none then trims the log periodically. If it finds something interesting then it should alert you and take no action on the file itself.
Your systems should be self-monitoring and as automated as possible so that your time can be used for more productive tasks. The last thing I want to do is spend a lot of time manually editing a bunch of log files that essentially say "all is well".
Your systems should be self-monitoring and as automated as possible so that your time can be used for more productive tasks. The last thing I want to do is spend a lot of time manually editing a bunch of log files that essentially say "all is well".
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP