HP UX System Adstration manual Distributed Systems Administration Utilities Commands

Page 10

file and directory copies to be performed in parallel to a set of remote systems. The dshbak filter allows the output from multiple systems to be formatted and consolidated for better on-screen presentation.

The cexec, ccp, ckill, cps, and cuptime tools are wrappers around the pdsh and pdcp commands optimized for use in a Serviceguard cluster. They default to executing commands cluster-wide. These wrappers do the following:

cexec - Like pdsh but with additional reporting and retry features

ccp - Copies files cluster-wide

ckill - Kills the named process cluster-wide or on the specified systems

cps - Issues a ps command cluster-wide or on the specified systems

cuptime - Runs the uptime command cluster-wide

These commands can also be used outside a cluster, but like pdsh and pdcp, the user must specify a list of target hosts. The cexec command operates like pdsh and adds reporting capabilities. Saved reports can be used to reissue previous commands and target only those systems where the command originally failed, originally succeeded, or both. Command fanout is more fully described in Chapter 4: “Command Fanout” (page 83).

IMPORTANT: On HP-UX 11i v3 Integrity systems, pdsh requires an additional software, LibcExt, to make use of the functions that are not shipped with the standard Library Routines, libc in HP-UX 11i v3. LibcExt contains setegid() and seteuid() POSIX APIs, which the pdsh tool requires to function properly.

LibcExt forms part of the Portability Package (Product # PortPkg) depot. You can download Portability Package from the HP Software Depot web site at www.software.hp.com

The next section describes the commands provided with each DSAU component.

1.1 Distributed Systems Administration Utilities Commands

Table 1-1 Configuration Synchronization Command

Command

What it Does

When to Use it

csync_wizard

Helps set up the cfengine environment.

When setting up the configuration master.

Table 1-2 Consolidated Logging Commands

Command

What it Does

When to Use it

clog

Displays log files.

To examine log files.

clog_wizard

Helps set up log consolidation servers and

When setting up log consolidation.

 

clients.

 

Table 1-3 Command Fanout Commands

Command

What it Does

ccp

Copies files to multiple hosts in parallel.

 

In a Serviceguard cluster, copies files

 

cluster-wide.

When to Use it

To perform on-demand synchronization of files across a set of systems or a Serviceguard cluster.

cexec

Issues commands to multiple hosts in

 

parallel. In a Serviceguard cluster, issues

 

command cluster-wide.

To execute a non-interactive shell command across a set of systems or cluster. To consolidate identical output, pipe the output to dshbak -c.

ckill

Distributes a kill command to multiple

 

hosts in parallel. In a Serviceguard cluster,

 

issues command cluster-wide by default.

To send a signal to a named process across multiple systems or a cluster.

10 Introduction

Image 10
Contents Distributed Systems Administration Utilities Users Guide Copyright 2009 Hewlett-Packard Development Company, L.P Table of Contents HP-Supported Open Source pdsh Options Index Syslog-ngLog-Forwarding Configuration List of FiguresTarget Node Error Messages Consolidated Logging CommandsList of Tables Typographic Conventions About this DocumentIntended Audience Related InformationProduct Support HP Encourages Your Comments Introduction Consolidated Logging Commands Distributed Systems Administration Utilities CommandsConfiguration Synchronization Command Command Fanout CommandsOpen Source pdsh Commands Utility Setup CommandOpen Source cfengine Commands Open Source ComponentsOpen Source syslog-ng Command Distributed Systems Administration Utilities Manual PagesDsau Manual Page Sections Configuration Synchronization Cfengine OverviewCfengine Daemons and Commands Configuration SynchronizationCfengine Master Server Deployment Models Cfengine OverviewConfiguring cfengine Using the Configuration Synchronization Wizard# /opt/dsau/sbin/csyncwizard Configuration Data for csyncwizardWizard displays the following introductory screen Wizard proceeds to configure the system as a master server # /opt/dsau/sbin/csyncwizard Configuration Synchronization Configuring cfengine Would you like to manage clients? N Cluster Configuration Notes for cfengine Serviceguard Automation FeaturesVar/opt/dsau/cfengine/inputs directory Using the Wizard to Configure a Synchronization Client Opt/dsau/bin/csyncdispatcher Memberadded newhostManual Configuration When prompted, enter the name of the client to addStart by creating the directory Manually Configuring a Standalone Synchronization Server# mkdir -p /var/opt/dsau/cfenginemaster/inputs # /opt/dsau/sbin/cfkey # /var/opt/dsau/cfengine/ppkeys # cp localhost.pub root-10.0.0.5.pub# cfrun -- --inform # /sbin/init.d/cfservd start# cfagent --no-lock --verbose --no-splay # cfrun -v -- --verboseInitial Serviceguard Package Preparation # mkdir -p /csync/dsau/cfenginemaster/masterfilesPolicyhost = csync.abc.xyz.com List Managed Clients in cfrun.hostsEdit the cfservd.conf File # /opt/dsau/sbin/cfkey# ccp * /var/opt/dsau/cfengine/ppkeys # ccp /etc/rc.config.d/cfservd /etc/rc.config.d/cfservd# cp localhost.pub root-192.10.25.12.pub # cexec /sbin/init.d/cfservd startApply the package and start it Test the configuration by performing the following steps# ccp csync csync.conf /etc/cmcluster/csync # cmapplyconf -P csync.conf # cmmodpkg -e csyncConfiguring a Synchronization Managed Client On a managed client, use the commandSecurity Notes Choosing a Synchronization Invocation MethodEncryption Key ExchangeCsync Network Port Usage Encryption Checksum alertsChecksum Alerts Disabling Use of cfengineLogging Options # /sbin/init.d/cfservd stop#cfagent -K Cfengine TroubleshootingSyntax error due to missing or superfluous spaces Unable to connect to a cfengine client or masterCfagent -d, -d1, -d2, or -d3 cfservd Cfrun Syslog Message Format Consolidated LoggingIntroduction to syslog 2describes syslog Facilities MessagesMessage Filtering Log Consolidation OverviewImproved Log Consolidation Syslog Co-existence Etc/cmcluster/package-name/package-name.log Log Consolidation Configuration Syslog-ng Log Consolidator ConfigurationConfiguration Data for clogwizard Using the Log Consolidation WizardOpt/dsau/sbin/clogwizard Answer yes y or press Enter. The next question is Where N is the expected number of clientsAnswer yes y. The wizard then prompts If these choices are correct, continue Next prompt is Log files that reside on this cluster can be consolidated Consolidated package logs would be located here Cluster Configuration Notes for clog Minimizing Message Loss During Failover Configuring a Log Forwarding Client Using clogwizard Or press Enter. The next question isEnter the ssh port to be used for port forwarding Manually Configuring Log Consolidation Manually Configuring a Standalone Log Consolidation ServerReplace the %UDPLOOPBACKLOG% token with # /sbin/init.d/syslogd stop # /sbin/init.d/syslogd startFor example, for TCP If using the TCP protocol, add Create the following symbolic linkChange the Clogconfigured line to Add the following linesLog Consolidation Configuration SYSLOGDOPTS=-D -N KEEPALIVE% tokens with appropriate values UDPLOOPBACKSOURCE% and %UDPLOOPBACKLOG% tokens If consolidating package logs of this cluster, add Creating the clog PackageIf using VxVM, comment out the LVM Volume Group line Distribute it cluster-wide Testing and Starting the clog PackageThen use cmviewcl to make sure it is running Using VxVM Instead of LVM Manually Configuring Log Forwarding ClientsManually Configuring a Standalone Log Forwarding Client Ln -sf /etc/syslog-ng.conf.client /etc/syslog-ng.conf # /sbin/init.d/syslog-ng start # cpp /etc/rc.config.d/syslogd /etc/rc.config.d Destination dsyslog%TYPE% %TYPE%%IP%port%PORT% Otherwise, if using the UDP protocol, add If using the TCP protocol, add the following linesIf using ssh port forwarding, add Create the following symbolic link on each cluster memberStart syslog-ngon all cluster members using Forwarding Ascii Log DataFor the destination line For the filter lineConsolidating Package Logs on the Log Consolidation Server For the log lineDisabling a Standalone Log Consolidation System Perform the following steps to disable log consolidationDisabling Log Consolidation #/sbin/init.d/syslogd stop#/sbin/init.d/syslogd start Disabling a Serviceguard Cluster Log Consolidation SystemDisabling a Standalone Log Forwarding Client # /sbin/init.d/syslog-ng stopDisabling a Serviceguard Cluster Log Forwarding Client #/sbin/init.d/syslogd stop #/sbin/init.d/syslogd startLog File Protections Securing Consolidated LogsSsh Port Forwarding Clog Network Port Usage Using Bastille to Harden the System# cd /opt/ssh/etc # ccp sshhost* /opt/ssh/etc Starting System Management Homepage Using the System and Consolidated Log ViewerViewing System and Consolidated Logs To log in to the System Management Homepage, navigate toViewing System and Consolidated Logs Page Command Fanout Parallel Distributed ShellSystems Pdsh Utility WrappersAll nodes Cwall displays a wall1M broadcast message on multiple hostsSsh Security Setup Security ConfigurationRemote Shell Security Setup # csshsetup -r -f memberslist.txtRsh Command Messages Command Fanout TroubleshootingSsh Command Messages Target Node Error MessagesHP-Supported Open Source pdsh Options Page Index CfanouthostsLVM UDP