Operating System - HP-UX
1834484 Members
3992 Online
110067 Solutions
New Discussion

Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

 
SOLVED
Go to solution
Jack C. Mahaffey
Super Advisor

Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

I've got over 900 files accumulated in /var/opt/hparray/log over the last two years. How do I read them and can they be deleted?

Thanks...
7 REPLIES 7
Jitendra_1
Trusted Contributor

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

You can get rid of most of the old files using a
find ./ -mtime +30 -exec rm {} \;
command . this will just keep one month old files in the directory if you ever need them . Other option is just back them off to a tape using tar and then remove from the directory.
Learning is the Key!
Rita C Workman
Honored Contributor

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

Log files are created so you can go back and read what's been happening and determine what you need to do (if anything). If your files are over 2 years old...I doubt you need them. To remove the older ones you could try something like this:
find /var/opt/hparray/log -name -type f -mtime +15 -exec rm {} \;

Here's a thread that explains what these files are:
http://us-support.external.hp.com/cki/bin/doc.pl/sid=16897a7e0a09e1c8e2/screen=ckiDisplayDocument?docId=200000048194481

/rcw
Rita C Workman
Honored Contributor

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

...oops take out that -name

sorry,
/rcw
Philip P. Hartl
Valued Contributor
Solution

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

I addressed this issue with the response center and was told that it not advisable to remove subsets of the log files since they are tracked in the LOGCATLG file. HP sent this procedure for removeing hparray log files.

1. /sbin/init.d/hparray stop

2. mv /var/opt/hparray/log/* /tmp

3. touch /var/opt/hparray/log/LOGCATLG

4. /sbin/init.d/hparray start
Don't take life so seriously; nobody gets out alive.
Jack C. Mahaffey
Super Advisor

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

Thanks to all. I've adopted the approach of running /sbin/init.d/hparray stop, then deleteing the files, recreating the catalog and then restarting the daemon. I was worried about the affect of stopping the daemon. But it's apparently ok.


Thanks...
Tracey Hammer
Occasional Contributor

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

I used this procedure but had one problem. I was under the impression that I did not have to remove all files so I kept one year's woth. I assumed that after I clear the catalog file that restarting the daemon would recreate the catalog with entries for the log files that are still present in the log directory. When I run logprint I only the current date and time even though I have a years worth of logs files physically residing the log directory. Is my assumption wrong? Thnx
Robert-Jan Goossens
Honored Contributor

Re: Numerous log files in /var/opt/hparray/log - How do I read and can I delete them?

Tracey,

better to open a new call and add the weblink to the call.

Robert-jan.