anchor.diff:          end
       catch
           _:_:_ ->
  -            1
  -    end.
  +            io:format("CPU:"
  +                      "~n   Num Schedulers: ~w"
  +                      "~n", [erlang:system_info(schedulers)]),
  +            case erlang:system_info(schedulers) of
  +                1 ->
  +                    10;
  +                2 ->
  +                    5;
  +                _ ->
  +                    2
  +            end
  +    end.
  +
  +
  +analyze_freebsd_cpu(Extract) ->
  +    analyze_freebsd_item(Extract, "hw.model", fun(X) -> X end, "-").
  +
  +analyze_freebsd_cpu_speed(Extract) ->
  +    analyze_freebsd_item(Extract,
  +                         "hw.clockrate",
  +                         fun(X) -> list_to_integer(X) end,
  +                         -1).
  +
  +analyze_freebsd_ncpu(Extract) ->
  +    analyze_freebsd_item(Extract,
  +                         "hw.ncpu",
  +                         fun(X) -> list_to_integer(X) end,
  +                         -1).
  +
  +analyze_freebsd_memory(Extract) ->
  +    analyze_freebsd_item(Extract,
  +                         "hw.physmem",
  +                         fun(X) -> list_to_integer(X) div 1024 end,
  +                         -1).
  +
  +analyze_freebsd_item(Extract, Key, Process, Default) ->
  +    try
  +        begin
  +            case Extract(Key) of
  +                [Key, Model] ->
  +                    Process(string:trim(Model));
  +                _ ->
  +                    Default
  +            end
  +        end
  +    catch
  +        _:_:_ ->
  +            Default
  +    end.
  +
   
   
   %% ----------------------------------------------------------------
  
positive.code:                         end;
                      true ->
                          if
                              (NCPU >= 4) ->
                                  2;
                              (NCPU >= 2) ->
  
negative.code:     io:format("FreeBSD:"
                "~n   Version: ~p"
                "~n", [Version]),
      %% This test require that the program 'sysctl' is in the path.
      %% First test with 'which sysctl', if that does not work
      %% try with 'which /sbin/sysctl'. If that does not work either,
      %% we skip the test...
      try
          begin
              SysCtl =
                  case string:trim(os:cmd("which sysctl")) of
                      [] ->
                          case string:trim(os:cmd("which /sbin/sysctl")) of
                              [] ->
                                  throw(sysctl);
                              SC2 ->
                                  SC2
                          end;
                      SC1 ->
                          SC1
                  end,
              Extract =
                  fun(Key) ->
                          string:tokens(string:trim(os:cmd(SysCtl ++ " " ++ Key)),
                                        [$:])
                  end,
              CPU      = analyze_freebsd_cpu(Extract),
              CPUSpeed = analyze_freebsd_cpu_speed(Extract),
              NCPU     = analyze_freebsd_ncpu(Extract),
              Memory   = analyze_freebsd_memory(Extract),
              io:format("CPU:"
                        "~n   Model:          ~s"
                        "~n   Speed:          ~w"
                        "~n   N:              ~w"
                        "~n   Num Schedulers: ~w"
                        "~nMemory:"
                        "~n   ~w KB"
                        "~n",
                        [CPU, CPUSpeed, NCPU,
                         erlang:system_info(schedulers), Memory]),
              CPUFactor =
                  if
                      (CPUSpeed =:= -1) ->
  