java2gomd
Class Node

java.lang.Object
  extended byjava2gomd.GomdObject
      extended byjava2gomd.Node

public class Node
extends java2gomd.GomdObject

Represents a node (a computer in the cluster)


Field Summary
 GomdClient clientConnection
           
 
Constructor Summary
Node(GomdClient client, java.lang.String node)
          Creates a new node wich will retreive info over client with openMosix id node
 
Method Summary
 int cmd(java.lang.String command)
          Executes a specified command on this node
 double idletime()
          Returnes the idletime of this node
 int load()
          Returnes the load of this node
 java.util.Hashtable nics()
          Returnes all network interfaces on this node
 java.util.Hashtable pidlist()
          Returnes a list of processes
 long speed()
          Returnes the speed of this node
 int status()
          Returnes the status of this node
 long tmem()
          Returnes the total memory in this node
 double uptime()
          Returnes the uptime of this node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

clientConnection

public GomdClient clientConnection
Constructor Detail

Node

public Node(GomdClient client,
            java.lang.String node)
Creates a new node wich will retreive info over client with openMosix id node

Parameters:
client - The GomdClient it will use to retreive it's info.
node - It's openMosix id in the cluster.
Method Detail

load

public int load()
         throws java.io.IOException
Returnes the load of this node

Returns:
int representing the load in percent.
Throws:
java.io.IOException

status

public int status()
           throws java.io.IOException
Returnes the status of this node

Returns:
int representing the status of this node as shown in /proc/hpc/$node/status
Throws:
java.io.IOException

tmem

public long tmem()
          throws java.io.IOException
Returnes the total memory in this node

Returns:
long representing the node's memory in bytes
Throws:
java.io.IOException

speed

public long speed()
           throws java.io.IOException
Returnes the speed of this node

Returns:
long representing the speed of this node as specified by openMosix in /proc/hpc/$node/speed
Throws:
java.io.IOException

pidlist

public java.util.Hashtable pidlist()
                            throws java.io.IOException
Returnes a list of processes

Returns:
Hashtable with all the processes running on this node
Throws:
java.io.IOException

uptime

public double uptime()
              throws java.io.IOException
Returnes the uptime of this node

Returns:
double representing the uptime of this node in seconds.
Throws:
java.io.IOException

idletime

public double idletime()
                throws java.io.IOException
Returnes the idletime of this node

Returns:
double representing the idletime of this node in seconds.
Throws:
java.io.IOException

nics

public java.util.Hashtable nics()
                         throws java.io.IOException
Returnes all network interfaces on this node

Returns:
Hashtable with alle the network interfaces on this node
Throws:
java.io.IOException

cmd

public int cmd(java.lang.String command)
Executes a specified command on this node

Returns:
int representing the exit status of the command