加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

EMC grab tool 在Windows和Vmware上的使用及问题处理

(2013-10-04 02:03:19)
标签:

it

san

emc

vmware

windows

分类: 工作
工具如图所示EMC <wbr>grab <wbr>tool <wbr>在Windows和Vmware上的使用及问题处理

Running on Windows:

Copy the .exe file over to the host and run it.

-----------------------
Running on ESXi:

Extract the archive file on the client machine into suitable directory.
The client machine must have HTTP access to the ESX virtual centre

Please ensure that your File System has at least 500M free of disk space for
temporary files that may be generated during its processing.

Operation :
It is possible that some commands could run for a lengthy period. Each module
has a max runtime limit, ranging from 60 seconds through to 450, depending
on the module.

The script will generate a compressed zip file, residing in the outputs
directory.  Its format will be

_YYYY-mm-dd-hh.mm.ss>_ESXi_emcgrab__full_CC.zip

If no Request number is defined, will default to 0000000000


Command line Syntax :

./emcgrab.exe [-h] [-v] [-host ] [-vsphereUrl ]
              -user -password
              [-vmsupport]
              [-autoexec] [-legal] [-quiet]
              [-case ] [-party ]
              [-customer ] [-contact ]
              [-email ] [-phone
              [-clariionip ] [-outdir ]
              [-noclariion]
              [-symApiServer ]

where
    -h              : Displays help screen and exit.
    -v              : Displays version information and exit.
    -host           : The IPv4 Address of the ESXi host
    -vsphereurl     : The vSphere URL used in discovery if not specified then
                    : ?host is used to construct the default value:
                     https:///sdk
                    : Example https://10.211.87.15/sdk
                    : This or host must be specified for a grab to be created
    -user           : ESXi host login user name
    -password       : ESXi host login password (cannot contain "<>&' chars)
    -passwordPrompt : Displays prompt to enter password.  Cannot be used with
                    : -password switch.  Only use if encountering password issues.
    -vmsupport      : Include vSphere Log Bundle in the grab output.
    -outDir         : Target folder for Grab output files.
                    : Enclose in quotes if contains a space.
    -quiet          : Suppresses all feedback.
    -legal          : Bypass the showing of Legal Notice and asking the user to
                    : accept it.
                    [If this switch is specified it means user auto accepts
                     the EMC's license agreement]
    -autoexec       : Bypasses all interactive prompts except the license
                    : acceptance, use -legal to ensure not prompted for this        
    -case           : Sets service request number in customer.profile
                    : This has to be a numeric, integer.
                    : Max Length is 10 digits
                    : Default is 0000000000
                    : If the value entered is invalid then an error is logged
                    : and shown to user console and the default value is used
    -party          : Sets Party Number of Customer (site-id) in customer.profile
    -customer       : Sets Company Name in customer.profile
    -contact        : Sets Customer Contact Name in customer.profile
    -email          : Sets Customer Contact Email Address in customer.profile
    -phone          : Sets Customer Contact Phone Number in customer.profile
    -clariionip     : Comma separated list of IP addresses for SPA / SPB
    -noclariion     : Do not gather CLARiiON information
    -symApiServer   : Execute SYMCLI calls.  Default value = "SYMAPI_SERVER".
                    : Optionally specify another service to use.  The value must
                    : match that which is configured in the SMYAPI config file.
                    : The netcnfg file is usually found in the folder
                    : Windows:    "C:\Program Files\EMC\SYMAPI\config\"
                    : Linux:      "/opt/emc/SYMCLI/config/"


Running on ESX:

This is something that I have to do on Windows boxes all the time, but less on our ESX boxes. In the past we used to just run the vm-support to collect the support logs and turn those over to the storage team. They no longer are happy with those and since EMC now has a grab that supports both vSphere and VI3.5 it’s hard to deny them now. In case you do not know what a grab is, it’s a log collection utility that will provide the storage admin with all of the details about WWN’s, paths and which LUN’s a host can see. They can use this for planning upgrades and troubleshooting issues.

First thing you will need to do is to download the proper EMC grab version to support your hosts. At the time of writing this its a version 1.2.1 and is supports both ESX 3 and 4. Proceed on over to http://powerlink.emc.com and download it from the support programs area.

Once you have the file you will need to upload it to your host with something like WinSCP. I always upload it into the /tmp folder and unzip it there. It will create a folder called “emcgrab”. You can use the following command to do the unzip in case your not familiar with what to do.

tar -xvf emcgrab_ESX_vSphere_v.1.2.1.tar

Next thing is to move into the emcgrab directory that was created. From within there you will need to execute the following command. If you read the help file included in the directory it will explain some options to supress some annoying confirmation screens about the licensing and such.

./emcgrab.sh -nomsg

Once the program starts to run depending on the options you used it will prompt you to confirm and read the licensing. After you pass that part it will ask you a string of questions about your contact details and some questions about your environment. These are not necessary to complete it you are using these grabs in house. If you plan on sending these to EMC then I would advise to fill them out.

Once the script completes it will ask you if you want to run vm-support to collect the VMware support logs along with the EMCgrabs. This is up to you, if you have a need for them go ahead. Once the script finished it will place the zipped up file in the Output folder and you can pull off the file with WinSCP.

In closing it’s not necessary to be running Powerpath on your hosts to collect these grabs.

如果工具无法完成日志收集的处理办法

介绍
EMC Grab工具是用于收集主机配置及日志数据的工具,主机日志可以显著加快主机相关问题的处理速度。EMC Grab会收集主机配置信息和日志文件、INQ输出结果以及EMC软件的配置信息(PowerPath、RecoverPoint、Replication Manager、Networker等)。

症状

    EMC Grab脚本运行至类似以下步骤时停止响应,甚至造成服务器重启

Copying file /sys/./class/fc_host/host6/statistics/fcp_output_megabytes

Copying file /proc/./meminfo Copying file /proc/./uptime Copying file /proc/./loadavg Copying file /proc/driver/./dsa/trace_ctl Copying file /proc/driver/./dsa/trace
 

    VMware ESX主机上运行EMC Grab出现如下错误
[root@VMWAREESX1 emcgrab]# ./emcgrab.sh
: command not found8:
: command not found23:
: command not found25:
: command not found28:
: command not found37:
: command not found43:
./emcgrab.sh: /tmp/emcgrab/emcgrab.main: line 90: syntax error near unexpected token `elif’
./emcgrab.sh: /tmp/emcgrab/emcgrab.main: line 90: `elif [ ${OS} = "HP-UX" ]
./emcgrab.sh: line 35: start: command not found
./emcgrab.sh: line 36: initialise: command not found
./emcgrab.sh: line 109: legal_notice: command not found
./emcgrab.sh: line 156: interact: command not found
./normalize_clarify.awk’ for reading (No such file or directory)
./emcgrab.sh: line 214: module: command not found

Collecting inq – inquiry Information
Running Command inq.linux -no_dots……………………………………………………… Command inq.linux -no_dotsrunning for more than 420 seconds
Attempting to kill process 2442
/root/tmp/emcgrab/tools/inq.sh: line 115:  2442 Killed                  eval ${LINE} >>${SCRIPT_TMP}/${OUTPUT}.txt 2>>${ERR_RPT}
Running Command inq.linux -no_dots-et………………………………………………….. Command inq.linux -no_dots-et running for more than 420 seconds
Attempting to kill process 4647
/root/tmp/emcgrab/tools/inq.sh: line 115:  4647 Killed                  eval ${LINE} >>${SCRIPT_TMP}/${OUTPUT}.txt 2>>${ERR_RPT}

原因
由于主机复杂的运行环境导致EMC Grab无法正常运行并收集日志

解决方案
如果运行EMC Grab (EMCReports)时出错,或者运行到一半卡住,请确认以下几项:

    正确下载了对应平台的EMC Grab工具
    主机上有足够的剩余空间
    直接在主机下载(或通过winscp上传)并解压EMC Grab工具。如果是Linux/ESX主机,并从Windows复制Grab工具到ESX主机时,注意FTP需开启binary模式。
    运行有类似DSA这样的文件证书生成工具
    如果是Dell服务器并且装有Dell PERC H700/H800 SCSI Adapter,需要安装最新的固件和驱动,旧版本的固件驱动可能会导致Windows重启
    如果是ESX主机,运行esxcfg-mpath -l确认是否有死路径(dead path),如有则重新扫描HBA: esxcfg-rescan

变通方法

如果检查上述项后仍然出现错误或卡住的情形,可以考虑解开工具脚本文件,编辑并注释掉出错的命令后再执行,步骤如下:

方法一:(Windows)
    在CMD运行窗口按Ctrl+C,脚本会停止执行并询问您” Terminate batch job Y/N?”
    按”N”则EMCReports会跳过当前命令转而执行下一命令

方法二:(Windows)
    解压缩EMCRPTS_xxx_xxx.exe到某一目录
    找到并用Notepad等文本编辑器打开emcrpt.cmd或Emulex.cmd,注释掉或删除出错的步骤或命令
    保存脚本文件,并直接点击emcrpt.cmd运行

方法三:(Unix/Linux)
    进入…/emcgrab/tools目录
    找到对应的脚本文件xxx.sh,用vi打开并注释掉出错的步骤或命令
    保存文件,并重新执行./emcgrab.sh

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有