【连载】vSphere 4.0 问答(7) --- 如何删除/清理vCenter日志?

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

声明:本文是本人个人兴趣所致,自行翻译,翻译并不完全按照原文,错漏
在所难免。如因参照本文实施而造成的数据丢失/系统损坏,请自行承担,本
人不负任何责任。如非商业用途,本文可以随便转载,但请注明作者和出处
================================================


问:如何删除/清理vCenter日志?
答:vCenter日志以文本文件的形式保存在vCenter服务器上,默认位置是
C:\Documents & Settings\All Users\Application Data\VMware\VMware Virtual Center\Logs.
因为当vCenter Server 服务运行的时候,最新版本的日志文件正在使用中,所以如果要清理的话,必须先暂时停下此服务。

步骤:
1. 停止 VMware vCenter Server 服务
2. 打开资源管理器并找到C:\Documents & Settings\All Users\Application Data\VMware\VMware Virtual Center\Logs
3. 如果需要将日志文件归档的话,可以选择所有vpxd-*.log文件,发送到一个压缩文件,并取一个有意义的文件名(比如2010Jan-Dec-vCenter-Log.zip),并把这个归档文件保存到一个安全的地方
4. 删除该目录中的内容,包括vpxd-index索引文件
5. 重启VMware vCenter Server 服务
6. 查看并验证 vpxd-*.log文件(包括起第一个日志vpxd-0.log)应该已经被创建了。

注意:停掉VMware vCenter Server 服务并不会影响到任何虚机的运行。但是,vSphere Client的连接会被重置。此外,所有日志文件会被自动以Tar+Gzip方式压缩,并且会以循环覆盖的方式保存9个(默认值)历史记录和一个当前的日志记录。

delxu文档,转载请注明出处http://to.ly/78FA

-----------------------原文分割线--------------------------------


Deleting/Cleaning up vCenter logs 

The vCenter logs are stored as text files located in the file system of the vCenter server. By default, they are located at C:\Documents & Settings\All Users\Application Data\VMware\VMware Virtual Center\Logs. Since the most recent log file is in use when the vCenter server service is running, it must be stopped temporarily if you are to clean them out.   

1.     Stop the “VMware vCenter Server” service. 
2.     Navigate to C:\Documents & Settings\All Users\Application Data\VMware\VMware Virtual Center\Logs. 
3.     Consider saving an archive copy of the log files. Select the vpxd-*.log files and send to “Compressed Folder.” Rename the .zip file to something meaningful 
       (include the current date as part of the filename). Move the .zip file to a safe location. 
4.     Delete the contents of C:\Documents & Settings\All Users\Application Data\VMware\VMware Virtual Center\Logs, including the vpxd-index file. 
5.     Restart the “VMware vCenter Server” service. 
6.     Verify that the vpxd-*.log file and the first log (vpxd-0.log) have been created. 

Stopping the vCenter Server service will not affect the availability of any guest servers. However, any existing vSphere Client connections will be reset. 
Also, all logs are automatically compressed using Tar + Gzip and rolls through a default of 9 historical copies plus the current log.

你可能感兴趣的:(【连载】vSphere 4.0 问答(7) --- 如何删除/清理vCenter日志?)