From 1b273b618002d65159453fdfb9520a9476e4423a Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Mon, 16 Aug 2010 19:38:33 +0200 Subject: Make it possible to reread and update detected CPU information Calling erlang:system_info/1 with the new argument 'update_cpu_info' will make the runtime system reread and update the internally stored CPU information. For more information see the documentation of erlang:system_info(update_cpu_info). --- erts/doc/src/erlang.xml | 55 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) (limited to 'erts/doc/src/erlang.xml') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 54a0a80536..cb3112acfe 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -5533,7 +5533,7 @@ true CpuTopology type to change.

- {cpu_topology, defined} + {cpu_topology, defined}

Returns the user defined CpuTopology. For more information see the documentation of @@ -5543,7 +5543,7 @@ true argument.

- {cpu_topology, detected} + {cpu_topology, detected}

Returns the automatically detected CpuTopology. The emulator currently only detects the CPU topology on some newer @@ -5727,11 +5727,34 @@ true information see the "How to interpret the Erlang crash dumps" chapter in the ERTS User's Guide.

- logical_processors + logical_processors -

Returns the number of logical processors detected on the - system as an integer or the atom unknown if the - emulator wasn't able to detect any. +

Returns the detected number of logical processors configured + on the system. The return value is either an integer, or + the atom unknown if the emulator wasn't able to + detect logical processors configured. +

+
+ logical_processors_available + +

Returns the detected number of logical processors available to + the Erlang runtime system. The return value is either an + integer, or the atom unknown if the emulator wasn't + able to detect logical processors available. The number + of logical processors available is less than or equal to + the number of logical + processors online. +

+
+ logical_processors_online + +

Returns the detected number of logical processors online on + the system. The return value is either an integer, + or the atom unknown if the emulator wasn't able to + detect logical processors online. The number of logical + processors online is less than or equal to the number of + logical processors + configured.

machine @@ -5936,6 +5959,26 @@ true get_tcw in "Match Specifications in Erlang", ERTS User's Guide.

+ update_cpu_info + +

The runtime system rereads the CPU information available and + updates its internally stored information about the + detected CPU + topology and the amount of logical processors + configured, + online, and + available. + If the CPU information has changed since the last time it was read, + the atom changed is returned; otherwise, the atom + unchanged is returned. If the CPU information has changed + you probably want to + adjust the amount + of schedulers online. You typically want to have as + many schedulers online as + logical processors + available. +

+
version

Returns a string containing the version number of the -- cgit v1.2.3