emqttd_cli.erl 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. %%--------------------------------------------------------------------
  2. %% Copyright (c) 2012-2016 Feng Lee <feng@emqtt.io>.
  3. %%
  4. %% Licensed under the Apache License, Version 2.0 (the "License");
  5. %% you may not use this file except in compliance with the License.
  6. %% You may obtain a copy of the License at
  7. %%
  8. %% http://www.apache.org/licenses/LICENSE-2.0
  9. %%
  10. %% Unless required by applicable law or agreed to in writing, software
  11. %% distributed under the License is distributed on an "AS IS" BASIS,
  12. %% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. %% See the License for the specific language governing permissions and
  14. %% limitations under the License.
  15. %%--------------------------------------------------------------------
  16. -module(emqttd_cli).
  17. -include("emqttd.hrl").
  18. -include("emqttd_cli.hrl").
  19. -include("emqttd_protocol.hrl").
  20. -import(lists, [foreach/2]).
  21. -import(proplists, [get_value/2]).
  22. -export([load/0]).
  23. -export([status/1, broker/1, cluster/1, users/1, clients/1, sessions/1,
  24. routes/1, topics/1, subscriptions/1, plugins/1, bridges/1,
  25. listeners/1, vm/1, mnesia/1, trace/1]).
  26. -define(PROC_INFOKEYS, [status,
  27. memory,
  28. message_queue_len,
  29. total_heap_size,
  30. heap_size,
  31. stack_size,
  32. reductions]).
  33. -define(MAX_LIMIT, 10000).
  34. -define(APP, emqttd).
  35. load() ->
  36. Cmds = [Fun || {Fun, _} <- ?MODULE:module_info(exports), is_cmd(Fun)],
  37. [emqttd_ctl:register_cmd(Cmd, {?MODULE, Cmd}, []) || Cmd <- Cmds].
  38. is_cmd(Fun) ->
  39. not lists:member(Fun, [init, load, module_info]).
  40. %%--------------------------------------------------------------------
  41. %% Commands
  42. %%--------------------------------------------------------------------
  43. %%--------------------------------------------------------------------
  44. %% @doc Node status
  45. status([]) ->
  46. {InternalStatus, _ProvidedStatus} = init:get_status(),
  47. ?PRINT("Node ~p is ~p~n", [node(), InternalStatus]),
  48. case lists:keysearch(?APP, 1, application:which_applications()) of
  49. false ->
  50. ?PRINT_MSG("emqttd is not running~n");
  51. {value, {?APP, _Desc, Vsn}} ->
  52. ?PRINT("emqttd ~s is running~n", [Vsn])
  53. end;
  54. status(_) ->
  55. ?PRINT_CMD("status", "Show broker status").
  56. %%--------------------------------------------------------------------
  57. %% @doc Query broker
  58. broker([]) ->
  59. Funs = [sysdescr, version, uptime, datetime],
  60. foreach(fun(Fun) ->
  61. ?PRINT("~-10s: ~s~n", [Fun, emqttd_broker:Fun()])
  62. end, Funs);
  63. broker(["stats"]) ->
  64. foreach(fun({Stat, Val}) ->
  65. ?PRINT("~-20s: ~w~n", [Stat, Val])
  66. end, emqttd_stats:getstats());
  67. broker(["metrics"]) ->
  68. foreach(fun({Metric, Val}) ->
  69. ?PRINT("~-24s: ~w~n", [Metric, Val])
  70. end, lists:sort(emqttd_metrics:all()));
  71. broker(["pubsub"]) ->
  72. Pubsubs = supervisor:which_children(emqttd_pubsub_sup:pubsub_pool()),
  73. foreach(fun({{_, Id}, Pid, _, _}) ->
  74. ProcInfo = erlang:process_info(Pid, ?PROC_INFOKEYS),
  75. ?PRINT("pubsub: ~w~n", [Id]),
  76. foreach(fun({Key, Val}) ->
  77. ?PRINT(" ~-18s: ~w~n", [Key, Val])
  78. end, ProcInfo)
  79. end, lists:reverse(Pubsubs));
  80. broker(_) ->
  81. ?USAGE([{"broker", "Show broker version, uptime and description"},
  82. {"broker pubsub", "Show process_info of pubsub"},
  83. {"broker stats", "Show broker statistics of clients, topics, subscribers"},
  84. {"broker metrics", "Show broker metrics"}]).
  85. %%--------------------------------------------------------------------
  86. %% @doc Cluster with other nodes
  87. cluster(["join", SNode]) ->
  88. case emqttd_cluster:join(emqttd_node:parse_name(SNode)) of
  89. ok ->
  90. ?PRINT_MSG("Join the cluster successfully.~n"),
  91. cluster(["status"]);
  92. {error, Error} ->
  93. ?PRINT("Failed to join the cluster: ~p~n", [Error])
  94. end;
  95. cluster(["leave"]) ->
  96. case emqttd_cluster:leave() of
  97. ok ->
  98. ?PRINT_MSG("Leave the cluster successfully.~n"),
  99. cluster(["status"]);
  100. {error, Error} ->
  101. ?PRINT("Failed to leave the cluster: ~p~n", [Error])
  102. end;
  103. cluster(["remove", SNode]) ->
  104. case emqttd_cluster:remove(emqttd_node:parse_name(SNode)) of
  105. ok ->
  106. ?PRINT_MSG("Remove the node from cluster successfully.~n"),
  107. cluster(["status"]);
  108. {error, Error} ->
  109. ?PRINT("Failed to remove the node from cluster: ~p~n", [Error])
  110. end;
  111. cluster(["status"]) ->
  112. ?PRINT("Cluster status: ~p~n", [emqttd_cluster:status()]);
  113. cluster(_) ->
  114. ?USAGE([{"cluster join <Node>", "Join the cluster"},
  115. {"cluster leave", "Leave the cluster"},
  116. {"cluster remove <Node>","Remove the node from cluster"},
  117. {"cluster status", "Cluster status"}]).
  118. %%--------------------------------------------------------------------
  119. %% @doc Users usage
  120. users(Args) -> emqttd_auth_username:cli(Args).
  121. %%--------------------------------------------------------------------
  122. %% @doc Query clients
  123. clients(["list"]) ->
  124. dump(mqtt_client);
  125. clients(["show", ClientId]) ->
  126. if_client(ClientId, fun print/1);
  127. clients(["kick", ClientId]) ->
  128. if_client(ClientId, fun(#mqtt_client{client_pid = Pid}) -> emqttd_client:kick(Pid) end);
  129. clients(_) ->
  130. ?USAGE([{"clients list", "List all clients"},
  131. {"clients show <ClientId>", "Show a client"},
  132. {"clients kick <ClientId>", "Kick out a client"}]).
  133. if_client(ClientId, Fun) ->
  134. case emqttd_cm:lookup(bin(ClientId)) of
  135. undefined -> ?PRINT_MSG("Not Found.~n");
  136. Client -> Fun(Client)
  137. end.
  138. %%--------------------------------------------------------------------
  139. %% @doc Sessions Command
  140. sessions(["list"]) ->
  141. [sessions(["list", Type]) || Type <- ["persistent", "transient"]];
  142. sessions(["list", "persistent"]) ->
  143. dump(mqtt_persistent_session);
  144. sessions(["list", "transient"]) ->
  145. dump(mqtt_transient_session);
  146. sessions(["show", ClientId]) ->
  147. MP = {{bin(ClientId), '_'}, '_'},
  148. case {ets:match_object(mqtt_transient_session, MP),
  149. ets:match_object(mqtt_persistent_session, MP)} of
  150. {[], []} ->
  151. ?PRINT_MSG("Not Found.~n");
  152. {[SessInfo], _} ->
  153. print(SessInfo);
  154. {_, [SessInfo]} ->
  155. print(SessInfo)
  156. end;
  157. sessions(_) ->
  158. ?USAGE([{"sessions list", "List all sessions"},
  159. {"sessions list persistent", "List all persistent sessions"},
  160. {"sessions list transient", "List all transient sessions"},
  161. {"sessions show <ClientId>", "Show a session"}]).
  162. %%--------------------------------------------------------------------
  163. %% @doc Routes Command
  164. routes(["list"]) ->
  165. if_could_print(route, fun print/1);
  166. routes(["show", Topic]) ->
  167. print(mnesia:dirty_read(route, bin(Topic)));
  168. routes(_) ->
  169. ?USAGE([{"routes list", "List all routes"},
  170. {"routes show <Topic>", "Show a route"}]).
  171. %%--------------------------------------------------------------------
  172. %% @doc Topics Command
  173. topics(["list"]) ->
  174. if_could_print(topic, fun print/1);
  175. topics(["show", Topic]) ->
  176. print(mnesia:dirty_read(topic, bin(Topic)));
  177. topics(_) ->
  178. ?USAGE([{"topics list", "List all topics"},
  179. {"topics show <Topic>", "Show a topic"}]).
  180. subscriptions(["list"]) ->
  181. if_could_print(subscription, fun print/1);
  182. subscriptions(["list", "static"]) ->
  183. if_could_print(backend_subscription, fun print/1);
  184. subscriptions(["show", ClientId]) ->
  185. case mnesia:dirty_read(subscription, bin(ClientId)) of
  186. [] -> ?PRINT_MSG("Not Found.~n");
  187. Records -> print(Records)
  188. end;
  189. subscriptions(["add", ClientId, Topic, QoS]) ->
  190. Add = fun(IntQos) ->
  191. Subscription = #mqtt_subscription{subid = bin(ClientId),
  192. topic = bin(Topic),
  193. qos = IntQos},
  194. case emqttd_backend:add_subscription(Subscription) of
  195. ok ->
  196. ?PRINT_MSG("ok~n");
  197. {error, already_existed} ->
  198. ?PRINT_MSG("Error: already existed~n");
  199. {error, Reason} ->
  200. ?PRINT("Error: ~p~n", [Reason])
  201. end
  202. end,
  203. if_valid_qos(QoS, Add);
  204. subscriptions(["del", ClientId]) ->
  205. Ok = emqttd_backend:del_subscriptions(bin(ClientId)),
  206. ?PRINT("~p~n", [Ok]);
  207. subscriptions(["del", ClientId, Topic]) ->
  208. Ok = emqttd_backend:del_subscription(bin(ClientId), bin(Topic)),
  209. ?PRINT("~p~n", [Ok]);
  210. subscriptions(_) ->
  211. ?USAGE([{"subscriptions list", "List all subscriptions"},
  212. {"subscriptions list static", "List all static subscriptions"},
  213. {"subscriptions show <ClientId>", "Show subscriptions of a client"},
  214. {"subscriptions add <ClientId> <Topic> <QoS>", "Add a static subscription manually"},
  215. {"subscriptions del <ClientId>", "Delete static subscriptions manually"},
  216. {"subscriptions del <ClientId> <Topic>", "Delete a static subscription manually"}]).
  217. if_could_print(Tab, Fun) ->
  218. case mnesia:table_info(Tab, size) of
  219. Size when Size >= ?MAX_LIMIT ->
  220. ?PRINT("Could not list, too many ~ss: ~p~n", [Tab, Size]);
  221. _Size ->
  222. Keys = mnesia:dirty_all_keys(Tab),
  223. foreach(fun(Key) -> Fun(ets:lookup(Tab, Key)) end, Keys)
  224. end.
  225. if_valid_qos(QoS, Fun) ->
  226. try list_to_integer(QoS) of
  227. Int when ?IS_QOS(Int) -> Fun(Int);
  228. _ -> ?PRINT_MSG("QoS should be 0, 1, 2~n")
  229. catch _:_ ->
  230. ?PRINT_MSG("QoS should be 0, 1, 2~n")
  231. end.
  232. plugins(["list"]) ->
  233. foreach(fun print/1, emqttd_plugins:list());
  234. plugins(["load", Name]) ->
  235. case emqttd_plugins:load(list_to_atom(Name)) of
  236. {ok, StartedApps} ->
  237. ?PRINT("Start apps: ~p~nPlugin ~s loaded successfully.~n", [StartedApps, Name]);
  238. {error, Reason} ->
  239. ?PRINT("load plugin error: ~p~n", [Reason])
  240. end;
  241. plugins(["unload", Name]) ->
  242. case emqttd_plugins:unload(list_to_atom(Name)) of
  243. ok ->
  244. ?PRINT("Plugin ~s unloaded successfully.~n", [Name]);
  245. {error, Reason} ->
  246. ?PRINT("unload plugin error: ~p~n", [Reason])
  247. end;
  248. plugins(_) ->
  249. ?USAGE([{"plugins list", "Show loaded plugins"},
  250. {"plugins load <Plugin>", "Load plugin"},
  251. {"plugins unload <Plugin>", "Unload plugin"}]).
  252. %%--------------------------------------------------------------------
  253. %% @doc Bridges command
  254. bridges(["list"]) ->
  255. foreach(fun({{Node, Topic}, _Pid}) ->
  256. ?PRINT("bridge: ~s--~s-->~s~n", [node(), Topic, Node])
  257. end, emqttd_bridge_sup:bridges());
  258. bridges(["options"]) ->
  259. ?PRINT_MSG("Options:~n"),
  260. ?PRINT_MSG(" qos = 0 | 1 | 2~n"),
  261. ?PRINT_MSG(" prefix = string~n"),
  262. ?PRINT_MSG(" suffix = string~n"),
  263. ?PRINT_MSG(" queue = integer~n"),
  264. ?PRINT_MSG("Example:~n"),
  265. ?PRINT_MSG(" qos=2,prefix=abc/,suffix=/yxz,queue=1000~n");
  266. bridges(["start", SNode, Topic]) ->
  267. case emqttd_bridge_sup:start_bridge(list_to_atom(SNode), list_to_binary(Topic)) of
  268. {ok, _} -> ?PRINT_MSG("bridge is started.~n");
  269. {error, Error} -> ?PRINT("error: ~p~n", [Error])
  270. end;
  271. bridges(["start", SNode, Topic, OptStr]) ->
  272. Opts = parse_opts(bridge, OptStr),
  273. case emqttd_bridge_sup:start_bridge(list_to_atom(SNode), list_to_binary(Topic), Opts) of
  274. {ok, _} -> ?PRINT_MSG("bridge is started.~n");
  275. {error, Error} -> ?PRINT("error: ~p~n", [Error])
  276. end;
  277. bridges(["stop", SNode, Topic]) ->
  278. case emqttd_bridge_sup:stop_bridge(list_to_atom(SNode), list_to_binary(Topic)) of
  279. ok -> ?PRINT_MSG("bridge is stopped.~n");
  280. {error, Error} -> ?PRINT("error: ~p~n", [Error])
  281. end;
  282. bridges(_) ->
  283. ?USAGE([{"bridges list", "List bridges"},
  284. {"bridges options", "Bridge options"},
  285. {"bridges start <Node> <Topic>", "Start a bridge"},
  286. {"bridges start <Node> <Topic> <Options>", "Start a bridge with options"},
  287. {"bridges stop <Node> <Topic>", "Stop a bridge"}]).
  288. parse_opts(Cmd, OptStr) ->
  289. Tokens = string:tokens(OptStr, ","),
  290. [parse_opt(Cmd, list_to_atom(Opt), Val)
  291. || [Opt, Val] <- [string:tokens(S, "=") || S <- Tokens]].
  292. parse_opt(bridge, qos, Qos) ->
  293. {qos, list_to_integer(Qos)};
  294. parse_opt(bridge, suffix, Suffix) ->
  295. {topic_suffix, bin(Suffix)};
  296. parse_opt(bridge, prefix, Prefix) ->
  297. {topic_prefix, bin(Prefix)};
  298. parse_opt(bridge, queue, Len) ->
  299. {max_queue_len, list_to_integer(Len)};
  300. parse_opt(_Cmd, Opt, _Val) ->
  301. ?PRINT("Bad Option: ~s~n", [Opt]).
  302. %%--------------------------------------------------------------------
  303. %% @doc vm command
  304. vm([]) ->
  305. vm(["all"]);
  306. vm(["all"]) ->
  307. [vm([Name]) || Name <- ["load", "memory", "process", "io", "ports"]];
  308. vm(["load"]) ->
  309. [?PRINT("cpu/~-20s: ~s~n", [L, V]) || {L, V} <- emqttd_vm:loads()];
  310. vm(["memory"]) ->
  311. [?PRINT("memory/~-17s: ~w~n", [Cat, Val]) || {Cat, Val} <- erlang:memory()];
  312. vm(["process"]) ->
  313. foreach(fun({Name, Key}) ->
  314. ?PRINT("process/~-16s: ~w~n", [Name, erlang:system_info(Key)])
  315. end, [{limit, process_limit}, {count, process_count}]);
  316. vm(["io"]) ->
  317. IoInfo = erlang:system_info(check_io),
  318. foreach(fun(Key) ->
  319. ?PRINT("io/~-21s: ~w~n", [Key, get_value(Key, IoInfo)])
  320. end, [max_fds, active_fds]);
  321. vm(["ports"]) ->
  322. foreach(fun({Name, Key}) ->
  323. ?PRINT("ports/~-16s: ~w~n", [Name, erlang:system_info(Key)])
  324. end, [{count, port_count}, {limit, port_limit}]);
  325. vm(_) ->
  326. ?USAGE([{"vm all", "Show info of Erlang VM"},
  327. {"vm load", "Show load of Erlang VM"},
  328. {"vm memory", "Show memory of Erlang VM"},
  329. {"vm process", "Show process of Erlang VM"},
  330. {"vm io", "Show IO of Erlang VM"},
  331. {"vm ports", "Show Ports of Erlang VM"}]).
  332. %%--------------------------------------------------------------------
  333. %% @doc mnesia Command
  334. mnesia([]) ->
  335. mnesia:system_info();
  336. mnesia(_) ->
  337. ?PRINT_CMD("mnesia", "Mnesia system info").
  338. %%--------------------------------------------------------------------
  339. %% @doc Trace Command
  340. trace(["list"]) ->
  341. foreach(fun({{Who, Name}, LogFile}) ->
  342. ?PRINT("trace ~s ~s -> ~s~n", [Who, Name, LogFile])
  343. end, emqttd_trace:all_traces());
  344. trace(["client", ClientId, "off"]) ->
  345. trace_off(client, ClientId);
  346. trace(["client", ClientId, LogFile]) ->
  347. trace_on(client, ClientId, LogFile);
  348. trace(["topic", Topic, "off"]) ->
  349. trace_off(topic, Topic);
  350. trace(["topic", Topic, LogFile]) ->
  351. trace_on(topic, Topic, LogFile);
  352. trace(_) ->
  353. ?USAGE([{"trace list", "List all traces"},
  354. {"trace client <ClientId> <LogFile>","Trace a client"},
  355. {"trace client <ClientId> off", "Stop tracing a client"},
  356. {"trace topic <Topic> <LogFile>", "Trace a topic"},
  357. {"trace topic <Topic> off", "Stop tracing a Topic"}]).
  358. trace_on(Who, Name, LogFile) ->
  359. case emqttd_trace:start_trace({Who, iolist_to_binary(Name)}, LogFile) of
  360. ok ->
  361. ?PRINT("trace ~s ~s successfully.~n", [Who, Name]);
  362. {error, Error} ->
  363. ?PRINT("trace ~s ~s error: ~p~n", [Who, Name, Error])
  364. end.
  365. trace_off(Who, Name) ->
  366. case emqttd_trace:stop_trace({Who, iolist_to_binary(Name)}) of
  367. ok ->
  368. ?PRINT("stop tracing ~s ~s successfully.~n", [Who, Name]);
  369. {error, Error} ->
  370. ?PRINT("stop tracing ~s ~s error: ~p.~n", [Who, Name, Error])
  371. end.
  372. %%--------------------------------------------------------------------
  373. %% @doc Listeners Command
  374. listeners([]) ->
  375. foreach(fun({{Protocol, Port}, Pid}) ->
  376. Info = [{acceptors, esockd:get_acceptors(Pid)},
  377. {max_clients, esockd:get_max_clients(Pid)},
  378. {current_clients,esockd:get_current_clients(Pid)},
  379. {shutdown_count, esockd:get_shutdown_count(Pid)}],
  380. ?PRINT("listener on ~s:~w~n", [Protocol, Port]),
  381. foreach(fun({Key, Val}) ->
  382. ?PRINT(" ~-16s: ~w~n", [Key, Val])
  383. end, Info)
  384. end, esockd:listeners());
  385. listeners(_) ->
  386. ?PRINT_CMD("listeners", "List listeners").
  387. %%--------------------------------------------------------------------
  388. %% Dump ETS
  389. %%--------------------------------------------------------------------
  390. dump(Table) ->
  391. dump(Table, ets:first(Table)).
  392. dump(_Table, '$end_of_table') ->
  393. ok;
  394. dump(Table, Key) ->
  395. case ets:lookup(Table, Key) of
  396. [Record] -> print(Record);
  397. [] -> ok
  398. end,
  399. dump(Table, ets:next(Table, Key)).
  400. print([]) ->
  401. ok;
  402. print(Routes = [#mqtt_route{topic = Topic} | _]) ->
  403. Nodes = [atom_to_list(Node) || #mqtt_route{node = Node} <- Routes],
  404. ?PRINT("~s -> ~s~n", [Topic, string:join(Nodes, ",")]);
  405. print(Subscriptions = [#mqtt_subscription{subid = ClientId} | _]) ->
  406. TopicTable = [io_lib:format("~s:~w", [Topic, Qos])
  407. || #mqtt_subscription{topic = Topic, qos = Qos} <- Subscriptions],
  408. ?PRINT("~s -> ~s~n", [ClientId, string:join(TopicTable, ",")]);
  409. print(Topics = [#mqtt_topic{}|_]) ->
  410. foreach(fun print/1, Topics);
  411. print(#mqtt_plugin{name = Name, version = Ver, descr = Descr, active = Active}) ->
  412. ?PRINT("Plugin(~s, version=~s, description=~s, active=~s)~n",
  413. [Name, Ver, Descr, Active]);
  414. print(#mqtt_client{client_id = ClientId, clean_sess = CleanSess, username = Username,
  415. peername = Peername, connected_at = ConnectedAt}) ->
  416. ?PRINT("Client(~s, clean_sess=~s, username=~s, peername=~s, connected_at=~p)~n",
  417. [ClientId, CleanSess, Username, emqttd_net:format(Peername),
  418. emqttd_time:now_to_secs(ConnectedAt)]);
  419. print(#mqtt_topic{topic = Topic, flags = Flags}) ->
  420. ?PRINT("~s: ~s~n", [Topic, string:join([atom_to_list(F) || F <- Flags], ",")]);
  421. print(#mqtt_route{topic = Topic, node = Node}) ->
  422. ?PRINT("~s -> ~s~n", [Topic, Node]);
  423. print({{ClientId, _ClientPid}, SessInfo}) ->
  424. InfoKeys = [clean_sess,
  425. max_inflight,
  426. inflight_queue,
  427. message_queue,
  428. message_dropped,
  429. awaiting_rel,
  430. awaiting_ack,
  431. awaiting_comp,
  432. created_at],
  433. ?PRINT("Session(~s, clean_sess=~s, max_inflight=~w, inflight_queue=~w, "
  434. "message_queue=~w, message_dropped=~w, "
  435. "awaiting_rel=~w, awaiting_ack=~w, awaiting_comp=~w, "
  436. "created_at=~w)~n",
  437. [ClientId | [format(Key, get_value(Key, SessInfo)) || Key <- InfoKeys]]).
  438. format(created_at, Val) ->
  439. emqttd_time:now_to_secs(Val);
  440. format(_, Val) ->
  441. Val.
  442. bin(S) -> iolist_to_binary(S).