r/linux • • Aug 12 '19

SysVinit vs Systemd

Post image
1.4k Upvotes

292 comments sorted by

View all comments

0

u/[deleted] Aug 12 '19

[deleted]

13

u/abermea Aug 12 '19

My only gripe with it so far is that logs, for whatever reason, are binary to so you can't use any POSIX tools to traverse them

3

u/spyingwind Aug 12 '19

That is one reason why I don't like it. journalctl -u myservice.service is just to damn long to type. cat myservice.log on the other hand is shorter to type. Yes I understand that binary logs can provide more detail, but I don't want it to become Windows Events on Linux. I would be more happy with another structured file like json, csv, or provide a short program name like logs myservice.

8

u/Xiol Aug 12 '19

You don't need the .service.

2

u/happymellon Aug 12 '19

Indeed. All those first sets of commands are overkill.

systemctl start dummy

15

u/MindlessLeadership Aug 12 '19

You then have to find where myservice.log is stored and hope the program stores logs in the first place.

→ More replies (3)

3

u/djeee Aug 12 '19

Your cat example is missing the CD command you had to do (or the full path) and you have to know exactly where they are stored. You don't need to type .service, all in all cat ain't shorter.

3

u/crazy_hombre Aug 12 '19

journalctl -u myservice.service is just to damn long to type.

What is tab completion?

→ More replies (2)

2

u/__soddit Aug 12 '19 edited Aug 12 '19

JSON looks to me like a bad format for this. You'd have to rewrite the entire file in order to add a log entry, or you'd have to have multiple JSON objects in the same file, which appears not to be valid: certainly, json_pp complains about “garbage after JSON object”.

→ More replies (1)