Uploaded image for project: 'Gateway'
  1. Gateway
  2. GATEWAY-80

startup fails if the Linux free command is localized (for example German language)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      startup fails if the Linux free command is localized (for example German language). When Linux is a localized version, some commands might return fields in the localized language. For example free by default returns Mem: in the English version but Speicher: in the German version. The fix is to fallback to /proc/meminfo if free does not return the required info

      total_memory=$(free -m | grep "Mem:" | awk '

      {print $2}

      ')

      1. localized version of free will use different output. Fallback to direct access to /pro/meminfo
        if [ ! $total_memory ]; then
        total_memory=$(cat /proc/meminfo | grep "MemTotal:" | awk ' {print int($2 / 1024)}

        ')
        fi

        Attachments

          Activity

            People

            • Assignee:
              martijn_brinkers Martijn Brinkers
              Reporter:
              martijn_brinkers Martijn Brinkers
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: