0

We use powershell scripts on some sles 12 vms for testing purposes. The scripts are automatically started from a windows server. Now I see that every call of a single script starts a new instance of omiagent. That is ok, but the agents never exit. So the memory usage increases until the vms start swapping.

Does anybody know that problem and can tell a solution?

BTW: Calling the scripts per ssh is not a solution, because we transfer complex hashtables between the machines.

Tobias Wollgam
  • 101
  • 1
  • 1
  • 4
  • Please update with code that can reproduce the event. – Colyn1337 Dec 12 '19 at 22:21
  • @Colyn1337 sorry, I am not sure what you do request. On the caller side we use `InvokeCommand` and I think the content of the called script does not matter. A simple `Write-Host` should do. If this is the missing information I will test it and update the question. – Tobias Wollgam Dec 12 '19 at 23:06
  • Today I found this issue https://github.com/Microsoft/omi/issues/580 . It explains the problem but does not help solving my problem. – Tobias Wollgam Dec 13 '19 at 09:01

1 Answers1

0

It is not a solution but a workaround:

A script kills all processes with name omiagent but the last two startet. This script is started by cron every minute.

This workaround needs the following preconditions:

  • There are only a few remote calls per minute.
  • There are no parallel (or overlapping) remote calls.
Tobias Wollgam
  • 101
  • 1
  • 1
  • 4