Sponsored Content
Top Forums Shell Programming and Scripting Script to compare all the config files in a cluster of servers. Post 302288193 by cfajohnson on Monday 16th of February 2009 04:56:13 PM
Old 02-16-2009
Quote:
Originally Posted by rdlover
Thank you. I think thats a good idea,although it'll end up creating 15 logs on the server each time i run the script, but i should be able to live with that.

If you don't want 15 log files, redirect them all to one file, e.g.:

Code:
for host in $hostlist
do
   ssh "$host" "diff App_B.cfg App_B.cfg.021509"
done > logfile-$(date +%Y-%m-%d)

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need a sheel script to compare no of file on diffrent servers

i have serverA and serverB and i have a folder with same name an location in both servers.... Now i want to compare files in folder(serverA) with folder (serverB) if there are files missing in folderB then copy those files from folder(serverA) to folder(serverB) (1 Reply)
Discussion started by: ashahzad
1 Replies

2. Web Development

bash script editing my apache config files

okay i'm going to try to say this uber-simple: I use dropbox (file-sync service). in order for dropbox sync files, they must be its children eg. somewhere under /home/jzacsh/Dropbox]. I want to now use it to keep my development files in sync across my machines: easy: just move my dev. files... (2 Replies)
Discussion started by: jzacsh
2 Replies

3. Shell Programming and Scripting

parsing config file to create new config files

Hi, I want to use a config file as the base file and parse over the values of country and city parameters in the config file and generate separate config files as explained below. I will be using the config file as mentioned below: (config.txt) country:a,b city:1,2 type:b1... (1 Reply)
Discussion started by: clazzic
1 Replies

4. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

5. Shell Programming and Scripting

Script to login to several servers and get files

Hi ppl, I am looking out for a shell script a. That would have to login(from a main server) to say 16 servers individually. b.On each server go to a particular location, check if a particular file is generated on a date(say every sunday it gets generated and i would be interested in the latest... (8 Replies)
Discussion started by: yohasini
8 Replies

6. Shell Programming and Scripting

Help related to Script to move files depending on config values

Hi All, I am new to Unix scripting, I have requirement where I need to read the key value pair from config file. Sample Config file: Key(File Pattern) Value(File Directory location) test /Users/Bkumar/Downloads/testdir prod ... (1 Reply)
Discussion started by: sbpkumar7
1 Replies

7. Shell Programming and Scripting

List and Compare Files accross different servers.

Hi all, This is my situation. First thing is I cannot use rsync to accomplish this. I don't have on my systems and we can't put it on. I run HP-UX 11v3. I have a list of files generated every day which tells me which files are not in sync with the rest of the servers.I want to ls -l the... (1 Reply)
Discussion started by: zixzix01
1 Replies

8. Shell Programming and Scripting

Compare the files in 2 different servers for change or modification

I have the following requirement; I need to compare set of files in 2 different servers A and B. Both have same sets of files and directory structure First I need to move the files from Server A to server B Compare the corresponding file in B server and see if it has modified (not... (1 Reply)
Discussion started by: vskr72
1 Replies

9. Shell Programming and Scripting

Compare files in 2 servers

I need to compare same set of files in 2 different servers and generate a list (in STDOUT) which contain all the files that have changed. I don't have permission to create any temp files or folders in either servers. - One option is to use ' if '. But for this I need to move file1 to one server... (1 Reply)
Discussion started by: vskr72
1 Replies

10. Shell Programming and Scripting

Help with shell script to compare values between servers

Hi I am a beginner in UNIX and shell scripting and i have a requirement as stated below, requirement Login to a unix server 1 1. connect to a database mysql -uUsername -pPassword 2. Select a Schema : "Use Schemaname1" 3. query for a particular record ... (2 Replies)
Discussion started by: Hamdul
2 Replies
cmcheckconf(1m) 														   cmcheckconf(1m)

NAME
cmcheckconf - check high availability cluster configuration and/or package configuration files SYNOPSIS
cmcheckconf [-v] [[-k|-K] -C cluster_ascii_file] [[-p pkg_reference_file] | [-P pkg_ascii_file]...] DESCRIPTION
cmcheckconf verifies the cluster configuration as specified by the cluster_ascii_file and/or the package configuration files specified by each pkg_ascii_file in the command. If the cluster has already been configured previously, the cmcheckconf command will compare the con- figuration in the cluster_ascii_file against the previously configuration information stored in the binary configuration file and validates the changes. The same rules apply to the pkg_ascii_file. It is not necessary to halt either the cluster or any of the packages to run the cmcheckconf command. Only a superuser, whose effective user ID is zero (see id(1) and su(1)), can verify the configuration. cmcheckconf verifies any configured external script program in each pkg_ascii_file for the package run and halt function by calling it with a "validate" parameter. A non-zero return value from any external script program will cause the command to fail. If the cluster_ascii_file specifies a quorum server as the cluster tie-breaker service, the quorum server must be running and all nodes in the cluster configuration must be authorized to access it. If more than one IP address is specified for the quorum server, the quorum server must be reachable from all configured nodes through all the IP addresses. Otherwise the cmcheckconf command will fail. If the cluster_ascii_file specifies the lock lun devices as the cluster tie breaking service, all nodes must be accessing the same physical device. The lock lun device file must be a block device file. The cluster must be down before you can modify a cluster tie-breaking ser- vice. Options cmcheckconf supports the following options: -v Verbose output will be displayed. -k Using the -k option means that cmcheckconf only checks disk connectivity to the LVM volume group that are identified in the ASCII file. This option does not exist on Linux. Omitting the -k option (the default behavior) means that cmcheckconf tests the connectivity of all LVM volume groups on all the cluster nodes. Using -k can result in significantly faster operation of the command. -k must be used with -C and can not be used with -K -K Using the -K option means that cmcheckconf only checks disk connectivity for cluster lock volume groups. For all other LVM volume groups no connectivity will be checked. This option does not exist on Linux. Omitting the -K option (the default behavior) means that cmcheckconf tests the connectivity of all LVM volume groups on all the cluster nodes. Using -K can result in significantly faster operation of the command. -K can be used only when cluster is already configured and is used with -C -K can not be used with -k. -C cluster_ascii_file Name of the cluster ASCII file to use. This file can be created by either the cmquerycl command or cmgetconf command. See cmquerycl(1m) or cmgetconf(1m). This is a required parameter if the cluster has never been configured before. If not specified, the local cluster configuration is used. -P pkg_ascii_file... Name of the package configuration file(s) to use. A package configuration template file can be created by using the cmmakepkg command and must be customized to include specific information for the package. See cmmakepkg(1m). A configu- ration file for an existing package can be generated by using the cmgetconf command. See cmgetconf(1m). Once a package configuration file is generated from the existing configuration using cmgetconf, it can be modified to reflect the desired changes for that package. The package configuration file will be scanned for the purpose of validation. -p pkg_reference_file Name of the file containing a list of package configuration file(s) to be used. This file may be necessary if the number of pkg_ascii_file names given with multiple -P options do not fit on the command line. This option cannot be used with the -P option. RETURN VALUE
Upon completion, cmcheckconf returns one of the following values: 0 Successful completion. 1 Command failed. EXAMPLES
The high availability environment contains an ASCII cluster configuration file, and two packages, pkg1 and pkg2, specified in ASCII files pkg1.config and pkg1.config. To verify the cluster configuration and package files, do the following: cmcheckconf -C clusterA.config -P pkg1.config -P pkg2.config To verify the cluster configuration while restricting the connectivity check to the volume groups specified in the clusterA.config file, cmcheckconf -k -C clusterA.config -P pkg1.config -P pkg2.config To verify the cluster configuration while restricting the connectivity check to the cluster lock volume groups, cmcheckconf -K -C clusterA.config -P pkg1.config -P pkg2.config To specify a long list of package configuration files do the following: cmcheckconf -C clusterA.config -p myfile where myfile contains: pkg1.config pkg2.config pkg3.config The cluster is up and running, with both packages pkg1, pkg2 running as well. The package configuration file pkg1.config contains the changes to the package pkg1. To verify the package configuration changes made for pkg1, do the following: cmcheckconf -P pkg1.config AUTHOR
cmcheckconf was developed by HP. SEE ALSO
cmapplyconf(1m), cmdeleteconf(1m), cmgetconf(1m), cmmakepkg(1m), cmquerycl(1m). Requires Optional Serviceguard Software cmcheckconf(1m)
All times are GMT -4. The time now is 09:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy