Operating System - HP-UX
1833060 Members
2674 Online
110049 Solutions
New Discussion

Method to cleanup /var/opt/hparray/log weekly without shutdown?

 
Tony Barber
New Member

Method to cleanup /var/opt/hparray/log weekly without shutdown?

We have four HP Servers with the HP Disk Arraywith AutoRAID Model 12H. The directory /var/opt/hparray/log is now 250 Megabytes and growing. We have a 24 X 7 operation and it is difficult to get them to shutdown for a few hours.
-------------------------------------------
I found a procedure as follows:
1. Stop ARMServer daemon.
# /sbin/init.d/hparray stop
2. Backup /var/opt/hpparray/log to tape or other filesyatem.
3. Remove everything in array log directory:
# cd /var/hparray/log
# rm -i *
4. Create an empty catalog file in /var/opt/hparray/log
# touch /var/hparray/log/LOGCATLG
5. Restart the ARMServer:
# /sbin/init.d/hparray start
--------------------------------------------
Now for my question: Can the above procedure be run say weekly with cron without affecting the Oracle Datbase on the AutoRAID?



5 REPLIES 5
Rick Garland
Honored Contributor

Re: Method to cleanup /var/opt/hparray/log weekly without shutdown?

You could copy the log file to another name and then cat /dev/null > logfile. The log file is probably an open file so use the /dev/null to have it zero'ed out. You would still have a copy of the log saved off somewhere that you could gzip or compress and make this a part of a weekly rotation
Philip Chan_1
Respected Contributor

Re: Method to cleanup /var/opt/hparray/log weekly without shutdown?

Tony,

As long as you stopped the ARMServer first there will be no open files within the log directory. I don't see any reason why you CAN'T put the commands into a cron job. Also, the disk array hardware status will not be affected by this ARMServer process so it would not cause any problem to Oracle. Only the monitoring process will be unavailable for a while and that is all.

Regards,
Philip
Bill McNAMARA_1
Honored Contributor

Re: Method to cleanup /var/opt/hparray/log weekly without shutdown?

/opt/hparray/bin/arraylog -C -c
should do the job.

other than that have a look at the thread in sysadmin forum.

Later,
Bill
It works for me (tm)

Re: Method to cleanup /var/opt/hparray/log weekly without shutdown?

Bill,
I'm pretty much in the same situation as Tony.

I did the "/opt/hparray/bin/arraylog -C -c ". It does clear the log on the array itself (and
also disabled the logging feature). But, it didn't clean the log on HP-Ux at /var/opt/hparray/log.

For now, I manually monitor those files; Which is
not the best solution at all, anyways! I'll have to
do a script that clean them up once a while.

Chris
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures,will the right answers come out?' -- Charles Babbage
Dennis McManamon
Occasional Contributor

Re: Method to cleanup /var/opt/hparray/log weekly without shutdown?

Does anybody have an idea of how long we should keep the log files? I just trashed 1999 thru 2001 manually without backup. I know that the L000******
files are the array log entries but what the heck good are they. Last time I had a disk array problem, HP had me blow away the log files and the lock files (I stopped the ARMServer to do a firmware upgrade and it never say the drives after I brought it back up - definitely a soiled underware kind of day)