3 ms·
Urgh logwatching actively pains me these days. So much waste string parsing what was originally binary data anyway. I'm starting to think that we need some agr
by XorNot 11y ago
Urgh logwatching actively pains me these days. So much waste string parsing what was originally binary data anyway.
I'm starting to think that we need some agreement where instead of logs, we just get apps to emit a stream of protocol buffers and a format string for the messages and data.
Which does make me wonder if you couldn't LD_PRELOAD something which replaced fprintf and the like...
- SwellJoe 11y ago"So much waste string parsing what was originally binary data anyway." "So much" is pretty imprecise. How much waste do you believe string parsing incurs in this case?
- superuser2 11y agoStreams of plain text are what UNIX was built on. If you want binary APIs, look outside the *nix family.
- Ao7bei3s 11y agoOr modernize the applications. Throw out the ad-hoc formats and parsers, replace them with machine-readable equivalents. For example, systemd finally provides a logging system that allows structured logging with key/value fields.
- baudehlo 11y agoYou can go the systemd route if you want, or just know the fact that parsing strings works, is mostly reliable, and really isn't as much overhead as people make it out to be. How many system profiles have identified it as a problem?
- zaroth 11y agoOf course if you can write the filter, it must be simple enough to script changes to iptables based on recent packet statistics directly. But often times you don't even know what domain is being connected to at the network layer. You need output from the process holding the connection key. And you want very clear separation from that task...