Name:
rcmd - Parallel Remote Command based SSH Command
Probe_Command:
Shown system's attibutes of the systems (by ssh command).
This function will execute system commands on clients to get the
attributes. The 'system administrator privileges' are required (like
'root' login).
The command do not refresh the local catalog, in this case use
'rcmdmgnt' command.
# rcmd -probe [common-options] [probe-options] [nodelist]
(gets system's attributes by iteractive process)
# rcmdmgnt -probe [common-options] [probe-options] [nodelist]
(gets system's attributes and refresh rcmd database)
NOTE: The remote user must be as login shell: sh, ksh or bash. No
differents shell are supported.
The 'probe' process itself allows the use of the 'sudo option' for
non-root users, however, you must add the system requirements settings
to /etc/sudoers.
Command_Options:
attempts, maxthreads, non-iteractive, stderroff, stdoutoff, timeout,
tracking
Probe_Options:
detail, fields, show-nonprobe
ssh_Options:
ssh-cipher, ssh-command, ssh-enable-tty, ssh-login, ssh-port,
ssh-private-key, ssh-logwarn, ssh_options,
Generic_Options:
ignorelist, nodelist, node-status, noheaders, notitle, options, output,
system, tags, with-status, without-noanswer-notify
Sudo_Option:
The 'use-sudo' option is valid for 'sh', 'bash' and 'ksh' program script
only. The module will add the following lines on the top of script:
export SUDO; SUDO=`which sudo`;
You can prefix '$SUDO' to system commands to grant root privileges. You
does not need to grant root privileges for all each line of script, just
specific the '$SUDO' in the commands if need.
REMEMBER: The 'Sudoers' must be configured. no autoconfiguration will be
done.
System Command Dependencies:
The following command may require 'root' privileges. The 'root'
privileges depend of the system type, system configuration and remote
user in use. See the your system guide for more information.
Required commands on AIX Systems
/usr/bin/hostname Hostname
/usr/bin/oslevel OS Level
/usr/bin/uname Platform System Information
/usr/sbin/bootinfo (root) BOOT information
/usr/sbin/lsattr (root) List attributes
/usr/sbin/lscfg (root) List configuration
/usr/sbin/lsdev (root) List devices
/usr/sbin/odmget (root) List ODM
/usr/sbin/prtconf (root) Print system Configuration
Required commands on Linux Systems
/sbin/lspci (root) List PCI devices
/usr/bin/getconf (root) Get System Config
/usr/bin/hostname Hostname
/usr/bin/lscpu (root) List CPU
/usr/bin/uname Platform Information
/usr/sbin/dmidecode (root) HW decode tools
Required commands on SunOS and Solaris Systems
/usr/bin/hostname Hostname
/usr/bin/isainfo ISA Information
/usr/sbin/prtconf (root) Print system Configuration
/usr/sbin/prtdiag (root) Hardware information
/usr/sbin/psrinfo (root) Processor information
/usr/bin/uname Platform Information
/opt/SUNWsneep/bin/sneep (root) SerialNumber
Sudoers Configuration:
The 'Sudoers' will be required for non-root remote users that does not
have root-privileges (see: System Command Dependencies). The lines
bellow can be used as an example for 'how to configure sudoers'.
To enable the sudoers use the 'use-sudo' option or edit the
/etc/rcmd.d/rcmd.conf and add the line
# rcmd -use-sudo ...
or
#/etc/rcmd.d/rcmd.conf
...
set USE_SUDO 1
Edit the '/etc/sudoers' and add the lines:
# AIX Systems
[user] ALL=(ALL) NOPASSWD: \
/usr/sbin/bootinfo, \
/usr/sbin/lsattr, \
/usr/sbin/lscfg, \
/usr/sbin/lsdev, \
/usr/sbin/odmget, \
/usr/sbin/prtconf
# Linux Systems
[user] ALL=(ALL) NOPASSWD: \
/sbin/lspci, \
/usr/bin/getconf, \
/usr/bin/lscpu, \
/usr/sbin/dmidecode \
# SunOS/Solaris Systems
[user] ALL=(ALL) NOPASSWD: \
/usr/sbin/prtconf, \
/usr/sbin/psrinfo, \
/usr/sbin/prtdiag, \
/opt/SUNWsneep/bin/sneep
Probe_Examples:
1) Probe System Linux.
# rcmd -probe -system system=linux
2) Probe Users tag 'tag1'.
# rcmd -probe -tag tag1
3) Probe System and show specific field
# rcmd -probe -field dist,version
4) Probe Sytem and shown in detailed format
# rcmd -probe -detail
Author:
Copyright (c) Carlos Celso
https://sourceforge.net/u/carlos_celso
**ENDED