- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cron job allocates space in root file system
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
01-22-2008 11:37 PM
01-22-2008 11:37 PM
I have created the following cron job which runs every minute
0 9 * * * /pp3/script_del > /pp3/cron_out 2>&1
but every time it runs it allocates some kbytes in root file system. So if it runs for a couple of weeks root file system can become full. I cannot find how to resolve this.
Can anyone help?
Thanks.
George.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 12:16 AM
01-23-2008 12:16 AM
Re: cron job allocates space in root file system
Does the script leave anything in /tmp or /var/tmp?
It isn't /var/adm/wtmps, since cron not logged there.
It could be /var/adm/cron/log but that should be small.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 12:33 AM
01-23-2008 12:33 AM
Re: cron job allocates space in root file system
This does it once a day at 9:00 AM. If you really want it to run once a minute and are worried about the space in cron/log, you could start it up once, then use sleep to do it once a minute. And you would have to have it stop before the next restart. Possibly something like:
while true; do
HHMM=$(date +"%H%M")
if [[ $HOUR -gt 850 && $HHMM -lt 900 ]]; then
exit 0
fi
: do something here
# wait for 1 min
sleep $((1*60))
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 12:34 AM
01-23-2008 12:34 AM
Re: cron job allocates space in root file system
I checked /cron/log and deleted content but root fs is the same.
Do you think that it has to do with the script itsef? It actually monitors web server logs searching for patterns (eg. ip) and updates a DB through SQPLUS. INSERT staements are created on the fly acconrding to the data.
Can cron job be executed by another user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 12:51 AM
01-23-2008 12:51 AM
Re: cron job allocates space in root file system
(Because as you said, that's on /var.)
>Do you think that it has to do with the script itself?
It would have to be. The logs are on /var, even for syslog.
>updates a DB through SQPLUS.
I assume not on /?
>Can cron job be executed by another user?
Well, another copy of it can, since a crontab entry is just a script. In your case, just a line that invokes /pp3/script_del.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 12:57 AM
01-23-2008 12:57 AM
Re: cron job allocates space in root file system
/ (/dev/vg00/lvol3 ) : 12776 total i-nodes
9701 free i-nodes
3075 used i-nodes
31 % i-nodes used
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 01:03 AM
01-23-2008 01:03 AM
Re: cron job allocates space in root file system
Is this HFS or VXFS type of filesystem?
I wouldn't think for either it would make that much of a difference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 01:07 AM
01-23-2008 01:07 AM
Re: cron job allocates space in root file system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 07:57 AM
01-23-2008 07:57 AM
Re: cron job allocates space in root file system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 10:44 AM
01-23-2008 10:44 AM
SolutionYou have posted this thread in BOTH HP-UX and LINUX! That's not helpful and wastes effort:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1196448
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 10:40 PM
01-23-2008 10:40 PM
Re: cron job allocates space in root file system
The problem is that I intially posted in the Linux (but I wanted hp-ux) but I could not find it through the search, so I thought it was not actually posted.
But anyway, I think I have finally found the cause of the problem.
The problem is that in the HP9000 the audit option was ON, so the audit files were increasing every time the cron job was executed. Since the job includes several system commands, which are monitored by the audit, the problem was that a week after the root disk space (where the audit log was located) was significantly minimized.
So I turned the audit OFF and rotated the logs and now it seems that everything is OK.
Thanks everyone for your effort and immediate resonse. I do appreciate.
Now it's time to assign points!!!
Thanks.
George.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2008 10:46 PM
01-23-2008 10:46 PM
Re: cron job allocates space in root file system
So I turned the audit OFF and rotated the logs and now it seems that everything is OK.