Re: Manipulating journalctl output
On Fri, 3 Jan 2014 02:07:13 +0100 Suvayu Ali fatkasuvayu+li...@gmail.com wrote: This is very interesting, I would love to use that. But I don't think I understand how. What do I put in the crontab, how do I send this SIGUSR2 signal to journald? An easier method: /etc/systemd/journald.conf MaxFileSec=1week # what I use http://www.freedesktop.org/software/systemd/man/journald.conf.html ___ Regards, Frank www.frankly3d.com -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Fri, Jan 03, 2014 at 02:01:26AM +, Tom H wrote: On Fri, Jan 3, 2014 at 1:12 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Thu, Jan 02, 2014 at 04:52:01PM +, Tom H wrote: On Thu, Jan 2, 2014 at 10:32 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Thu, Jan 02, 2014 at 03:20:38AM +, Tom H wrote: On Thu, Jan 2, 2014 at 3:00 AM, Tom H tomh0...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv Sorry. Just thought that I'd try it and it turms out that it takes the facility as a number not as a name, so SYSLOG_FACILITY=10. Thank you! This will be very helpful. Where is this documented? I could not find this information in journalctl(1) or systemd.jounal-fields(7); did I miss some other docs? That SYSLOG_FACILITY has to be a number is from systemd.jounal-fields(7). No, I mean which number corresponds to what facility. I don't even know where to find a comprehensive list of all the facilities. Okay I think while writing the email I found the list of facilities in logger(1); but I still do not know where I can find the mapping between these facilities with the numbers accepted by SYSLOG_FACILITY. Sorry, misunderstood you... Via google: http://wiki.gentoo.org/wiki/Rsyslog Thank you Tom. As ever, Gentoo Arch has the best documentation again! -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Fri, Jan 3, 2014 at 3:44 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Fri, Jan 03, 2014 at 02:01:26AM +, Tom H wrote: Via google: http://wiki.gentoo.org/wiki/Rsyslog Thank you Tom. As ever, Gentoo Arch has the best documentation again! You're welcome. They do have excellent documentation! But in this case they both have mistakes. Gentoo says that 10 corresponds to security but security is an old alias of auth. 10 should be listed as corresponding to authpriv. Arch doesn't say that 9 corresponds to cron, even though the explanation is that it corresponds to a clock daemon, and that it actually corresponds to 9. You can look it up in syslog.h as someone pointed out earlier or you can edit rsyslog.conf for rsyslog to print out the facilities in their word and number forms in the logs. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
Hi Tony, On Thu, Jan 02, 2014 at 10:16:07PM -0500, Tony Nelson wrote: On 14-01-02 20:12:28, Suvayu Ali wrote: On Thu, Jan 02, 2014 at 04:52:01PM +, Tom H wrote: ... That SYSLOG_FACILITY has to be a number is from systemd.jounal-fields(7). No, I mean which number corresponds to what facility. I don't even know where to find a comprehensive list of all the facilities. Okay I think while writing the email I found the list of facilities in logger(1); but I still do not know where I can find the mapping between these facilities with the numbers accepted by SYSLOG_FACILITY. From `man 3 syslog`, syslog.h, so `locate syslog` and: /usr/include/sys/syslog.h Indeed, looking at the source is the only way to get this information. It is a bit ridiculous I think, all this hoopla about making it easier for the non-technical user, and then the useful docs happen to be in a header file owned by glibc-headers! Thanks a lot for pointing it to me. :) -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On 14-01-03 15:40:11, Suvayu Ali wrote: Hi Tony, On Thu, Jan 02, 2014 at 10:16:07PM -0500, Tony Nelson wrote: ... From `man 3 syslog`, syslog.h, so `locate syslog` and: /usr/include/sys/syslog.h Indeed, looking at the source is the only way to get this information. It is a bit ridiculous I think, all this hoopla about making it easier for the non-technical user, and then the useful docs happen to be in a header file owned by glibc-headers! Yup. Thanks a lot for pointing it to me. You're welcome. -- TonyN.:' mailto:tonynel...@georgeanelson.com ' http://www.georgeanelson.com/ -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
Hi On Fri, Jan 3, 2014 at 3:40 PM, Suvayu Ali wrote: Indeed, looking at the source is the only way to get this information. It is a bit ridiculous I think, all this hoopla about making it easier for the non-technical user, and then the useful docs happen to be in a header file owned by glibc-headers! File a bug report and one of the systemd developers can clarify the man page. I agree that the current documentation is too brief Rahul -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On 02.01.2014 00:08, Suvayu Ali wrote: On Wed, Jan 01, 2014 at 11:52:04PM +0100, Mateusz Marzantowicz wrote: On 01.01.2014 20:57, Suvayu Ali wrote: Now my questions: 1. How can I filter messages printed to the logs from my cron jobs? I will try to explain by example: $ journalctl -ru crond --since=-3d -- Logs begin at Sun 2013-11-17 02:48:46 CET, end at Wed 2014-01-01 20:31:27 CET. -- # journalctl -u crond.service Do it as root, and add .service suffix to crond. Bash completion is your friend here, hitting TAB twice after -u option will give you units that are recognized. journalctl is user-aware and show only what's appropriate. Actually, if I'm in the systemd-journal group it is equivalent. That said, I get the same output as root. I use bash-completion, and the .service is optional when used with -u (as I mentioned in my email). I tried with and without the .service. It works both ways for sendmail, just not crond. Cheers, OK, so it might be something else (maybe cron not producing log messages?) I know it doesn't help much but in my case - it works - and I get plenty of crond messages. I don't have sendmail installed so I have no associated log messages. Mateusz Marzantowicz -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Thu, Jan 02, 2014 at 03:20:38AM +, Tom H wrote: On Thu, Jan 2, 2014 at 3:00 AM, Tom H tomh0...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv Sorry. Just thought that I'd try it and it turms out that it takes the facility as a number not as a name, so SYSLOG_FACILITY=10. Thank you! This will be very helpful. Where is this documented? I could not find this information in journalctl(1) or systemd.jounal-fields(7); did I miss some other docs? -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Wed, 1 Jan 2014 20:57:38 +0100 Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 1. If your journal size is large, piping to grep is quite a bit slow. http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html SIGUSR2 ## crontab -e weekly rotate (or your preference), help keep it manageable ___ Regards, Frank www.frankly3d.com -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Thu, Jan 2, 2014 at 10:32 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Thu, Jan 02, 2014 at 03:20:38AM +, Tom H wrote: On Thu, Jan 2, 2014 at 3:00 AM, Tom H tomh0...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv Sorry. Just thought that I'd try it and it turms out that it takes the facility as a number not as a name, so SYSLOG_FACILITY=10. Thank you! This will be very helpful. Where is this documented? I could not find this information in journalctl(1) or systemd.jounal-fields(7); did I miss some other docs? That SYSLOG_FACILITY has to be a number is from systemd.jounal-fields(7). -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
Hi Frank, On Thu, Jan 02, 2014 at 11:15:38AM +, Frank Murphy wrote: On Wed, 1 Jan 2014 20:57:38 +0100 Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 1. If your journal size is large, piping to grep is quite a bit slow. http://www.freedesktop.org/software/systemd/man/systemd-journald.service.html SIGUSR2 ## crontab -e weekly rotate (or your preference), help keep it manageable This is very interesting, I would love to use that. But I don't think I understand how. What do I put in the crontab, how do I send this SIGUSR2 signal to journald? -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Thu, Jan 02, 2014 at 04:52:01PM +, Tom H wrote: On Thu, Jan 2, 2014 at 10:32 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Thu, Jan 02, 2014 at 03:20:38AM +, Tom H wrote: On Thu, Jan 2, 2014 at 3:00 AM, Tom H tomh0...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv Sorry. Just thought that I'd try it and it turms out that it takes the facility as a number not as a name, so SYSLOG_FACILITY=10. Thank you! This will be very helpful. Where is this documented? I could not find this information in journalctl(1) or systemd.jounal-fields(7); did I miss some other docs? That SYSLOG_FACILITY has to be a number is from systemd.jounal-fields(7). No, I mean which number corresponds to what facility. I don't even know where to find a comprehensive list of all the facilities. Okay I think while writing the email I found the list of facilities in logger(1); but I still do not know where I can find the mapping between these facilities with the numbers accepted by SYSLOG_FACILITY. -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Fri, Jan 3, 2014 at 1:12 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Thu, Jan 02, 2014 at 04:52:01PM +, Tom H wrote: On Thu, Jan 2, 2014 at 10:32 AM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: On Thu, Jan 02, 2014 at 03:20:38AM +, Tom H wrote: On Thu, Jan 2, 2014 at 3:00 AM, Tom H tomh0...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv Sorry. Just thought that I'd try it and it turms out that it takes the facility as a number not as a name, so SYSLOG_FACILITY=10. Thank you! This will be very helpful. Where is this documented? I could not find this information in journalctl(1) or systemd.jounal-fields(7); did I miss some other docs? That SYSLOG_FACILITY has to be a number is from systemd.jounal-fields(7). No, I mean which number corresponds to what facility. I don't even know where to find a comprehensive list of all the facilities. Okay I think while writing the email I found the list of facilities in logger(1); but I still do not know where I can find the mapping between these facilities with the numbers accepted by SYSLOG_FACILITY. Sorry, misunderstood you... Via google: http://wiki.gentoo.org/wiki/Rsyslog -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On 14-01-02 20:12:28, Suvayu Ali wrote: On Thu, Jan 02, 2014 at 04:52:01PM +, Tom H wrote: ... That SYSLOG_FACILITY has to be a number is from systemd.jounal-fields(7). No, I mean which number corresponds to what facility. I don't even know where to find a comprehensive list of all the facilities. Okay I think while writing the email I found the list of facilities in logger(1); but I still do not know where I can find the mapping between these facilities with the numbers accepted by SYSLOG_FACILITY. From `man 3 syslog`, syslog.h, so `locate syslog` and: /usr/include/sys/syslog.h -- TonyN.:' mailto:tonynel...@georgeanelson.com ' http://www.georgeanelson.com/ -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On 01.01.2014 20:57, Suvayu Ali wrote: Now my questions: 1. How can I filter messages printed to the logs from my cron jobs? I will try to explain by example: $ journalctl -ru crond --since=-3d -- Logs begin at Sun 2013-11-17 02:48:46 CET, end at Wed 2014-01-01 20:31:27 CET. -- # journalctl -u crond.service Do it as root, and add .service suffix to crond. Bash completion is your friend here, hitting TAB twice after -u option will give you units that are recognized. journalctl is user-aware and show only what's appropriate. Mateusz Marzantowicz -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Wed, Jan 01, 2014 at 11:52:04PM +0100, Mateusz Marzantowicz wrote: On 01.01.2014 20:57, Suvayu Ali wrote: Now my questions: 1. How can I filter messages printed to the logs from my cron jobs? I will try to explain by example: $ journalctl -ru crond --since=-3d -- Logs begin at Sun 2013-11-17 02:48:46 CET, end at Wed 2014-01-01 20:31:27 CET. -- # journalctl -u crond.service Do it as root, and add .service suffix to crond. Bash completion is your friend here, hitting TAB twice after -u option will give you units that are recognized. journalctl is user-aware and show only what's appropriate. Actually, if I'm in the systemd-journal group it is equivalent. That said, I get the same output as root. I use bash-completion, and the .service is optional when used with -u (as I mentioned in my email). I tried with and without the .service. It works both ways for sendmail, just not crond. Cheers, -- Suvayu Open source is the future. It sets us free. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Manipulating journalctl output
On Thu, Jan 2, 2014 at 3:00 AM, Tom H tomh0...@gmail.com wrote: On Wed, Jan 1, 2014 at 7:57 PM, Suvayu Ali fatkasuvayu+li...@gmail.com wrote: 2. I would like to filter logs that typically go into /var/log/secure (or other similar files); how do I do that? SYSLOG_FACILITY=authpriv Sorry. Just thought that I'd try it and it turms out that it takes the facility as a number not as a name, so SYSLOG_FACILITY=10. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org