On 03/03/2016 02:24 PM, Per Jessen wrote:
Anton Aylward wrote:
On 03/03/2016 02:03 PM, Carlos E. R. wrote:
The important data on that command output is the number of lines, not the time it took to run. You are picking on the time, but that one is not important there.
Same answer. Don't use grep. Use the filtering power of journalctl.
Anton, sounds to me as if you're saying is "abandon what you have used for decades, there's a new syslog in town". You wanna search any other file, and e/grep is the answer - but if it's the journal, ah no. It really is not overly intuitive. Especially when the "filtering power of journalctl" is handicapped, backward and probably not used much.
You're playing yes-but games. Yes bit it isn't about time, its about number of entries Yes but it isn't about number of entries its about having to learn something new Yes but ... Where will this stop? Its not about 'grep', really. If I demonstrated that using 'awk' meant that you didn't have to run 'wc' you'd come up with some other "yes, but". I'm not arguing here about the power of grep or awk or piplelines, but about using journbalctl in an inapproriate manner. Journalsctl is not syslog. I've never tried sayin ghat it is, but only that it can do some of the job. You can't compare a indexed/has-chain record keeping system that sores a lot more information with a plain text file without any indexing in the way you've been trying. To have a level playing field you are going to have to create a full text index of everything in /var/log, or at the very elats a QUICK index, and then use the index system to find the rcords or step though the record chain, rather than acess the plain text file directly. Alternatively you could have systemd dump all its records, possibly in JSON form to show how more comprehensive they are than syslog entries, and use awk or egrep to scan that static text file. Yes you could use journalctl with the parameters I suggest and then run it though grep, but that's redundant. But stop playing yes-but. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org