Page 2 of 2

Re: MXdiags when run as server

Posted: Fri 21 Aug 2020 10:24 am
by mcrossley
The connection is not timed out. It will run as long as the network is up, or your browser window doesn't "sleep"

Re: MXdiags when run as server

Posted: Tue 25 Aug 2020 5:14 pm
by rogerthn
mcrossley wrote: Thu 20 Aug 2020 7:44 pm OK, I think a 20MB log should zip down to around 1MB if my calcs are correct.

I'll start with 20MB and see how that goes!
Successful log rotate :D

Code: Select all

2020-08-25 18:40:00.443 Rotating log file, new log file will be: 20200825-184000.txt
Size 20972354 bytes.

Re: MXdiags when run as server

Posted: Tue 25 Aug 2020 5:35 pm
by mcrossley
:thumbsup:

Re: MXdiags when run as server

Posted: Tue 25 Aug 2020 5:41 pm
by HansR
Works fine. One additional remark: maybe its useful to append to the existing log file at the start of CMX i.s.o. creating a new one? (in case of backup, testing or whatever would restart CMX more often than expected)

Re: MXdiags when run as server

Posted: Fri 27 Nov 2020 11:46 pm
by radilly
Phil23 wrote: Thu 20 Aug 2020 8:52 pm Random thought I had a few days back about the service was outputting data to a telnet port.

Don't know the implications; it just came to mind while opening a terminal connection to another device.

Phil.
FYI - Syslog is a fairly standard way to externalize logging. I tinkered with it for my gateway-router, but decided there wasn't much benefit for my usage.
https://en.wikipedia.org/wiki/Syslog

Re: MXdiags when run as server

Posted: Sat 28 Nov 2020 12:19 am
by radilly
FYI - I've been tinkering with logrotate on a Pi for some services I've written. It's a pretty widely used facility in Linux administration. I looked quickly but didn't spot a Windows port that was being actively maintained.

My logs, and I think the typical logrotate model are logs that get appended to across restarts. The rotating is independent of the service starts and stops.

Reference: https://linux.die.net/man/8/logrotate

I will say that when I wrote my own rotate function I would
  • rename the log
  • tail the renamed file to start the (new) log, like 100 lines
That creates some overlap that has been useful when the event would otherwise span 2 logs.


I couldn't spot how to enable this feature. Is it always on? Looks like my log runs roughly 100 KB / day when there are no issues, and I seem to be restarting often enough not to hit the limit.

Bob

Re: MXdiags when run as server

Posted: Sat 28 Nov 2020 12:30 am
by radilly
Oh, another Unixy model familiar to systemd users is journalctl. My services leverage the journal for error conditions, and keep their own detailed logs for info and debug messages as well. I use journalctl first, and dig into the full log if I want more context.

Ref: https://manpages.debian.org/stretch/sys ... .1.en.html