无法从perfmon数据收集器中干净地滚动日志文件 [英] Having trouble getting cleanly rolling log files from perfmon data collectors

查看:80
本文介绍了无法从perfmon数据收集器中干净地滚动日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在使用Server 2008的两台不同计算机上使用Perfmon.exe,并在每台计算机上遇到不同的问题:

So I am using Perfmon.exe on two different computers with Server 2008, and getting different problems on each computer:

1)我有Perfmon连续运行,设置为每分钟一次记录输出到.csv文件,并且为了防止日志文件变得太大,我"重启数据收集器设置为限制"。选中,最大尺寸为1MB。  我还
有"覆盖"字样模式检查日志记录。

1) I have Perfmon running continuously, set to log output once a minute to a .csv file, and in order to keep the log file from getting too large, I have "restart the data collector set at limits" checked, with a maxmium size of 1MB.  I also have the "overwrite" mode checked for logging.

我的预期(和预期)行为是数据收集器将创建一个新的日志文件,当旧的日志文件达到1MB时替换旧日志文件。  实际发生的是,在日志文件达到1MB后,数据收集器只会停止写入.csv文件的
。  如何获得我想要的行为?

My expected (and intended) behavior here is that the data collector would create a new log file, replacing the old one, when the old one has gotten to 1MB.  What actually happens is that after the log file reaches 1MB, the data collector just stops writing to the .csv file.  How do I get my desired behavior?

2)在另一台机器上,我有相同的设置,我的数据收集器配置与上面完全相同,但perfmon.exe除外正在将输出写入不同的编号文件夹,而不是根目录中的.csv文件(我不知道为什么......它
只是不让我设置C:\ PerfLogs \ Adminmin \\ MyTest \ MyTestName.csv作为1)中计算机的输出路径)。  

2) On a different machine, I have the same setup and my data collector is configured exactly the same as above, except that perfmon.exe is writing the output to different numbered folders, instead of a .csv file in the root directory (I don't know why...it just won't let me set C:\PerfLogs\Admin\MyTest\MyTestName.csv as the output path the way the computer in 1) did).  

无论如何,每次数据收集器启动时,它都会写入新编号的文件夹。  上次我尝试启动它时,出现了一个错误,即数据收集器启动时文件夹太多。 (显然"太多"= 5)。   I
甚至不想要旧文件夹,我唯一关心的数据是perfmon是最近的5分钟数据点,因为我立即将输出发送到我们基于Unix的集中性能记录服务器。  我怎么能把它变成
而不是不断创建文件夹或删除旧文件夹?

Anyway, each time that the data collector starts, it writes to a new numbered folder.  The last time I tried to start it, I got an error that there are too many folders for the data collector to start. (Apparently "too many" = five).  I don't even want the old folders to stick around, the only data I care about from perfmon is the most recent 5 minutes of data points since I immediately send the output to our centralized Unix-based performance logging server.  How can I get it to either not continually create folders or to delete the old ones?

谢谢!

推荐答案

对于第一个问题,请尝试kb文章中的步骤:
http://support.microsoft.com/kb/2028603
。看看你面临的问题是否相同并由此解决。

For the first problem, try the steps from kb article: http://support.microsoft.com/kb/2028603 . See if the issue you are facing is same and resolved by this.

对于第二个问题,由于为数据设置了一些不正确的数据管理器属性,可能会导致"太多"文件夹失败集电极。您可以在
http://上阅读有关如何为数据收集器配置数据管理器属性的信息。 technet.microsoft.com/en-us/library/cc765998.aspx 。与仅保留最后5个文件夹一样,您需要相应地设置"最大文件夹"和"资源策略"。

For the second issue, you might get the ‘too many’ folders failure due to some incorrect datamanager properties set for the data collector. You can read about how to configure the data manger properties for your data collector at http://technet.microsoft.com/en-us/library/cc765998.aspx . Like for keeping last 5 folders only, you would need to set the ‘Maximum folders’ and ‘Resource policy’ accordingly.

为防止数据收集器不断创建文件夹,而是在根文件夹本身生成日志文件,您可以尝试删除"子目录名称格式" datacollector属性, 目录选项卡:

For preventing the datacollector from continually creating folders and rather generate the log file in the root folder itself, can you try to delete the 'Subdirectory name format' in the datacollector properties, directory tab:

- 右键单击​​扩展的"用户定义"选项卡下的数据收集器,然后选择"属性"

-Right click datacollector under expanded 'User Defined' tab and select 'properties'

- 在'目录'选项卡,清除子目录名称格式。单击确定。现在不应创建子文件夹,现在应在"根目录"文件夹中创建日志文件。 

- In the 'Directory' tab, clear the subdirectory name format. Click OK. No subfolders should now be created and the log files should now be created in the 'root directory' folder. 

如果您需要更多指导,请告诉我们。

Let us know if you need more guidance.

希望这会有所帮助!


这篇关于无法从perfmon数据收集器中干净地滚动日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆