scorehosts

output host list from host group specification More...

SYNOPSIS

  1. scorehosts [ OPTIONS ] HOSTGROUP
  2. scorehosts --check

DESCRIPTION

scorehosts displays the names of hosts that are available in a cluster. The shell environment variable SCBDSERV must be set to the path to the scorehosts.db(5) file or the hostname where scoreboard cluster database server is running.

The HOSTGROUP can be the name of hostgroup sepcified in scorehosts.db(5) cluster configuration file used by scoreboard(8), a hostname, or a filename in which hostnames are listed line by line. Assuming that each name, which is hostgroup, filename or hostname, represents a ordered set of hostnames, there are five operators to manipulate the host set. When the multiple combination of the operators are specified, then each operator is evaluated from left to right. The rsulting host set can only have unique names.

"+" operator

name_a "+" name_b
Two names are combined by a plus symbol (+), then resulting host set is the conjunction of the two names. The resulting host set has always unique members. And adding a member exiting already will have no effect.

"~" operator

name_a "~" name_b
Two names combined by a tilde symbol (~), the resulting members are the members of name_a which are not found in the set of name_b.

":" operator

name ":" N
The first N elements are the resulting set. N can be a member hostname in the host set name.

"@" operator

name "@" N
The first N elements of name are excluded. N can be a member hostname in the host set name.

"^" operator

name_a "^" name_b
The member of name_b is prepended to the member of name_a.

EXAMPLE

Let us assume that a hostgroup name all has 8 hosts, comp0 to comp7.

  % scorehosts all:4
  comp0 comp1 comp2 comp3
  % scorehosts all@comp6
  comp6 comp7
  % scorehosts all~comp1~comp3~comp5~comp7
  comp0 comp2 comp4 comp6
  % cat ./file
  comp1
  comp2
  % scorehosts all+./file
  comp0 comp1 comp2 comp3 comp4 comp5 comp6 comp7
  % scorehosts all~./file
  comp0 comp3 comp4 comp5 comp6 comp7
  % scorehosts all+server
  comp0 comp1 comp2 comp3 comp4 comp5 comp6 comp7 server
  % scorehosts all^server
  server comp0 comp1 comp2 comp3 comp4 comp5 comp6 comp7 
  % scorehosts all:4+all@4
  comp4 comp5 comp6 comp7

The last example above is tricky. all:4 produces comp0-comp3, then +all outputs comp0-comp7, and finally @4 results in comp4-comp7.

SPARE

If a record in the scorehosts.db(5) file has an attribute named spare and the record is marked as defected (having tilde (~) at the begininng of the record name), then the record may be replaced with the record specified as the values of the spare attribute.

OPTION

-i[gnore]

When specified, scorehosts outputs the host list ignoring the defected host(s) specified in the sorehosts.db file.

-r[eplace]

When specified, defected host(s) are replaced with the spare host(s) specified int the sorehosts.db file.

-s[pare]

When specified, scorehosts outputs the host list specified in the comand argument and the spare host(s) associated with the specified host list.

-d[efect]

When specified, scorehosts outputs only the defected hosts.

-l[ine]

When specified, the output host list is separated with newline (\n). By default, hosts are separated with a space (blank) character.

-q[uiet]

By default, scorehosts outputs the number of hosts at the end of the host list. When this option is specified, the number message will not be output.

-n[umber]

If specified, the output hosts are line-separated, with numbering.

-core

If specified, the output host names are prefixed with a colon (:) and a number of cores specified in the scorehosts.db(5) file.

--attribute

If specified, then scorehosts command output the attibutes of each record of the specified group.

--check

If specified, the scorehosts command checks the scorehosts.db(5) file if its content can be accessed properly. Unless some diagnostic messages will be printed.

ENVIRONMENT

SCBDSERV

Scoreboard server

SEE ALSO

scoregroups(1), scorehosts.db(5), scoreboard(8).
CREDIT
This document is a part of the SCore cluster system software developed at PC Cluster Consortium, Japan. Copyright (C) 2003-2008 PC Cluster Consortium.