LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 07-15-2004, 02:43 PM   #1
ddyer
LQ Newbie
 
Registered: Jul 2004
Location: Watertown, NY
Posts: 4

Rep: Reputation: 0
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.
 
Old 07-15-2004, 02:46 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
I'd suggest a
Code:
file errpt
on the AIX to see whether it's just a script and not
a binary .. ;)

If it's a binary after all we'd need more detail on
what it's meant to do.


Cheers,
Tink
 
Old 07-16-2004, 08:42 AM   #3
ddyer
LQ Newbie
 
Registered: Jul 2004
Location: Watertown, NY
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 07-16-2004, 09:21 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
Old 07-19-2004, 06:58 AM   #5
ddyer
LQ Newbie
 
Registered: Jul 2004
Location: Watertown, NY
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
Old 07-19-2004, 01:16 PM   #6
ddyer
LQ Newbie
 
Registered: Jul 2004
Location: Watertown, NY
Posts: 4

Original Poster
Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux equivilent to Window's "system tray"? TippyToes Linux - General 18 07-17-2005 08:08 AM
An "Acess Diver" equivilent in Linux? jon_k Linux - Security 2 06-26-2005 02:25 PM
Linux Equivilent to msconfig/services.msc? kompact Linux - Newbie 4 04-23-2005 10:40 AM
what is equivilent to graphics.h in linux? lramos85 Programming 4 05-05-2004 02:13 PM
The Linux Equivilent of Yz Dock thebear Linux - General 6 10-28-2003 01:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration