Sponsored Content
Top Forums Shell Programming and Scripting Check connectivity with multiple hosts - BASH script available here Post 302937731 by Fr3dY on Sunday 8th of March 2015 04:05:54 PM
Old 03-08-2015
Thanks for your help, I've updated the first post with some fixes (more to come).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script for df output from multiple hosts

I am trying get "df -k" output from multiple hosts along with their hostnames via ssh, my script is appending the "df -k" output from all the nodes to a single file but not getting the hostnames for those nodes, just wondering how to pass more than one command via ssh or may be someone could come... (6 Replies)
Discussion started by: barkath
6 Replies

2. Shell Programming and Scripting

Script to check connectivity

I want to write a script to check if a unix box say abc.tdc.cin.net can be connected or not on certain port say 22. right know i have to telnet them manually from DOS prompt and if it is successful then isay it is connected. Also to check Database connectivity I am using tnsping From DOS prompt.... (3 Replies)
Discussion started by: kukretiabhi13
3 Replies

3. Shell Programming and Scripting

Linux: Writing a tricky script to check connectivity

So, first and foremost, I'm having issues with my internet connection. Periodically, the connection drops across the network. The fix is simple enough: restart the modem. However, this gets old when the connection dies out every hour. I can hit my surfboard on 192.168.100.1, and navigate to a... (5 Replies)
Discussion started by: kungfujoe
5 Replies

4. Shell Programming and Scripting

Check connectivity script

This past weekend I had some issues with my ISP. So for future purpose I'm going to have some logging on my internet so I'm able to attach log files to my complaint email if this issue reoccurs. Decided to do a simple ping script that runs every 5 or 10 min with crontab if ping fail write date... (5 Replies)
Discussion started by: chipmunken
5 Replies

5. Solaris

Sybase Connectivity Check through Shell Script

Hi, I need to check the sysbase database connectivity through the Unix Shell Script. Can you help me on the how to write the script to test the sysbase database connection. Thanks in Advance Nandha (0 Replies)
Discussion started by: nandha2387
0 Replies

6. Shell Programming and Scripting

Check the connectivity of the DB through script, exit if no connection

check the connectivity of the DBs through script, script should exit if no connection and display the output as below. connectivity for DB1 is OK connectivity for DB2 is OK connectivity for DB3 is FAILED for DB in 1 2 3 do (sqlplus -s... (5 Replies)
Discussion started by: only4satish
5 Replies

7. Shell Programming and Scripting

How to write bash script for creating user on multiple Linux hosts?

I wonder whether someone can help me with what I'm trying to achieve Basically, the objective is one script to create new user on more than 70 linux hosts if required. Everything works apart from the highlighted part. It gave me an output passwd: Unknown user name ''. when try to set... (35 Replies)
Discussion started by: fugeulu
35 Replies

8. Shell Programming and Scripting

Bash script to detect nonpingable hosts

I have a script to detect if a host is pingable or not. The problem is that I would like it to put the nonpingable hosts in one file and the pingable hosts in another. I have come up with this so far: for ip in `cat /tmp/testlist2`; do ping -c 3 $ip >/dev/null && echo "$ip is up" || echo "$ip... (5 Replies)
Discussion started by: newbie2010
5 Replies

9. Shell Programming and Scripting

Help with shell script to check the tcp network connectivity between server

Hello, I have a requirement to check the tcp network connectivity between server it's running on and the list of host's and ports combination. i have written the below code but it doesn't work, but when i execute the nc command outside the script it works fine. please help me where i am... (8 Replies)
Discussion started by: sknovice
8 Replies

10. IP Networking

Help with to check the tcp network connectivity between servers and hosts

ello, i am new to the networking side. I have a requirement to check the tcp network connectivity between server it's running on and the list of host's and ports combination. please help me where i am going wrong. my code: #!/bin/bash #read the file line by line cd "$1" cat... (17 Replies)
Discussion started by: sknovice
17 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:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy