Operating System - Linux
1752798 Members
5808 Online
108789 Solutions
New Discussion юеВ

Re: cron job every minute increases root file size, it is going to be full if continues

 
SOLVED
Go to solution
Vitaly Karasik_1
Honored Contributor

Re: cron job every minute increases root file size, it is going to be full if continues

in short, this crontab line seems OK to me.
What do you have inside of script_del?

which files do you have into lvol3? oracle DBs, logs, indexes?

check open files by

lsof |grep pp3
George_206
Frequent Advisor

Re: cron job every minute increases root file size, it is going to be full if continues

lsof is not installed and I cannot install it
Vitaly Karasik_1
Honored Contributor

Re: cron job every minute increases root file size, it is going to be full if continues

OK, let's continue without lsof.

start monitor pps3 filesystem as I suggested.

In addition - I guess that "script_del" is cleaning out old files/logs.
How you do it? You should be aware that you cannot just remove files which is opened by some running process. In this case application is continues to write to the inode even file is deleted.

Can you compare and send us output of "du -s /pp3" and "df /pp3"?
George_206
Frequent Advisor

Re: cron job every minute increases root file size, it is going to be full if continues

Actually a part of the script is below. It is not the most efficient but it is a first approach.

In brief, I have an input file with some records which may occur many times. What I want is to remove every line which is more than three time in the input file and create a new file with the deleted record.

I have thus created the following script by creating some temp files. Perhaps this is not the correct way to handle temp files.


#count number of string occurence in CA file
#and if > than 3 create a record in CA1 file

sort -k 1 /pp3/input >> /pp3/input.sorted
uniq -c /pp3/input.sorted >> /pp3/input.sorted.uniq

awk '{if ($1>2) print $2}' /pp3/input.sorted.uniq >> /pp3test/output.uniq

awk '{print $2}' /pp3/input.sorted.uniq >> /pp3/input.sorted.uniq1

awk -F"|" '
BEGIN {
while( getline < "/pp3/output.uniq" )
{ arr[$0]=1 }
}
arr[$0] != 1 { print }
' /pp3/input.sorted > /pp3/input.sorted1

rm /pp3/input.sorted.uniq
rm /pp3/input.sorted.uniq
rm /pp3/input.sorted
mv /pp3/input.sorted1 /pp3test/input.sorted
Vitaly Karasik_1
Honored Contributor

Re: cron job every minute increases root file size, it is going to be full if continues

it seems OK.

but anyway - can you check big & new files on /pp3 ?
James R. Ferguson
Acclaimed Contributor
Solution

Re: cron job every minute increases root file size, it is going to be full if continues

Hi George:

You have posted this thread in BOTH HP-UX and LINUX! That's not helpful and wastes effort:

http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1196439

Regards!

...JRF...
George_206
Frequent Advisor

Re: cron job every minute increases root file size, it is going to be full if continues

Yes, you are correct.
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.
George_206
Frequent Advisor

Re: cron job every minute increases root file size, it is going to be full if continues

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.