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?
Logging microseconds? us= numbers
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Jul 13, 2022 6:13 pm
[SOLVED] Re: Logging microseconds? us= numbers
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.
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.
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Logging microseconds? us= numbers
You can use --suppress-timestamps and/or --machine-readable-output
-
- OpenVPN Protagonist
- Posts: 11139
- Joined: Fri Jun 03, 2016 1:17 pm