Skip to content

Commit

Permalink
Merge pull request #183 from matsuu/patch-1
Browse files Browse the repository at this point in the history
fix formula for load average
  • Loading branch information
nniclausse authored Aug 7, 2017
2 parents 50471cc + c24aaa6 commit ea3c011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tsung_controller/ts_os_mon_snmp.erl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ init({HostStr, {Port, Community, Version, DynOIDS}, Interval, MonServer}) ->
FunsL= [{?SNMP_CPU_RAW_SYSTEM,cpu_system,sample_counter,fun(X)-> X/(Interval/1000) end},
{?SNMP_CPU_RAW_USER,cpu_user,sample_counter,fun(X)-> X/(Interval/1000) end},
{?SNMP_MEM_AVAIL,freemem,sample,fun(X)-> X/1000 end},
{?SNMP_CPU_LOAD1,load,sample,fun(X)-> X*100 end}] ++ DynOIDS,
{?SNMP_CPU_LOAD1,load,sample,fun(X)-> X/100 end}] ++ DynOIDS,
OIDS=lists:map(fun({Oid,_Name,_Type,_Fun})-> Oid end,FunsL),
Funs=lists:foldl(fun({Oid,Name,Type,Fun},Acc)->dict:store(Oid,{Name,Type,Fun},Acc) end,dict:new(),FunsL),
?LOGF("Starting SNMP mgr on ~p~n", [IP], ?DEB),
Expand Down

0 comments on commit ea3c011

Please sign in to comment.