GRIS: Adding New Information Providers (aka sensors)

Creating Custom GRIS Providers

You can create your own information providers by following the procedures described in: MDS 2.2 GRIS Specification Document: Creating New Information Providers (PDF).

Creating Platform-specific Core GRIS Providers

There could be a mechanism-specific variant for each

  • grid-info-cpu-<method>
  • grid-info-mem-<method>
  • grid-info-net-<method>
  • grid-info-fs-<method>

For a totally esoteric platform which doesn't even have uptime and uname functionality, we might have to introduce variants

  • grid-info-platform-<method>
  • grid-info-cpufast-<method>

<method> should uniquely refer to how the information is acquired. In all the existing cases, we have methods named either after a common mechanism or the platform for which they've been completely tailored:

  • linux
  • irix
  • solaris
  • uname
  • posix
  • netstat
  • uptime
  • aix
  • tru64

The *-common scripts contain the generic code that is used by all platforms. They would NEVER be modified for a new platform. They correspond to the structure of the schema. Each mechanism-variant probe script basically does some mechanism-specific activity which initializes a shell variable environment in which the generic code can be executed to output the actual LDAP objects. The common code defines the particular variables that may be set by a probe to pass information for the standardized LDAP values. For example, the cpu common script looks for these variables:

### variables used to store probed data
# _cpu_N_vendor=name
# _cpu_N_model=name
# _cpu_N_version=name
# _cpu_N_features=name
# _cpu_N_speed_mhertz=number
# _cpu_N_l2cache_kbytes=number
# _cpu_free1X100=number
# _cpu_free5X100=number
# _cpu_free15X100=number
# _cpu_count=0

When a probe detects CPUs, it sets the _cpu_count value to the number, e.g. "2" on crater. Then it sets the cpu_N_* values for each CPU individually, e.g. on crater: 

_cpu_0_speed=1700
_cpu_1_speed=1700

This allows the individual probed devices to have distinct probed properties.

This is not well documented so anyone trying to work on these should definitely correspond over an appropriate MDS developers mailing list.