Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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 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.
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 :)
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.