Networking Forums

Networking Forums > Computer Networking > Linux Networking > logs

Reply
 
 
Adrian Inman
Guest
Posts: n/a

 
      08-30-2003, 12:29 PM
Anyone know how to script a cron job that will email logs on a weekly basis,
but still store them.

logrotate, rather annoyingly, uses email as a last resort only (at least as
far as I can see).
I want to rotate the logs on one schedule and email them on another. ie.
email whole week's log weekly, but still keep 8 weeks on the server.

Thanks in advance.


 
Reply With Quote
 
 
 
 
Bit Twister
Guest
Posts: n/a

 
      08-30-2003, 03:15 PM
On Sat, 30 Aug 2003 13:29:01 +0100, Adrian Inman wrote:
> Anyone know how to script a cron job that will email logs on a weekly basis,
> but still store them.
>
> logrotate, rather annoyingly, uses email as a last resort only (at least as
> far as I can see).
> I want to rotate the logs on one schedule and email them on another. ie.
> email whole week's log weekly, but still keep 8 weeks on the server.


Please read http://www.catb.org/~esr/faqs/smart-questions.html
This is not a networking question.

man cron
man crontab
man 5 crontab
man mail
man uuencode

Some light reading at http://www.tldp.org/LDP/abs/html/index.html
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      08-30-2003, 05:43 PM
Adrian Inman <(E-Mail Removed)> wrote:
> Anyone know how to script a cron job that will email logs on a weekly basis,
> but still store them.


$ uuencode /path_to/log_file logfile | mail -s "logfile" (E-Mail Removed)

$ man -k cron

Good luck

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
 
Reply With Quote
 
Adrian Inman
Guest
Posts: n/a

 
      08-31-2003, 01:05 AM
Sorry, but it kind of is, and the proper networking question I asked in
another post hasn't had any replies. Which is odd as this one has had two.


"Bit Twister" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sat, 30 Aug 2003 13:29:01 +0100, Adrian Inman wrote:
> > Anyone know how to script a cron job that will email logs on a weekly

basis,
> > but still store them.
> >
> > logrotate, rather annoyingly, uses email as a last resort only (at least

as
> > far as I can see).
> > I want to rotate the logs on one schedule and email them on another. ie.
> > email whole week's log weekly, but still keep 8 weeks on the server.

>
> Please read http://www.catb.org/~esr/faqs/smart-questions.html
> This is not a networking question.
>
> man cron
> man crontab
> man 5 crontab
> man mail
> man uuencode
>
> Some light reading at http://www.tldp.org/LDP/abs/html/index.html



 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      08-31-2003, 01:42 AM
On Sun, 31 Aug 2003 02:04:19 +0100, Adrian Inman wrote:
> Thanks, but I think you meant 'strings' intead of uuencode.


No, the logs are ascii and are compressed.
The binary files should not be mailed. You uuencode them.
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      08-31-2003, 06:59 AM
Adrian Inman <(E-Mail Removed)> wrote:
> Thanks, but I think you meant 'strings' intead of uuencode. But anyway,
> thanks for the pointer.


Nope, I wrote uuencode, that's what you can use among others to
attach some file from CLI to a mail.

'strings' is something different, the logs are plain ASCII, you don't
need strings....

STRINGS(1) GNU Development Tools STRINGS(1)

NAME
strings - print the strings of printable characters in files.

BTW
Please stop top-posting, thx.

--
Michael Heiming

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of SPAM
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dc logs in then out Sneakie Windows Networking 3 02-24-2009 05:21 AM
User logs bill Windows Networking 5 02-09-2009 12:23 AM
Event logs Alex Windows Networking 1 03-23-2008 12:08 PM
Help with VPN Logs Joe Windows Networking 0 01-23-2008 03:13 PM
MN-700 and Security Logs Jerry L Broadband Hardware 0 09-18-2004 12:55 AM



1 2 3 4 5 6 7 8 9 10 11