From owner-freebsd-questions Tue Aug 1 5:57:30 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail-in-02.piro.net (mail-out-01.piro.net [194.64.31.11]) by hub.freebsd.org (Postfix) with ESMTP id 655A137BB2F for ; Tue, 1 Aug 2000 05:57:26 -0700 (PDT) (envelope-from marc.vanwoerkom@science-factory.com) Received: from nil.science-factory.com (ScienceFactory-atm1-153.piro.net [195.135.137.205]) by mail-in-02.piro.net (8.9.3/8.9.3/PN-991208) with ESMTP id OAA07515; Tue, 1 Aug 2000 14:57:24 +0200 Received: by nil.science-factory.com (Postfix, from userid 501) id 11AA61F63; Tue, 1 Aug 2000 14:52:04 +0200 (CEST) From: Marc van Woerkom To: support@succeedsystems.co.uk Cc: freebsd-questions@FreeBSD.ORG In-reply-to: <000201bffb9c$56fdb240$3011fea9@accountsoffice> (support@succeedsystems.co.uk) Subject: Re: Detailed reporting ... References: <000201bffb9c$56fdb240$3011fea9@accountsoffice> Message-Id: <20000801125204.11AA61F63@nil.science-factory.com> Date: Tue, 1 Aug 2000 14:52:04 +0200 (CEST) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I am new to Cron but believe I can use this to schedule with little = > trouble - my difficulty is what command to use or what program to = > invoke/install to do the job. Yep. Roughly speaking, once you figured out how to do the job from the commandline you can tell crond to issue that command at certain defined times. crond will run the command and email you its output. > I would like daily the following reports e-mail to me: > > adduse > maillog.0.gz (a zipped archive after log-file is turned-over) > access log for the last 24 hours only (so I can see who is using = > how-much bandwidth). adduse (adduser?) might be covered by the scripts that do the daily security reports. (Have a look at /etc/periodic for these matters) maillog.0.gz you have to ASCII-fy (uuencode command or base64 encode command from the mime package) - and either directly pipe that output through mail mail user@host < `uuencode ..` or let the output be captured by crond. Play a bit with that stuff and you will know. For the access log I would suggest a rotation scheme every 24 hours and mail the complete thing, otherwise you have to figure how to extract just the part of the log from today on. Again, if you figured out how to do it in your shell, just that as command for crond. Regards, Marc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message