Logging microseconds? us= numbers

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
wc
OpenVpn Newbie
Posts: 2
Joined: Wed Jul 13, 2022 6:13 pm

Logging microseconds? us= numbers

Post by wc » Wed Jul 13, 2022 6:18 pm

I was reviewing my logs and thought they looked a little noisy.....

Jul 13 13:11:04 asdf openvpn: Wed Jul 13 13:11:04 2022 us=429137 dddd/72.8.1.1:59385 Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
Jul 13 13:11:04 asdf openvpn: Wed Jul 13 13:11:04 2022 us=429217 dddd/72.8.1.1:59385 Incoming Data Channel: Cipher 'BF-CBC' initialized with 128 bit key
Jul 13 13:11:04 asdf openvpn: Wed Jul 13 13:11:04 2022 us=429235 dddd/72.8.1.1:59385 WARNING: blahblah

How do I prevent the duplicate timestamp?
How do I suppress the us= field (logging microseconds)?

Are those microseconds since the logged action started? Or the duration that logged action took? Or is it meant as a decimal after the second field of the timestamp, 04 in this example?

wc
OpenVpn Newbie
Posts: 2
Joined: Wed Jul 13, 2022 6:13 pm

[SOLVED] Re: Logging microseconds? us= numbers

Post by wc » Wed Jul 13, 2022 6:43 pm

Maybe solved my own problem:
referencing https://medium.com/@Dylan.Wang/enable-o ... dd7bb186b8 I found my systemd script

find /etc/systemd | grep vpn
exited the Exec line to add "--suppress-timestamps" as the first arg
then ran
# systemctl daemon-reload
# systemctl restart <servicname>

(servicename was the basename of file that I edited)

I'm a little disappointed that I couldn't make this change in a conf file, but oh well. And suppressing it made the us= statements go away, implying they were a decimal after the second place.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Logging microseconds? us= numbers

Post by TinCanTech » Wed Jul 13, 2022 6:46 pm

You can use --suppress-timestamps and/or --machine-readable-output

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Logging microseconds? us= numbers

Post by TinCanTech » Wed Jul 13, 2022 6:58 pm

wc wrote:
Wed Jul 13, 2022 6:43 pm
I'm a little disappointed that I couldn't make this change in a conf file
You can ..

Post Reply