Re: tool-stats: strptime failed

2018-04-09 Thread Joerg Jung
> On 2. Apr 2018, at 21:57, Denis  wrote:
> 
> One minor problem with "Bonus: tool-stats script" from the tutorial.
> 
> # cat /scripts/log-stat.sh
> 
> #!/bin/sh
> 
> /usr/bin/zcat /var/log/maillog.*.gz \
>| /usr/local/bin/tool-stats \
>| /usr/bin/mail -s "smtpd log report" root
> 
> returns:
> 
> tool-stats: strptime failed line 1: Undefined error: 0
> tool-stats: strptime failed line 44: Undefined error: 0
> tool-stats: strptime failed line 45: Undefined error: 0
> 
> Does somebody have fixed the errors from it?

No.

> It seems to be a problem with newsyslog timestamps like these:
> 
> 2018-01-25T10:08:12.912Z mail newsyslog[8703]: logfile turned over

Yes, known problem. Github issue already open. PR/diff/fix welcome.


-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



tool-stats: strptime failed

2018-04-02 Thread Denis
One minor problem with "Bonus: tool-stats script" from the tutorial.

# cat /scripts/log-stat.sh

#!/bin/sh

/usr/bin/zcat /var/log/maillog.*.gz \
| /usr/local/bin/tool-stats \
| /usr/bin/mail -s "smtpd log report" root

returns:

tool-stats: strptime failed line 1: Undefined error: 0
tool-stats: strptime failed line 44: Undefined error: 0
tool-stats: strptime failed line 45: Undefined error: 0

Does somebody have fixed the errors from it?

It seems to be a problem with newsyslog timestamps like these:

2018-01-25T10:08:12.912Z mail newsyslog[8703]: logfile turned over


-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org