question

rahafmousa-5674 avatar image
0 Votes"
rahafmousa-5674 asked AlexZhu-MSFT edited

Disable scom 2019 tracing on Linux

Is there a way to disable creating trace files on Linux servers with scom agent? The trace file grows so fast to 4GB and sometimes it creates a backup file of the old trace then we have extra 5GB for example. We are not using the trace files and deleting them does not help because new ones are created.
We have scom 2019 running
The agent version is: scx-1.6.8-0
OS used: Red Hat Enterprise Linux Server release 7.9 (Maipo)
Files in log directory:
ls -lh /var/opt/omi/log/
total 4.0G
-rw-r--r--. 1 root root 42M Jul 15 21:06 omiagent.root.root.log
-rw-r--r--. 1 root root 540K Feb 16 2021 omiserver.log
-rw-r--r--. 1 omi omi 4.0G Aug 24 10:21 omiserver-recv.trc

the file that we would like to disable creating is omiserver-recv.trc

msc-operations-manager
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlexZhu-MSFT avatar image
1 Vote"
AlexZhu-MSFT answered AlexZhu-MSFT edited

Hi,

Thank you very much for getting back. As far as I know, once the agent is running, the file is generated. About what makes them grow fast, it is based on the application behavior and limited information can be found. Currently, it seems there is no way to disable the logs. And we can either delete the file in a schedule (for example, everyday) or limit its size by log rotation.

delete the file everyday at 08:40
40 8 * * * rm -rf /var/opt/omi/log/omiserver-recv.trc

to limit the size, we can modify the conf file
vi /etc/logrotate.d/omi

change the original one (highlight in the below screenshot)
/var/opt/omi/log/omiserver.log

to this one or anything equivalent
/var/opt/omi/log/*.log /var/opt/omi/log/*.trc

126666-scom-linux-trace-log-03.png



Alex
If the response is helpful, please click "Accept Answer" and upvote it.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlexZhu-MSFT avatar image
1 Vote"
AlexZhu-MSFT answered AlexZhu-MSFT edited

Hi,

It seems we are unable to disable the trace log in SCOM agent way (we will try to deliver this information to the product team and hope they can add this feature in future release if it is not available now). However, we can do this in the Linux OS level using cron

For example, we may delete this file at 8:40 every Thursday.
crontab -e
40 8 * * 4 rm -rf /var/opt/omi/log/omiserver-recv.trc

Here's the lab test screenshot for your reference.

126571-scom-linux-trace-log-02.png


Alex
If the response is helpful, please click "Accept Answer" and upvote it.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you for your answer. cron is partially helpful. I don't actually understand the behaviour of the agent relating to these trace files, like when are they created and what makes them grow fast, maybe if you can answer me then I can create a suitable cron job to delete the files, becasue we have a backup service running that fails if the partition is full and that's happening very often because of the trace files and I'm not sure if I delete the file when will it be created again and how much space will it be have taken.

0 Votes 0 ·