From 9848b6c8c1da15137f71b57c9db923c5e5162e82 Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Fri, 30 Jun 2017 12:20:10 +0200
Subject: os_mon: Do not use deprecated functions in string(3)

---
 lib/os_mon/src/cpu_sup.erl | 2 +-
 lib/os_mon/src/memsup.erl  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'lib/os_mon/src')

diff --git a/lib/os_mon/src/cpu_sup.erl b/lib/os_mon/src/cpu_sup.erl
index e758b63d19..c1c972b5b1 100644
--- a/lib/os_mon/src/cpu_sup.erl
+++ b/lib/os_mon/src/cpu_sup.erl
@@ -244,7 +244,7 @@ get_uint32_measurement(Request, #internal{os_type = {unix, Sys}}) when Sys == ir
     %% Get the load average using uptime.
     %% "8:01pm  up 2 days, 22:12,  4 users,  load average: 0.70, 0.58, 0.43"
     D = os:cmd("uptime") -- "\n",
-    Avg = lists:reverse(hd(string:tokens(lists:reverse(D), ":"))),
+    Avg = lists:reverse(hd(string:lexemes(lists:reverse(D), ":"))),
     {ok, [L1, L5, L15], _} = io_lib:fread("~f, ~f, ~f", Avg),
     case Request of
 	?avg1  -> sunify(L1);
diff --git a/lib/os_mon/src/memsup.erl b/lib/os_mon/src/memsup.erl
index 0a9a883390..95cb798ba5 100644
--- a/lib/os_mon/src/memsup.erl
+++ b/lib/os_mon/src/memsup.erl
@@ -705,7 +705,7 @@ get_os_wordsize_with_uname() ->
 	_         -> 32
     end.
 
-clean_string(String) -> lists:flatten(string:tokens(String,"\r\n\t ")).
+clean_string(String) -> lists:flatten(string:lexemes(String,"\r\n\t ")).
     
 
 %%--Replying to pending clients-----------------------------------------
-- 
cgit v1.2.3