::flexnettroubleshoot.bat::应该在fmepedia::created by ryan cragg&liyang zhang::edited by de we t van niekerk::last edited on 2015-01-11::我们关闭echo,以便屏幕在运行时不显示每个命令@echo off::此批处理文件必须是r从放在::中的目录中卸载,但如果它在管理模式下运行,它有时会从\windows\system32::我们可以使用pushd%~dp0pushd%~dp0将其设置为从当前文件夹运行::我们使用report_文件使以后更容易重命名输出。set report_name=flexnetreport.htmlset report_file=”%cd%\%report_name%del%report_file%:cls清除e屏幕,只是为了保持整洁。我设置颜色只是为了引起用户的注意。颜色c0::让我们告诉客户即将发生的事情是多么重要!***echo.echo此批处理文件将编辑防火墙设置。echo.echo此批处理文件应使用“以管理员身份运行”echo.echo运行,如果您只是双击它,右键单击it echo并选择“以管理员身份运行”echo,再次运行。echo按ctrl-c退出,或暂停::cls清除屏幕,只是为了保持整洁。请不要使用警告颜色clscolor 0f::让客户放心,事实上发生了什么事情。请收集信息并将其保存到%report_file%echo这可能需要几分钟的时间……::用HTML标题启动文档call:htmlheader::知道什么可能很方便。驱动器客户运行了echo flexnettroubleshoot.bat中的浴缸文件,该文件是从%cd%>>%report_file%echo运行的。>>%报告文件%:现在,让我们获取系统信息call:htmlsectionheader sysinfo“system information”echo注意:>>%report_file%echo^ >>%报告文件%echo^ 卷ID(如果随时间变化,注册密钥将更改)。^ >>%报告文件%echo^ 操作系统名称^ >>%报告文件%echo^ 操作系统版本^ >>%报告文件%echo^ 系统模型^ >>%报告文件%echo^ 系统类型^ >>%报告文件%echo^ 可用物理内存^ >>%报告文件%echo^ >>%报告文件%echo。>>%报告文件%echo^ >>%report_file%:此命令获取系统信息::它可能无法在xpvol>>%report_file%systeminfo>>%report_file%echo上工作。>>%报告文件%echo^ >>%report_file%调用:htmlsectionfooterCall:htmlsectionheader processes“running processes”echo。>>%report_file%echo这里是正在运行的内容的编辑列表^
>>%报告文件%回音注意:^
>>%报告文件%echo^ ^ 任何名字中有FME的东西^ >>%报告文件%echo^ 亚搏在线安全.exe^ >>%报告文件%echo^ lmgrd.exe文件^ >>%报告文件%echo^ 具有其他公司名称的可执行文件。可能是供应商的牧师。^ ^ >>%报告文件%echo^ >>%report_file%::告诉客户我们要做的是什么,选择扫描正在运行的任务…::这将获取缩短的任务列表tasklist/fi“imagename ne system idle process”/fi“imagename ne system”/fi“imagename ne smss.exe”/fi“imagename ne csrss.exe”/fi“imagename ne wininit.exe”/fi“imagename ne winlogon.exe“/fi”imagename ne services.exe“/fi”imagename ne lsass.exe“/fi”imagename ne lsm.exe“/fi”imagename ne svchost.exe“/fi”imagename ne logonui.exe“/fi”imagename ne slsvc.exe“/fi”imagename ne spoolsv.exe“/fi”imagename ne taskeng.exe“/fi”imagename ne logon.scr“/fi”imagename ne winlogon.exe“/fi”imagename ne explorer.exe“/fi”imagename ne tasklist.exe“>>%报告文件%echo^ >>%report_file%call:htmlsectionfootercall:htmlsectionheader envvar“environment variables”::下一步,让我们检查一下路径,以及所有其他环境变量:::告诉客户我们正在做什么保存环境变量…:检查lm_license_file或safe_license_file是否存在。:不应该存在。亚搏在线注意!”在if语句中使用的。echo^ >>%report_file%::告诉客户我们要做什么,选择扫描环境变量…::此命令获取所有环境变量set>>%report_file%echo。>>%报告文件%echo^ >>%report_file%call:htmlsectionfootercall:htmlsectionheader registry registry registryecho这里是注册表的内容。^
>>%报告文件%回音注意:^
>>%报告文件%echo^ ^ 服务就在这里^ >>%报告文件%echo^ 这是安装它的地方^ >>%报告文件%echo^ 如果这是空白的,未安装许可证服务^ ^ >>%报告文件%echo。>>%report_file%:告诉客户我们在扫描注册表…echo^ >>%report_file%:这些命令获取注册表信息Reg查询“hklm\system\currentcontrolset\services\fme license server”>>%report_file%echo。>>%report_file%reg query“hklm\software\wow6432node\flexlm license manager\fme license server”>>%report_file%echo。>>%report_file%reg query“hklm\software\flexlm license manager\fme license server”>>%report_file%echo。>>%报告文件%:好,这部分很棘手。我们将找到FME许可证服务器服务使用的lmgrd.exe的位置。:首先,我们抓取具有位置的整个注册表项::管道必须用^转义,因为它在for循环中。:find lmgrd.exefor/f“tokens=*”%%a in('reg query“hklm\software\flexlm license manager\fm license server”^ findstr lmgrd.exe')do set fm lmgrd _path=%%afor/f“tokens=*”%%A in('reg query“hlm\software\wow6432node\flexlm license manager\fme license server”^ findstr lmgrd.exe')do set fm_lmgrd_path=%fm_lmgrd_path%%%%A::we have to remove imagepath,Reg_展开_sz,lmgrd.exe和“from fme lmgrd_path set fm_lmgrd_path=%fm_lmgrd_path:lmgrd=%set fm_lmgrd_path=%fm_lmgrd_path=%fm_lmgrd_path:reg sz=%set fm_lmgrd_path=%fmu lmgrd_路径:.exe=%set fm_lmgrd_folder=%fm_lmgrd_路径:~8%set fm_lmUtil_路径=%fm_lmgrd_路径:~8 ~8 ~8%set fm_lmUtil_路径:~FMe_亚搏在线lmgrd_lmgrd_路径:~%lmutil.exe set fm_safe_path=%fm_lmgrd_path:~8%safe.exe设置fm_opt_path=%fm_lmgrd_path:~8%safe.opt set fm_lmgrd_path=%fm_lmgrd_path:~8%lmgrd.exe::find safe.licfor/f“tokens=*”%%a in(“reg query”hlm\software\flexlm license manager\fm license server“^ findstr safe.lic”)设置safe_lic_path=%%afor/f“tokens=*”%%a in(“reg query”hlm\software\ww6432node\flexlm license manager\fme license server“^ findstr safe.lic”)do set safe_lic_path=%safe_lic_path%%%aset safe_lic_path=%safe_lic_path:license=%set safe_lic_path=%safe_lic_path:~8%for/f”tokens=*“%%a in('reg query“hklm\software\flexlm license manager\fm license server“^ findstr safe.log”)do set safe_log_path=%%afor/f“tokens=*”%%a in('reg query“hklm\software\wow6432node\flexlm license manager\fm license server“^ findstr safe.log”)do set safe_log_path=%safe_log_path%%%%aset safe_log_path=%safe_log_path:lmgrd_log_file=%set safe_log_path=%safe_log_path:reg_sz=%set safe_log_path=%safe_log_path:~8%::让我们将lmgrd_path打印到报告,为了确保我们正确捕获了它echo,FME许可证服务器安装的位置是:>>%report_file%echo%fme_lmgrd_path%>>%report_file%echo。>>%Report_File%:引用工作文件夹时,使用%cd%,因为%fm_lmgrd_path%有前导空格::这不会导致pushd出现任何问题,但可以破坏其他命令。^ >>%report_file%call:htmlsectionfootercall:htmlsectionheader firewall“firewall exceptions”echo这里是防火墙例外。^
>>%报告文件%回显要知道的内容:^
>>%报告文件%echo^ ^ 亚搏在线应列出safe.exe和lmgrd.exe。>>%报告文件%echo^ 请记住,如果他们在Amazon EC2>>%Report_File%Echo实例上运行此程序,他们还必须打开安全组中的端口。^ ^ >>%report_file%:告诉客户我们在做什么,然后查询防火墙…echo^ >>%report_file%:此命令列出防火墙允许的程序例外netsh firewall show allowed program>>%report_file%:此部分添加safe.exe和lmgrd.exe。亚搏在线由于pr60611::echo而禁用。>>%report_file%:echo添加%fm_safe_path亚搏在线%到防火墙>>%report_file%:netsh firewall set allowedprogram“%fm_safe_path%”safe.exe“>>%report_file%:::echo添加%fm_lmgrd_path%到防火墙>>%report_file%:netsh firewall set allowedprogram“%fm_lmgrd_path%”lmgrd.exe“>>%report_file%ec呵。>>%报告文件%echo^ >>%report_file%调用:htmlsectionfootercall:htmlsectionheader fsfold“flexserver folder”echo此处是flexserver文件夹的内容>%report_file%echo要知道的内容:>>%report_file%echo^ ^ 亚搏在线safe.exe是供应商守护程序。>>%report_file%echo它应该与lmgrd.exe和safe.lic在同一文件夹中。^亚搏在线 >>%报告文件%echo^ 亚搏在线safe.exe和lmgrd.exe已添加到防火墙中。^ ^ >>%report_file%::告诉客户我们要做什么,genecho扫描flexnet配置…::此命令将文件名保存到reportecho^ >>%report_file%dir“%fm_lmgrd_folder%”/b>>%report_file%echo。>>%Report_File%Echo*****************************************************************************>>%Report_File%Echo现在我们检查safe.exe和lmgrd.exe的版本>>%Rep亚搏在线ort_File%Echo版本必须为11.8或更高版本>>%Report_File%Echo*************************>>%Report_File%:让我们使用lmutil everything来查看什么是可用的或正在运行的echo。>>%report_file%echo s亚搏在线afe.exe>>%report_file%”%fm_lmutil_path%lmver“%fm_safe_path%”>>%report_file%echo lmgrd.exe>>%report_file%”%fm_lmutil_path%lmver“%fm_lmgrd_path%”>>%report_file%echo。>>%报告文件%echo^ >>%report_file%call:htmlsectionfootercall:htmlsectionheader host“sa亚搏在线fe.lic comparison”echo这里是主机名和主机ID。>>%report_file%echo这些应该在safe.lic文件中。>>%report_file%echo许可证文件必须包含主机名或“localhost”,>>%report_file%echo和其中一个hostids>>%report_file%echo^ >>%report_file%echo主机名是:>>%report_file%”%fme_lmutil_path%“lmhostid-hostname>>%report_file%echo。>>%report_file%echo主机ID是:>>%report_file%”%fme_lmutil_path%“lmhostid>>%report_file%echo。>>%report_file%:将safe.lic的内容添加到reportec亚搏在线ho。>>%report_file%echo>>%report_file%echo safe.lic>>%report_f亚搏在线ile%echo的内容。>>%report_file%键入“%safe亚搏在线_lic_path%”>>%report_file%echo。>>%report_file%:将safe.opt文件的内容添加到reportecho亚搏在线。>>%report_file%echo***选项文件***>>%report_file%echo safe.opt文件是可选的。亚搏在线>>%report_file%echo它可能不存在>>%report_file%echo watch for groupings,除外责任,记住这是区分大小写的。>>%报告文件%echo。>>%report_file%echo.echo可选选项文件可能在下面:>>%report_file%type“%fme_opt_path%”>>%report_file%echo^ >>%报告文件%调用:htmlsectionfooterCall:htmlsectionheader log“日志文件,pre restart“echo here是现有的日志文件^
>>%报告文件%回显要监视的内容:^
>>%报告文件%echo^ ^ 任何错误消息^ >>%报告文件%echo^ 任何警告^ ^ >>%报告文件%echo^ >>%report_file%:将safe.log的初始内容添加到reportecho。亚搏在线>>%report_file%echo>>%report_file%echo safe.log>>%report_file%echo亚搏在线的初始内容。>>%report_file%键入“%safe亚搏在线_log_path%”>>%report_file%echo。>>%报告文件%echo^ >>%report_file%call:htmlsectionfootercall:htmlsectionheader restart“许可证服务器重新启动”clsecho现在我们停止/重新启动许可证服务器服务。>>%report_file%echo如果服务未启动,它的名称或安装可能不正确。>>%报告文件%echo^ >>%report_file%::现在我们将停止/重新启动FME许可证服务器服务::告诉客户我们要做什么,停止并重新启动FME许可证服务器服务…echo。>>%report_file%echo正在尝试停止FME许可证服务器…>>%report_file%net停止“FME许可证服务器”>>%report_file%echo正在尝试启动FME许可证服务器…>>%报告文件%net启动“FME许可证服务器”>>%报告文件%echo。>>%报告文件%echo。>>%报告文件%echo^ >>%report_file%call:htmlsectionfootercall:htmlsectionheader log new“new log file”echo这里是新的日志文件。^
>>%报告文件%回显要监视的内容:^
>>%报告文件%echo^ ^ 任何错误消息^ >>%报告文件%echo^ 任何警告^ >>%报告文件%echo^ 任何主机名^ >>%报告文件%echo^ 有软管吗^ >>%报告文件%echo^ 任何端口号^ ^ >>%报告文件%echo^ >>%报告文件%echo。>>%report_file%键入“%safe亚搏在线_log_path%”>>%report_file%echo^ >>%report_file%:我们应该指出报告已经结束。>>%report_file%echo***报告文件结束***>>%report_file%:让我们将报告复制到桌面,要使客户的生活更简单,请将屏幕颜色设置为nieclscolour 0a::有关客户的一些最终说明,请将%report\u file%发送到support@safe.comecho.echo桌面echo.echo桌面上有%report\u name%的副本。哦,谢谢!pausecolor 0fgoto:eof::::::::这里的函数:::::::::htmlheaderecho ^<^!doctype html^>>%报告文件%echo^亚搏在线 ^ >>%报告文件%echo^ flexnet故障排除报告^ >>%报告文件%echo^ >>%报告文件%echo^ >>%报告文件%echo^ flexnet故障排除报告^ >>%报告文件%echo^ 目录^ >>%报告文件%echo^ >>%报告文件%echo^ ^ 系统信息^^ >>%报告文件%echo^ ^ 正在运行进程^^>>%报告文件%echo^ ^ 环境变量^^>>%报告文件%echo^ ^ 注册表^^>>%报告文件%echo^ ^ 防火墙例外^^>>%报告文件%echo^ ^ FlexServer文件夹^^>>%报告文件%echo^ ^ 亚搏在线安全性比较^^>>%报告文件%echo^ ^ 日志文件,预重新启动^^>>%报告文件%echo^ ^ 许可证服务器重新启动^^>>%报告文件%echo^ ^ 新建日志文件^^>>%报告文件%echo^ >>%报告文件%echo^
>>%报告文件%goto:eof:htmlfooterecho报告结束。>>%报告文件%echo^
^
>>%报告文件%goto:eof:htmlsectionheaderecho^ >>%报告文件%echo^ %~2个^ >>%报告文件%echo^>>%报告文件%goto:eof:htmlsectionfooterrecho^ 返回顶部^>>%报告文件%echo^
>>%报告文件%goto:eof