public class Host
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
name |
Modifier | Constructor and Description |
---|---|
protected |
Host() |
Modifier and Type | Method and Description |
---|---|
static Host[] |
all()
Returns all hosts of the installed platform.
|
static Host |
currentHost()
Returns the host of the current process.
|
java.lang.String[] |
getAttachedStorage()
This methods returns the list of storages (names) attached to an host
|
static Host |
getByName(java.lang.String name)
This static method gets an host instance associated with a native
host of your platform.
|
double |
getConsumedEnergy()
Returns the amount of Joules consumed by that host so far
Please note that since the consumption is lazily updated, it may require a simcall to update it.
|
double |
getCoreNumber() |
static int |
getCount()
Counts the installed hosts.
|
double |
getCurrentPowerPeak()
Returns the speed of the processor (in flop/s) at the current pstate.
|
java.lang.Object |
getData() |
Storage[] |
getMountedStorage()
Returns the list of mount point names on an host
|
java.lang.String |
getName() |
double |
getPowerPeakAt(int pstate)
Returns the speed of the processor (in flop/s) at a given pstate.
|
java.lang.String |
getProperty(java.lang.String name) |
int |
getPstate()
Returns the current pstate
|
int |
getPstatesCount() |
double |
getSpeed()
This method returns the speed of the processor of a host (in flops),
regardless of the current load of the machine.
|
boolean |
hasData()
Returns true if the host has an associated data object.
|
boolean |
isOn()
Tests if an host is up and running.
|
void |
off()
Stops the host if it is on
|
void |
on()
Starts the host if it is off
|
static void |
setAsyncMailbox(java.lang.String mailboxName)
This static method sets a mailbox to receive in asynchronous mode.
|
void |
setData(java.lang.Object data) |
void |
setProperty(java.lang.String name,
java.lang.String value) |
void |
setPstate(int pstate)
Changes the current pstate
|
java.lang.String |
toString() |
static void |
updateAllEnergyConsumptions()
After this call, sg_host_get_consumed_energy() will not interrupt your process
(until after the next clock update).
|
public java.lang.String toString()
toString
in class java.lang.Object
public static Host getByName(java.lang.String name) throws HostNotFoundException
name
- The name of the host to get.HostNotFoundException
- if the name of the host is not valid.public static int getCount()
public static Host currentHost()
public static Host[] all()
public static void setAsyncMailbox(java.lang.String mailboxName)
mailboxName
- The name of the mailboxpublic java.lang.String getName()
public void setData(java.lang.Object data)
public java.lang.Object getData()
public boolean hasData()
public void on()
public void off()
public double getSpeed()
public double getCoreNumber()
public java.lang.String getProperty(java.lang.String name)
public void setProperty(java.lang.String name, java.lang.String value)
public boolean isOn()
public Storage[] getMountedStorage()
public java.lang.String[] getAttachedStorage()
public static void updateAllEnergyConsumptions()
public double getConsumedEnergy()
public int getPstate()
public void setPstate(int pstate)
public int getPstatesCount()
public double getCurrentPowerPeak()
public double getPowerPeakAt(int pstate)