Beethoven.HwMon.Server (Beethoven v0.3.9)
DistrServer to monitor hardware resources and sends signals to Beethoven.Allocator
plus the integrated Mnesia table.
Summary
Functions
Returns a specification to start this module under a supervisor.
Similar to :mnesia.dirty_select/2
but only needs the match spec as an argument.
The table name of the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table is input automatically as the 1st arity.
Fetches data from the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Uses a record key to query the data. Will return all matching records.
Fetches all records from the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Returns the name of the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Supervisor Entry point.
Subscribes to the table mapped to the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Checks if the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table exists.
Holds the thread until the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table becomes available, or timeout occurs.
Defaults to 1_000
milliseconds for timeouts and 15
milliseconds for checking intervals.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec dirty_select(:ets.match_spec()) :: [tuple()] | list()
Similar to :mnesia.dirty_select/2
but only needs the match spec as an argument.
The table name of the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table is input automatically as the 1st arity.
Fetches data from the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Uses a record key to query the data. Will return all matching records.
Fetches all records from the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Returns the name of the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
#
PERCENTAGE FORMAT
#
YES -> 4% => 4.0 | 61% => 61.0
NO -> 4% => 0.04 | 61% => 0.61
@spec start_link(any()) :: GenServer.on_start()
Supervisor Entry point.
@spec subscribe(:simple | :detailed) :: :ok
Subscribes to the table mapped to the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table.
Matches based on subscription
:simple
{:mnesia_table_event, {:atom, record(), _op_data}}
:detailed
{:mnesia_table_event, {:atom, module() | :atom(), record(), [] | [record()], _op_data}}
@spec table_exists?() :: boolean()
Checks if the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table exists.
Holds the thread until the DistrServer Elixir.Beethoven.HwMon.Server
's mnesia table becomes available, or timeout occurs.
Defaults to 1_000
milliseconds for timeouts and 15
milliseconds for checking intervals.