Need Linux equivilent of errpt
We are switching our web server from an ancient AIX box to a new Redhat Enterprise box. One of the daily scripts would look through the httpd error logs and email any errors to our webmaster. It used the errpt command to scrape the day's errors out of the report. I haven't been able to find a command that mimics this. How can we achieve this result on the new box? None of us work with Linux enough to say we actually know the system. We've been able to get by rewriting existing scripts, etc.
Thanks for any help or suggestions. |
I'd suggest a
Code:
file errpt a binary .. ;) If it's a binary after all we'd need more detail on what it's meant to do. Cheers, Tink |
It's a binary
Tink,
Thanks for helping with this. It is an AIX command (not sure if it dates back to pure UNIX or not). On the "translation" sites I've been able to find, they translate errpt to one of 3 Linux commands: cvsbug, bashbug or dmesg. Looking into those commands, though, they only seem to read system error logs at various times. I need the same sort of power, only with whatever error logs we want to point it at (httpd logs, in this case). Of course, maybe you know another way to strip out the errors from a particular day and email them to the webmaster. Perfectly willing to do this a different way, as long as it can be run by cron. Thanks again Dean |
Not knowing what structure exactly that log has I'd say
(wild guess) that either a perl-script or a shell-script (utilising awk, for example) would be suitable to do what you want ... errpt may be faster, though, since it's a binary (presumably written in C). If the files aren't TOO huge a shell-script should easily do, though, since grep and awk are C-compiled executables, too ... If you give me a data sample and highlight the info you need extracted I'm sure that myself or some other scripting pro can come up with some way of doing it :) Cheers, Tink |
I'll check
Thanks again, Tink.
I'll check with my boss to see if I can give you some samples of the logs on the new server with the types of info we want. Thanks Dean |
We're okay
Seems the one script we were trying to get running wasn't the one we really wanted. Another script does just grep out the contents and that one runs okay with some updates to some environment variables.
Thanks anyway. I'm sure I'll be back. Dean |
All times are GMT -5. The time now is 02:40 AM. |