NAME srvmagt - ServerView Agents Linux Install Script SYNOPSIS srvmagt [-h|--help|--version] srvmagt [-fnRV][-p path] [-v vers] {build|install |start|trace|restart|status|diag|stop|remove} srvmagtDVD.sh # shar for ServerView Suite DVD srvmagt.sh [options][action] # shar for SoftwarePool DESCRIPTION The srvmagt (bash) shell script combines maintenance actions for the RPM scripts of ServerView Agents Linux rpm -U srvmagt-mods_src-version-release.i386.rpm rpm -U srvmagt-mods_bin-version-release.arch.rpm rpm -U srvmagt-eecd-version-release.i386.rpm rpm -U srvmagt-agents-version-release.i386.rpm rpm -U ServerViewConnectorService-version- release.i386.rpm and applies them in turn to all packages. Note that the packages srvmagt-mods_src and srvmagt-mods_bin are mutu- ally exclusive. There are two shell archives that contain the specified function srvmagt (named therein _srvmagt.sh) together with other components (message catalogues, shell function library, manual page, ServerView Agents README). Both shell archives have the .sh suffix for convenience. Both unpack the components prior to execution. srvmagtDVD.sh is specifically intended for RPM package installa- tion directly from PRIMERGY ServerView Suite DVD 1. It contains additional logic for DVD installation. srvmagt.sh is specifically intended for installation of RPM packages directly downloaded from the Fujitsu Tech- nology Solutions SoftwarePool or prepared in a directory in the file system. srvmagt tries to test and verify all the dependencies known from experience, catch all the necessary prepara- tions and finally perform the required action to establish ServerView Agents Linux on the system. It checks if the target system satisfies the necessary requirements, tests dependency and configuration and issues calls to the rpm(8) command that actually install or remove the packages. The system in question is either a reference system or a target system. If appropriate kernel source and tools are available to build the ServerView kernel modules, this is considered a reference system, otherwise a target system. You must be root to execute this script. OPTIONS If called without options, srvmagt displays status. Oth- erwise, the options mean -f forces the intended action against an issued warn- ing/rejection. [!] In that case you act on your own risk and responsibility. The behavior and function- ality is undefined. -h|--help displays short SYNOPSIS of the command syntax and exits. -n does not start any ServerView Agents' daemon during installation with the install action. -p path where path indicates where the RPM packages are located. path is a path to a directory in a local or remote file system, like . (dot), the current directory. It must start with a / (slash) or with ./ (dot slash) or must be one of the special paths cd or dvd that tell to locate the RPM packages on the mounted PRIMERGY ServerView Suite DVD 1. [!] path must not contain spaces or special characters, even if these are properly escaped. Or path is an URL to a web site. An URL starts with scheme: see RFC 2396. -R also installs the ServerView RAID Manager RPM pack- age if it is supplied together with the other RPM packages. -v vers indicates the version to handle. Default is the version of this script. -V log more information on progress. --version prints the script version and exits. ARGUMENTS Generally, the script performs the following test and decisions: o identify the Linux distribution (one of suse, red- hat, vmware, citrix) o identify the kernel version and architecture (one of x86, x86-64, ia64) o identify the PRIMERGY server model using SM BIOS data o identify if this is a reference or target system. If a C development system and other tools and appropriate kernel source is available, consider this a reference system otherwise a target system o verify presence of SNMP packages for all server models and other packages for specific models or distrbutions. The final argument indicates the requested action, default status. build is only possible on a reference systems and builds the ServerView Agents Linux' kernel modules package srvmagt_mods_bin install installs (repairs, upgrades) all ServerView Agents Linux' RPM packages according to the already installed configuration and the version supplied with the -v option. The corresponding services (i.e. daemons) are started afterwards unless the -n option is also given. start starts ServerView Agents Linux. trace starts ServerView Agents Linux with traces enabled. This is actually obsolete, as a trace (into a cir- cular buffer) is always activated since V4.60. restart restarts ServerView Agents LinuxŽ. status shows status of ServerView Agents Linux. diag collects diagnostic material by calling PrimeCol- lect(8). stop stops ServerView Agents Linux. remove removes all ServerView Agents Linux RPM packages. USE CASES There are three use cases for srvmagt: I) Installation from ServerView Suite DVD The DVD contains the ServerView Agents RPM packages and the shell archive srvmagtDVD.sh. To install the ServerView Agents from DVD 1. Insert the DVD into the drive and mount it if necessary 2. Browse in the DVD Web UI to ServerView Agents Linux 3. Download the srvmagtDVD.sh script to /tmp 4. Open (as root) a terminal, cd to /tmp and run sh srvmagtDVD.sh The script installs the RPM packages from the DVD. In case of a target system, it asks for the IP address of the associated reference system to transfer and install the RPM with the compiled ServerView modules. II) Installation from a directory in the file system (not DVD) The ServerView Agents RPM packages plus the srv- magt.sh (shell archive) are stored in the file sys- tem at path, for example after their download from the Fujitsu Technology Solutions support site. To install the ServerView Agents 1. Open a terminal as root and cd to path 2. Run sh ./srvmagt.sh [options] install [!] The leading sh and ./ ensure that the script is executed from the current working direc- tory! The script installs the RPM packages. In case of a target system, it expects also the RPM with the compiled binary ServerView modules. III) RPM package maintenance after installation The ServerView Agents RPMs are installed by either I or II. To maintain ServerView Agents (RPMs) 1. Open a terminal as root and cd to <path> 2. Run [/usr/sbin/]srvmagt [options] action with options and action as described above under OPTIONS and ARGUMENTS ENVIRONMENT BASH srvmagt.sh requires to be executed by bash(1) and tests that the BASH variable is not empty. LANG srvmagt.sh is internationalized for English and German language. If the LANG variable is set and an appropriate message catalog srv- magt_${LANG%_*}.msg is available, srvmagt.sh uses that message catalog, otherwise English language. FILES {/etc/srvmagt/messages|.}/srvmagt_de.msg /etc/[snmp/]snmpd.conf /etc/srvmagt/config /etc/{SuSE|redhat|vmware}-release /var/log/srvmagt/log.install DIAGNOSTICS The script prints messages to log its progress to stdout and error messages to stderr. Relevant log entries are also logged to syslog, see logger(1). EXIT STATUS Exit status follows LSB conventions 0 OK, success 1 Error, generic or unspecified error 2 Argument Error, invalid or excess argument(s) 3 Not implemented, unimplemented feature, e.g. "reload") 4 Not authorized, user had insufficient privileges 5 Missing tool, program is not installed 6 Not configured, program is not configured 7 Not running, program is not running SEE ALSO ServerView Agents Linux Release Notes rpm(8), srvmagt-agents(8), PrimeCollect(8). Version: 5.10 Revised: 2011-02-02 srvmagt(8)