[manual index][section index]

NAME

grid: cpu - cpu server resource

SYNOPSIS

grid/srv/cpu
grid/runcpu

DESCRIPTION

Cpu is a file server that provides a processing resource. This resource imports a namespace from one or more external sources and executes selected commands within it. Cpu creates its own namespace containing three files ctl, cmd and ns which are used to configure the processing task prior to execution, this namespace is exported and served on stdin. In order to configure a processing task, a client must first mount the cpu namespace. Once this is done, reading the cmd and ns files will display the current configuration of commands to be executed or directories to be imported respectively. The ctl file is used to modify the current configuration and accepts the following input:

add cmd command

add ns path address

del [cmd|ns] index

Where command is the name (including full path and parameters) of a command to be executed. Path is the name of a directory to import from the exported namespace available at address and index is the index (as shown when reading the cmd and ns files) of the command or directory to be removed from the configuration.

For example, to import /dis and /dev from a resource exporting a Styx (see intro(5)) namespace at address tcp!200.1.5.53!7003 and then run ls -l and du, the following commands would be used:

echo 'add cmd /dis/ls -l' > ctl
echo 'add cmd /dis/du' > ctl
echo 'add ns /dis tcp!200.1.5.53!7003' > ctl
echo 'add ns /dev tcp!200.1.5.53!7003' > ctl

Reading the cmd and ns files will give the following output:

cmd
1: /dis/ls -l
2: /dis/du

ns
1: /dis (200.1.5.53!7003)
2: /dev (200.1.5.53!7003)

Once the client disconnects from (unmounts) the cpu, the selected namespaces will be imported and the commands executed. Note: A cpu does not have any namespace of its own. All required namespaces must be imported, for a simple command such as ls, the minimum recommended namespace to import would be: /chan /dev /dis /module

Register(1) may be used in conjunction with cpu to register it with a registry(4) and to export and serve its namespace across dial(2) network connections. Incoming connections may also be displayed visually using grid-monitor(1). For example:

grid/register [ options ... ] { grid/srv/cpu } | grid/srv/monitor 2 'CPU resource'

This set of commands is encapsulated within the shell script runcpu which will automatically register cpu with a registry(4) if possible and start up the graphical display to show connections to the resource. There is no need for the user to execute cpu outside of runcpu unless the namespace it provides is required to be accessible in a different way to that provided by grid-register(1).

SOURCE

/appl/grid/srv/cpu.b

BUGS

At the moment, Cpu will only import namespaces across an unauthenticated connection as provided by ns(1).

SEE ALSO

grid-monitor(1), grid-ns(1), grid-query(1), grid-register(1)

GRID-CPU(4 ) Rev:  Sun Feb 22 17:41:21 GMT 2009