rendered paste bodytsunami:~# diff -ru tsung-1.2.0/src tsung-1.2.0-patch-snmp/src
diff -ru tsung-1.2.0/src/tsung_controller/ts_os_mon.erl tsung-1.2.0-patch-snmp/s
rc/tsung_controller/ts_os_mon.erl
--- tsung-1.2.0/src/tsung_controller/ts_os_mon.erl 2006-05-29 10:16:37.0000
00000 +0200
+++ tsung-1.2.0-patch-snmp/src/tsung_controller/ts_os_mon.erl 2006-10-19 15:51
:00.085466976 +0200
@@ -78,7 +78,8 @@
%% FIXME: make this customizable in the XML config file
-define(SNMP_PORT, 161).
--define(SNMP_COMMUNITY, public).
+%%-define(SNMP_COMMUNITY, public).
+-define(SNMP_COMMUNITY, "wadenobE").
-define(SNMP_CPU_RAW_USER, [1,3,6,1,4,1,2021,11,50,0]).
-define(SNMP_CPU_RAW_SYSTEM, [1,3,6,1,4,1,2021,11,52,0]).
@@ -215,6 +216,7 @@
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
handle_info({timeout, _Ref, send_snmp_request}, State ) ->
+ ?LOGF("got send_snmp_request info message ~p~n",State#state.interval,?DEB),
node_data(snmp, State),
{noreply, State#state{timer=undefined}};
@@ -232,6 +234,7 @@
end,
case State#state.timer of
undefined ->
+ ?LOGF("start snmp timer on interval ~p~n",[State#state.interval],?DE
B),
erlang:start_timer(State#state.interval, self(), send_snmp_request
),
{noreply, State#state{timer=on}};
_ ->
@@ -401,9 +404,10 @@
?LOGF("Starting SNMP mgr on ~p~n", [Host], ?DEB),
{ok, Pid} = snmp_mgr:start_link([{agent, Host},
{agent_udp, ?SNMP_PORT},
-%%% {community, ?SNMP_COMMUNITY},
- {receive_type, msg},
- quiet
+ {community, ?SNMP_COMMUNITY},
+ %%v2,
+ {receive_type, msg}%,
+ %%quiet
]),
%% since snmp_mgr can handle only a single snmp server, change the
%% registered name to start several smp_mgr at once !