EnglishFrenchSpanish

OnWorks favicon

nodeattr - Online in the Cloud

Run nodeattr in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command nodeattr that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


nodeattr - query genders file

SYNOPSIS


nodeattr [-f genders] [-q | -c | -n | -s] [-X exclude_query] query
nodeattr [-f genders] [-q | -c | -n | -s] -A
nodeattr [-f genders] [-v] [node] attr[=val]
nodeattr [-f genders] -Q [node] query
nodeattr [-f genders] -V [-U] attr
nodeattr [-f genders] -l [node]
nodeattr [-f genders] -k
nodeattr [-f genders] -d genders
nodeattr [-f genders] --expand
nodeattr [-f genders] --compress

DESCRIPTION


When invoked with the -q , -c , -n , or -s arguments, nodeattr reads the genders file and
outputs a list of nodes that match the specified query. The nodes are listed in hostlist
format, comma separated lists, newline separated lists, or space separated lists
respectively. Genders queries will query the genders database for a set of nodes based on
the union, intersection, difference, or complement of genders attributes and values. The
set operation union is represented by two pipe symbols ('||'), intersection by two
ampersand symbols ('&&'), difference by two minus symbols ('--'), and complement by a
tilde ('~'). Parentheses may be used to change the order of operations. The -X argument
and query can be used to exclude nodes from the resulting output. A query can be replaced
with the -A option to cause nodeattr to print all the nodes listed in the genders
database.

When called with a node name (optional) and attribute name, nodeattr returns 0 to the
environment if the node has the attribute; else 1. If -v is present, the attribute name
and any value (see below) is printed on the standard output. If a node name is not
specified, the local host is assumed.

When called with the -Q argument, nodeattr will check if the node name (optional) is met
by the attribute and value conditions specified in the query. If the conditions are met,
nodeattr returns 0 to the environment; else 1. The query format is identical to the
format listed above. If a node name is not specified, the local host is assumed.

The -V option causes nodeattr to print all of the values that exist for a particular
attribute. Also specifing -U with -V causes nodeattr to print out only unique values for
the particular attribute.

The -l option causes nodeattr to print the attributes of the specified node. If no node
is listed, all attributes in the genders file are listed.

The -k option checks the genders file for parse errors and proper formatting. If errors
are found, information about the error will be output to standard error.

Nodeattr will always check the default genders file, but a different genders file can be
specified with the -f option.

The -d option allows the specified genders database to be compared to the filename
indicated by the -f option or the default genders database. The differences contained in
the specified database will be output to standard error.

The --expand option will take a genders database, expand all hostranges, and output a new
genders database. The subsequent database will be identical to the first, but every node
will be listed on a separate line. This option may be useful for debugging or determining
the difference between databases.

The --compress is opposite of the --expand option. It will output a new identical genders
database with hostranges of nodes with identical attributes. Depending on the setup of
your genders database, the resulting database may be longer or shorter. This option may
be useful as a beginning step to compressing an existing genders database.

Attribute names may optionally appear in the genders file with an equal sign followed by a
value. Nodeattr ignores these values except when the -v option requests that the value,
if any, be displayed; and when an attribute is specified on the command line with a value,
in which case only an attribute with the specified value in the genders file will match.

EXAMPLES


Retrieve a comma separated list of all login nodes:

nodeattr -c login

Retrieve a hostlist formatted list of all login nodes:

nodeattr -q login

Retrieve a comma separated list of nodes with 4 cpus:

nodeattr -c cpus=4

Retrieve a comma separated list of all login and management nodes:

nodeattr -c "login||mgmt"

Retrieve a comma separated list of all login nodes with 4 cpus:

nodeattr -c "login&&cpus=4"

Retrieve a comma separated list of all nodes that are not login or management nodes:

nodeattr -c "~(login||mgmt)"

To use nodeattr with pdsh to run a command on all fddi nodes:

pdsh -w`nodeattr -c fddi` command

To use nodeattr in a ksh script to collect a list of users on login nodes:

for i in `nodeattr -n login`; do rsh $i who; done

To verify whether or not this node is a head node:

nodeattr head && echo yes

To verify whether or not this node is a head node and ntpserver:

nodeattr -Q "head&&ntpserver" && echo yes

Use nodeattr online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Avogadro
    Avogadro
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • 2
    XMLTV
    XMLTV
    XMLTV is a set of programs to process
    TV (tvguide) listings and help manage
    your TV viewing, storing listings in an
    XML-based format. There are utilities to
    do...
    Download XMLTV
  • 3
    strikr
    strikr
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    (commercial)...
    Download strikr
  • 5
    GIFLIB
    GIFLIB
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 6
    Alt-F
    Alt-F
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • More »

Linux commands

  • 1
    4s-queryJ
    4s-queryJ
    4s-query � Run SPARQL queries on a
    4store storage backend ...
    Run 4s-queryJ
  • 2
    4ti2-circuits
    4ti2-circuits
    4ti2 - software package for algebraic,
    geometric and combinatorial problems on
    linear spaces ...
    Run 4ti2-circuits
  • 3
    cpufreq-set
    cpufreq-set
    cpufreq-set - A small tool which allows
    to modify cpufreq settings. SYNTAX:
    cpufreq-set [options] DESCRIPTION:
    cpufreq-set allows you to modify cpufreq
    setting...
    Run cpufreq-set
  • 4
    cpufreqd-get
    cpufreqd-get
    cpufreqd-get - Issues "get" commands to
    cpufreqd. SYNTAX: cpufreqd-get [-l]
    PARAMETERS: -l list applied Profiles for
    all cpus. DESCRIPTION: cpufreqd-get
    issues...
    Run cpufreqd-get
  • 5
    gammu
    gammu
    gammu - Does some neat things with your
    cellular phone or modem. ...
    Run gammu
  • 6
    ganglia2pcp
    ganglia2pcp
    ganglia2pcp - import ganglia data and
    create a PCP archive ...
    Run ganglia2pcp
  • More »

Ad