Sponsored Content
Top Forums UNIX for Advanced & Expert Users Shell script to check the SAN dual path. Post 302546704 by mahive on Friday 12th of August 2011 12:43:30 AM
Old 08-12-2011
Well, I myself would'nt like someone doing my homework and it was my mistake that I did not entered the requested details in my request.
Sorry for not mentioning the type of os on which this script needs to run. I am probably looking for SAN dual path information on Linux, AIX and Solaris hosts.

I have made a script for Linux and would like to know whether it looks good or not

====================================================
Code:
#! /bin/ksh
for i in `cat /var/scripts/SAN/hostns_list`
do
echo === $i ===
ssh $i /opt/MLsan/inq
done

=====================================================




Similarly for SUN and AIX, the script is as follows:
Code:
#!/bin/ksh
/usr/sbin/fcinfo hba-port | egrep 'State|lpfc'
/sbin/multipath -ll
/usr/sbin/lsdev -Cc adapter | grep fcs
for i in `vxdisk -o alldgs list | sed 1d | awk '{print $1}'`
do
echo "$i - `vxdisk list $i | grep numpaths`"
done

=====================================================

These scripts needs to be integrated in my buildcheck so that the scripts can run on any hosts we desire and get the result.

Last edited by Franklin52; 08-12-2011 at 03:15 PM.. Reason: Please use code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to check the actual path instead of link path

Hi I have a path link /test/df/link1/actual/file1 here link1 is actually a softlink link1= a/b i need to print the ACTUAL FULL path instead of a linked path is there any direct command to print the actual path of any linked path eg showPhyscialPath /test/df/link1/actual/file1 and it... (4 Replies)
Discussion started by: reldb
4 Replies

2. UNIX for Dummies Questions & Answers

How to check path exist or not in UNIX shell script

UNIX Shell Script I'm in /home/suneel dirctory in that directory need to check for a path for example com/src/resources If Path exists need to copy the files from one directory If path not exist need to create the folders and copy the files UNIX shell script help required (3 Replies)
Discussion started by: suneelc
3 Replies

3. Solaris

2 x HBA, connected to a SAN, but no Multi path software - What happens ?

Hi there Now, Ive always support servers that used multi path software with dual cards, e.g. powerpath (emc ) / MPXIO. I got asked a question today, that if a solaris 8/9/10 host had 2 HBA cards, but no multipathing software, what would happen ?? Does the HBA card with the highest id on the... (2 Replies)
Discussion started by: sbk1972
2 Replies

4. Red Hat

how do we check SAN storage?

Hello, I am using LINUX OS. I want to check what is the SAN storage size. How do i check this in server? Any help is really appreciated.. (3 Replies)
Discussion started by: govindts
3 Replies

5. Shell Programming and Scripting

binaries PATH check in a ksh script

The situation is a data center with around 800 servers. Each server has installed one of these unix-like OS: rhel, sunos, aix, hp-ux. And we have to make scripts general enough to being able to be executed over all these servers. Furthermore, sometimes the scripts will be executed as a... (1 Reply)
Discussion started by: asanchez
1 Replies

6. Shell Programming and Scripting

Please help I want script to check filename, size and date in specify path.

Please help, I want script to check filename, size and date in specify path. I want output as: DATE: YYYYMMDD HH:MM ------------------------------------------------ fileA,filesize,yyyy mm dd HH:MM fileA,filesize,yyyy mm dd HH:MM fileA,filesize,yyyy mm dd HH:MM fileA,filesize,yyyy mm dd... (1 Reply)
Discussion started by: akeji
1 Replies

7. AIX

How to check if my AIX server has Dual HBA's?

Thanks I need to know if my server has dual HBA and if multipath has been configured. For Multipath I ran lspath and it shows all drives and if MPIO is configured for that drive. Thanks for any input. (2 Replies)
Discussion started by: 300zxmuro
2 Replies

8. Shell Programming and Scripting

Script to check the SAN paths.

Hello All, We have a script which when run on the host gives us the status of the internal and SAN attached disks, its paths and other information. The output of which is as follows: Nm DEVICE VEND PROD LunID SYM DevID DISKGROUP SIZE N E... (3 Replies)
Discussion started by: mahive
3 Replies

9. Red Hat

How to find the SAN path?

Hi folks, How to identify the SAN is running in Single path or dual source path for linux servers. (2 Replies)
Discussion started by: gsiva
2 Replies

10. Solaris

Solaris SAN Storage Multipath and Messages Check Script

Hi everybody, i am working on the new script , its job discover the Storage Env ( especially MultiPATH ) and FC cards for solaris 11 sparc systems for now.. script is seem working ( but may contain any mistakes or bug ) on the oracle Qlogic fc cards on Emc_VMAx systems and Solaris 11 Sparc_64... (0 Replies)
Discussion started by: ygemici
0 Replies
Net::Proxy::Connector::dual(3pm)			User Contributed Perl Documentation			  Net::Proxy::Connector::dual(3pm)

NAME
Net::Proxy::Connector::dual - Y-shaped Net::Proxy connector DESCRIPTION
"Net::Proxy::Connecter::dual" is a "Net::Proxy::Connector" that can forward the connection to two distinct services, based on the client connection, before any data is exchanged. CONNECTOR OPTIONS
This connector can only work as an "in" connector. The "server_first" and "client_first" options are required: they are hashrefs containing the options necessary to create two "out" "Net::Proxy::Connector" objects that will be used to connect to the requested service. The "Net::Proxy::Connector::dual" object decides between the two services by waiting during a short timeout. If the client sends some data directly, then it is connected via the "client_first" connector. Otherwise, at the end of the timeout, it is connected via the "server_first" connector. o host The hostname on which the connector will listen for client connections. Default is "localhost". o port The port on which the connector will listen for client connections. o server_first Typically an "out" connector to a SSH server or any service that sends a banner line. o client_first Typically an "out" connectrot to a web server or SSL server. o timeout The timeout in seconds (can be decimal) to make a decision. Default is 1 second. AUTHOR
Philippe 'BooK' Bruhat, "<book@cpan.org>". ACKNOWLEDGMENTS
This module is based on a script named sslh, which I wrote with Frederic Ple "<sslh@wattoo.org>" (who had the original insight about the fact that not all servers speak first on the wire). Frederic wrote a C program, while I wrote a Perl script (based on my experience with connect-tunnel). Now that "Net::Proxy" is available, I've ported the Perl script to use it. COPYRIGHT
Copyright 2006 Philippe 'BooK' Bruhat, All Rights Reserved. LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2009-10-18 Net::Proxy::Connector::dual(3pm)
All times are GMT -4. The time now is 08:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy