How to collect LENA troubleshooting information [Kaspersky Endpoint Agent for Linux]
This article applies to Endpoint Agent for Linux. To collect LENA debug or ANY traces, please follow this guide.
Default traces location is '/var/log/kaspersky/epagent/'
.
Default dumps location is '/tmp/agentdumps'
Public collect.sh script was updated to collect LENA-related information and gather these folder as well.
How to: enable LENA ANY traces
For KATA-EDR (on-premises) customers to tune LENA performance by exclusions, ANY level logs are required. To enable ANY logging:
-
Become root
sudo su -
-
Use one-liner to enable ANY tracing level:
sed -i
's/LENA_TRACE_LEVEL=none/LENA_TRACE_LEVEL=any/g'
/etc/opt/kaspersky/epagent/service.conf && systemctl restart epagent
-
Modify the config file
/etc/opt/kaspersky/epagent/service.conf
/etc/opt/kaspersky/epagent/service.confKESL_FIFO_PATH=/run/log/kesl-messages
AUDIT_FIFO_PATH=/run/log/audit-messages
LENA_TRACE_LEVEL=none <-- set any here instead of none
LENA_DUMPS=yes
-
Save the modided value.
Careful, CaSe sensitive values!
LENA_TRACE_LEVEL=any ← correct
LENA_TRACE_LEVEL=none ← correct
LENA_TRACE_LEVEL=ANY ← wrong
LENA_TRACE_LEVEL=None ← wrong
-
To apply changes, restart
epagent
servicesystemctl restart epagent
-
- Wait until the problematic behavior is reproduced;
-
Stop traces
/opt/kaspersky/epagent/sbin/lenactl --traces --off
-
Double-check that produced traces indeed contain ANY-level information use this command:
grep -q ANY /var/log/kaspersky/epagent/lena*;
if
[[ $? ==
0
]]; then echo
"ANY logs"
;
else
echo
"Not ANY :("
; fi
-
As an addition you can check for how long ANY traces were gathered like
grep -h ANY /var/log/kaspersky/epagent/lena* | awk
'{print $1}'
| cut -d
'.'
-f
1
| uniq
-
And as final accord you can check whether you gathered enough ANY traces to be analyzed and sneak-peek what processes are producing excess load
grep -ha
"from auditd"
/var/log/kaspersky/epagent/lena* | grep -oE
"\"exe\"\:\[\"[^\"]+\""
| sort | uniq -c | sort -nr | sed -e
's/$/\]/'
| grep -E
"[0-9]{3,}\s+\""
- Collect the produced logs and system information in one go using collect.sh script
How to: enable LENA debug traces
Debug traces take less space and are suitable for troubleshooting issues not-related to Performance or 3rd party compatibility.
-
Enable debug traces:
/opt/kaspersky/epagent/sbin/lenactl --traces --on
This method is not suitable for ANY traces and will override ANY traces level set previously by DEBUG value
- Wait for a while until the problematic behavior is reproduced;
-
Disable traces:
/opt/kaspersky/epagent/sbin/lenactl --traces --off
- Collect the produced logs and system information in one go using collect.sh script
How to: enable LENA log rotation
-
To add log rotation, add to
/etc/opt/kaspersky/epagent/service.conf
following strings:/etc/opt/kaspersky/epagent/service.confLENA_ROTATION_COUNT=
10
<-- set max number of log files
LENA_ROTATION_FILE_SIZE=100m <-- set the size of each file
-
To apply changes, restart
epagent
servicesystemctl restart epagent
0 Comments
Recommended Comments
There are no comments to display.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now