1 2 Previous Next 20 Replies Latest reply on Oct 5, 2020 1:44 AM by Daniel Fischer

    Problem with large SmartGroup

    Daniel Fischer
      Share This:



      i order to extend our Reporting, i was asked to create a script which will output numbers based on server count in a smart group.

      As we have extremely many servers in them, i got memory issues. I got my code from here: Count the number of server from smart group


      Current Code:


      smartGroup="/All Servers by Availability/All" # Items 47263
      blcli Server listServersInGroup "$smartGroup"
      blcli_storeenv serverList
      echo $serverList | tr ' ' '\n' | wc -l


      Then i got this:

      Info 09/29/2020 08:25:55 Exit Code 0
      Info 09/29/2020 08:25:55 1
      Error 09/29/2020 08:25:55 Exception in thread "main" No result has been created yet
      Error 09/29/2020 08:25:55 at com.bladelogic.om.infra.cli.CLIMain.main(CLIMain.java:197)
      Error 09/29/2020 08:25:55 at com.bladelogic.om.infra.cli.CLIMain.runSingleCommand(CLIMain.java:433)
      Error 09/29/2020 08:25:55 at com.bladelogic.om.infra.cli.CommandResult.describe(CommandResult.java:212)
      Error 09/29/2020 08:25:55 at java.lang.StringBuffer.append(StringBuffer.java:270)
      Error 09/29/2020 08:25:55 at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
      Error 09/29/2020 08:25:55 at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
      Error 09/29/2020 08:25:55 at java.util.Arrays.copyOf(Arrays.java:3332)
      Error 09/29/2020 08:25:55 java.lang.OutOfMemoryError: Java heap space
      Info 09/29/2020 08:25:42 Smartgroup: /All Servers by Availability/All


      I also tried to extend memory as suggest by a random google search:

      #begining of code
      blcli_setjvmoption -Xmx2048M
      blcli_setjvmoption -Dcom.bladelogic.cli.execute.quietmode.enabled=true
      cd //@

      but no luck so far.


      Maybe someone has some ideas?


      BR Daniel

        1 2 Previous Next