From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: How do I make 'btrfs scrub' report errors via email?
Date: Sun, 14 Jun 2015 03:56:48 +0000 (UTC) [thread overview]
Message-ID: <pan$54887$39475d2b$524c205c$69d440ea@cox.net> (raw)
In-Reply-To: CAL0=0H19M7JG4o4p55Li3tF4PeA-UXb8mURcSOdPLwxfL0c1DQ@mail.gmail.com
crocket posted on Sat, 13 Jun 2015 22:48:35 +0900 as excerpted:
> I can check the result of 'btrfs scrub' later, but I don't want to take
> time to actually check it.
> Does anyone know how to make 'btrfs scrub' report errors via email?
> It seems google doesn't know.
You'd throw together a script to do it, or, if you're running it as a
cronjob, cron normally already has the ability to mail output elsewhere.
Similarly, systemd timer jobs normally start service units, which will
normally log to journald and possibly from journald to a more
conventional syslog daemon (I'm running syslog-ng here), and those logs
can be mailed, often after being sorted.
Traditionally there was a sendmail executable (originally part of
sendmail, but many alternatives supplied a call-compatible binary) as
well, which could be called with an address to send to, along with the
message body, and sometimes other parameters as well. This standardized
things, and was generally what various daemons that mailed logs used to
send them. A script could call it as easy as cron and other daemons did,
so it was pretty easy to setup output/log mailings.
These days many people don't use a full mail system on the machine,
instead using a mail client or webmail, and all these daemons that can be
configured to send their output elsewhere very often aren't even setup
for it. But it's generally still possible, either using the traditional
sendmail executable, or by scripting a call to whatever mail client you
normally run, having it handle the message.
Meanwhile, it's likely someone here (not me) already has such a thing
setup and can post the script. Of course you'd have to adjust it to use
your own mail client, if different.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2015-06-14 3:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-13 13:48 How do I make 'btrfs scrub' report errors via email? crocket
2015-06-14 3:56 ` Duncan [this message]
2015-06-14 4:34 ` Rich Rauenzahn
2015-06-17 17:48 ` Marc MERLIN
[not found] ` <CAL0=0H0OtLOY0toMcLGtmj1s1TywuO2MDmfOcpR2vNzp_czoQQ@mail.gmail.com>
2015-06-18 1:23 ` Marc MERLIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='pan$54887$39475d2b$524c205c$69d440ea@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox