<p dir="ltr"><br>
On Jan 3, 2014 4:08 AM, "Lars E. Pettersson" <<a href="mailto:lars@homer.se">lars@homer.se</a>> wrote:<br>
><br>
> On 01/03/2014 05:07 AM, Pete Travis wrote:<br>
>><br>
>> I think there was some misunderstanding here. If you can't find your<br>
>> cronjob output in the journal, *your* cron is broken.<br>
><br>
><br>
> Default installation:<br>
><br>
> [root@tux ~]# rpm -V cronie<br>
> [root@tux ~]# rpm -q cronie<br>
> cronie-1.4.11-4.fc20.x86_64<br>
> [root@tux ~]# rpm -V crontabs<br>
> [root@tux ~]# rpm -q crontabs<br>
> crontabs-1.11-7.20130830git.fc20.noarch<br>
><br>
><br>
>> Before I get too<br>
>> far in, in my opinion, mails are good for notification, voluminous<br>
>> content should be in the logs that the mail notifies about. The journal<br>
>> is good at logs.<br>
><br>
><br>
> Mail has no problem handling voluminous content. It is also very easy to retrieve without knowing quite a lot of strange options to a command that you have to print in a terminal.<br>
></p>
<p dir="ltr">Yes, we know you prefer mail... Mail on the command line is exactly what you describe - it requires knowing esoteric command line options to an awkward terminal application. Two unfamiliar and clunky terminal applications for the purpose would be redundant, so one is gone.</p>
<p dir="ltr">><br>
>> $ journalctl SYSLOG_IDENTIFIER=CROND -f #filtered for convenience<br>
><br>
><br>
> Where is my output from yum-cron (yum-cron is run hourly and it has a fault at the moment due to spots Chrome repository not yet being up to Fedora 20)?<br>
><br>
> [root@tux ~]# journalctl SYSLOG_IDENTIFIER=CROND --since=-2h<br>
> -- Logs begin at Tue 2013-07-02 20:53:56 CEST, end at Fri 2014-01-03 11:40:01 CE<br>
> Jan 03 09:50:01 tux CROND[3666]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 10:00:01 tux CROND[3895]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 10:01:01 tux CROND[4044]: (root) CMD (run-parts /etc/cron.hourly)<br>
> Jan 03 10:10:01 tux CROND[4358]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 10:20:01 tux CROND[5345]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 10:30:01 tux CROND[5521]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 10:40:01 tux CROND[5790]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 10:50:01 tux CROND[6135]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 11:00:01 tux CROND[6388]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 11:01:01 tux CROND[6541]: (root) CMD (run-parts /etc/cron.hourly)<br>
> Jan 03 11:10:01 tux CROND[6763]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 11:20:01 tux CROND[6963]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 11:30:01 tux CROND[7380]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
> Jan 03 11:40:01 tux CROND[7681]: (root) CMD (/usr/lib64/sa/sa1 1 1)<br>
></p>
<p dir="ltr">I see " CMD (run-parts /etc/cron.hourly", that could be where the magic happens. Maybe the output will show up with other filters, or it could be rewritten to use systemd-cat. </p>
<p dir="ltr">><br>
>> But wait! These things could get all mixed up on a busy machine, you<br>
>> say! Let's take a closer look at a message:<br>
>><br>
>> MESSAGE=(pete) CMDOUT (New Things are Different.)<br>
><br>
> [lots of lines removed]<br>
>><br>
>> SYSLOG_IDENTIFIER=CROND<br>
>> _CMDLINE=/usr/sbin/CROND -n<br>
>> _BOOT_ID=0557929cbde247928f945d8b53a6e067<br>
><br>
><br>
> How is non technical user supposed to understand this? What command sequence did you use to get that output?<br>
></p>
<p dir="ltr">A non-technical user would either understand by example - the part you cut out - or, they are a nontechnical user and have no interest in such things .</p>
<p dir="ltr">><br>
>> $ journalctl SYSLOG_IDENTIFIER=CROND _AUDIT_SESSION=83 -b<br>
><br>
><br>
> How do you find out the _AUDIT_SESSION to use?<br>
><br>
I didn't guess. There was a straightforward and easy to follow example, but you removed it.</p>
<p dir="ltr">><br>
>> Stop! I don't want all that extra information, you say! `journalctl`<br>
>> should KNOW I'm not interested in the timestamp, or the hostname, or the<br>
>> name and PID of the reporting binary - just give me the message!<br>
>><br>
>> journalctl SYSLOG_IDENTIFIER=CROND _AUDIT_SESSION=83 -o cat<br>
>> (pete) CMD (LARSHAPPY="no"; if [[ "$LARSHAPPY" == "no" ]]; then echo -e<br>
>> "<This isn't the same.\nNew Th<br>
>> (pete) CMDOUT (This isn't the same.)<br>
>> (pete) CMDOUT (New Things are Different.)<br>
>> (pete) CMDOUT (Some people like the old thing.)<br>
><br>
><br>
> That is several messages. I want only one...</p>
<p dir="ltr">So what? If your entire complaint is "it isn't a mail" then send the mail and be done.</p>
<p dir="ltr">><br>
> How am I notified that I should look in the journal when things go wrong? (With mail I am notified and also get the "log" lines all at once)<br>
></p>
<p dir="ltr">How is a nontechnical desktop user notified of new mail? That's rhetorical, don't answer. They aren't .</p>
<p dir="ltr">><br>
>> I'll agree that this isn't as *simple* as banging out a four letter word<br>
>> and reading message, but the journal can provide context, too.<br>
><br>
><br>
> I am not arguing whether the journal is good or not, I am arguing whether removing the MTA used to send mail, sent from some applications, is good or bad. As I see it, as long as some applications do send mail, we have to have a MTA. Or at least let those applications have a requirement of a MTA so that the MTA is installed when those applications are installed on the system. That is my key argument, not that the journal is bad.<br>
><br>
> The journal is OK, but very hard for a non technical user to use. What is needed is probably a very good graphical frontend that hides all these strange things you show us in your mail. How is a non technical user supposed to understand all this?<br>
></p>
<p dir="ltr">OK, then, your argument is late and pointless. Appeal to fesco if you feel strongly about adding sendmail to the default installation, such decisions are not made on the user support list.</p>
<p dir="ltr">><br>
>> You're putting lots of effort into complaining about a hugely useful<br>
>> tool, and apparently little into learning about it. If the complaint is<br>
>> about cronjobs, start here:<br>
><br>
><br>
> I am not complaining about the journal. But please let us know where to find a "journal for dummies" text where we can find out how to become journal experts. The man page is a bit sparse on information.<br>
><br>
><br>
>> Of course, if you like the old way, you can just install and configure<br>
>> an MTA.<br>
><br>
><br>
> I have to as long as some applications use that path to send messages to me. The same thing goes for all others installing these applications. Without a MTA these messages are lost in bit space.<br>
><br>
><br>
> Lars<br>
> -- </p>
<p dir="ltr">More "I like using mail" ranting here. That's fine, use mail. I just wanted to point out how to use the journal, so I'm done here.</p>
<p dir="ltr">--Pete</p>