Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

errpt purging only current day and leave the other days.

Status
Not open for further replies.

lblauen

Technical User
Aug 13, 2002
69
How can I purge only one day and time from the errpt. The problem is every sunday at 22:00 we run backups. Because the system runs hacmp I get vpath open failures on the drives that are defined to the odm but not mounted. I just want to purge those errors but nothing else. That way if I get a vpath error the rest of the week I know I have a problem. And I can still see if I had that problem before since I only purge sunday nights errors on this. Any ideas?

I tried errclear -J VPATH_DEVICE_OFFLIN 30 this purged the errors older that 30 days. When I changed it to 1 it purged all the erros it found older that 1 day. This is not what I need. Maybe I need a script to do this. HELP please. Thanks
 
I guess I didn't make my self clear. I want to purge from the /var/adm/ras/errlog the entries. I know I can grep out what I don't want to see. I have a menu program that our operators run which they check the status of things on each aix system. This is hard coded and they can only run whats in the menu. They have no access to the systems other than that way. They run their checks 3 times a day everyday. What i need is if we get a failure say on monday it should be in the errlog. But if I get the error on sunday at 22:00 I want it purged. Thats cause the sunday at 22:00 error is bogus. Mondays error might be real. If I grep out the error I will not see the error that may happen on other days or through out the day.
 
Try this

sed /VPATH__DEVICE_OFFLIN/d | errpt

Regards
 
Try this

sed /VPATH_DEVICE_OFFLIN/d | errpt

Regards
 
Sorry

What i wrote doesn't work.
It must be like this:

errpt | sed /VPATH_DEVICE_OFFLIN/d

Regards
 
sorry but that didn't work either. Here is what I tried.
errpt | pg got me this:
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
so I typed this:
errpt -s 0904182902 | sed /ADSM_DD_LOG2/d
what I got was this:
5680E405 0904183102 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904183002 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904183002 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904183002 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904183002 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE
5680E405 0904182902 P H lb0 STORAGE SUBSYSTEM FAILURE

The informaion is still in the errpt. I need to purge just
the following lines by date 0904182902.


 
You can delete errpt entry by the errorID, with the command
errclear -j "5680E405" 0
you can't specify a timestamp with errclear
Sorry for my english......
 
If it were me, I'd do some alterations to the menu prog, depending on what sort of menu it is of course. If it is some sort of shell script thing, no problem, but a compiled binary would be out of the question unless you have the source. IBM Certified -- AIX 4.3 Obfuscation
 
Hello,
You can do errpt > errlog file for the week.
then errclear 0 it clears all the error log. You start with fresh error log.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top