频道栏目
首页 > 资讯 > 虚拟机 > 正文

如何在ESX下抓取数据包

11-08-20        来源:[db:作者]  
收藏   我要投稿

使用root账户登陆该虚拟机所在ESX Server的命令行终端,执行以下指令:
vm-support -s -i 10 -d 600
 
vm-support是一个用于搜集ESX信息的工具,同时还可以用来保存ESX的配置信息,最简单的用法是不带任何选项。
建议在/tmp下运行此脚本,生成的文件格式为esx-{date}.{PID}.tgz。
一个典型的vm-support运行过程为:
[root@BI-ESX1 xiaoyu]# time vm-support
 
VMware ESX Server Support Script 1.27
 
Preparing files: -
 
Error running /usr/sbin/esxcfg-info -a or writing to /tmp/esxcfg-info.27960.txt
(err 1).
Do you have a full disk?
Continuing...
 
Preparing files: -
Waiting up to 300 seconds for background commands to complete:
 
Waiting for background commands: |
Creating tar archive ...
 
 
File: /tmp/xiaoyu/esx-2006-10-24--14.47.27960.tgz
NOTE: esx-2006-10-24--14.47.27960.tgz is greater than 10 MB.
Please do not attach this file when submitting an incident report.
Please contact VMware support for an ftp site.
To file a support incident, go to http://www.vmware.com/support/sr/sr_login.jsp
 
 
To see the files collected, run: tar -tzf /tmp/xiaoyu/esx-2006-10-24--14.47.27960.tgz
 
Done
 
real    9m27.147s
user    0m56.290s
sys     1m3.770s
 
然后你可以用tar -tzvf esx-2006-10-24--14.47.27960.tgz显示搜集了那些文件
搜集的主要信息为:
/tmp/aamSupport.PID HA的信息(VMware的HA使用的是Legato AAM的模块)
/proc/vmware 统计信息
/proc/vmware/config 配置信息
/etc
/etc/sysconfig 系统配置信息
/vmfs/volumes VMFS信息
/var/log 日志信息
另外的一些命令的输出全部都在解压目录下的tmp目录中,如 fdisk, uptime, ifconfig,chkconfig以及一些esxcfg命令。
常用的几种方式还包括:
-x: 列出正在运行的VM, 实际上是通过ls /proc/vmware/vm/*/names命令得到信息
[root@BI-ESX1 root]# vm-support -x
 
VMware ESX Server Support Script 1.27
Available worlds to debug:
 
vmid=1062   Prod-LotteryWeb
vmid=1063   Prod-DWIQ
vmid=1081   Prod-AppServer
vmid=1086   Prod-P2VHelper-CN
-X world ID: 搜集某一VM的信息(world id 可以有-x得到)
 
 
由于ESX主机上FTP功能,你可以通过SCP把数据拷贝到别的服务器在去读取。scp是有Security的文件copy,基于ssh登录。操作起来比较方便,比如要把当前一个文件copy到远程另外一台主机上,可以如下命令。
scp /home/daisy/full.tar.gz root@172.19.2.75:/home/root
 
本文出自 “今夜灿烂” 博客

相关TAG标签
上一篇:linux下DNS详解及高级应用
下一篇: liunx安装DHCP
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站