Coldfusion 服务器状态页面
我想在 ColdFusion 网站(有专用服务器)上创建一个页面,为用户提供有关服务器承受的压力大小的一些信息。
这样用户就可以去那里看到服务器速度慢的原因是因为流量高,或者是由于其他原因(这可能是我手动提供的信息)。
流量数据需要是动态的。
所以我很好奇以前是否有人尝试过解决类似的问题?是否有一些开源包可以提供帮助?
I'd like to create a page on a ColdFusion website (which has a dedicated server) which provides users with some information about the amount of stress that the server is under.
So that users can go there and see that the reason that the server is slow is because of the high traffic, or due to something else (which would prob be information that I provide manually).
The traffic data needs to be dynamic.
So I'm curious if anyone else has tried tackling something like this before? and if there might be some open source package available to help out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
有多种免费(而非免费)CF 监控工具可供使用,形状和大小各异。这是一个很好的列表:
http://cf411.com/#cfmon
该列表中的许多内容都是您正在寻找的类型允许您在单个页面中向用户公开此类数据。如果您确实将其放在公共服务器上,我建议将身份验证放在它前面...这不是您想要向公众公开的信息! :)
There are several free (and not free) CF monitoring tools available out there of all shapes and sizes. Here's a good list:
http://cf411.com/#cfmon
Many on that list are the type you're looking for that would allow you to expose such data to your users in a single page. If you do put this on a public server, I'd recommend putting authentication in front of it...this is not the kind of info you'd want to expose to the general public! :)
对于初学者来说,您可以获取有关 JVM 内内存使用情况的实时信息:
也可以(尽管显然并非在所有系统上)获取
有关服务器本身内存情况的信息:如果您使用服务器监视器 API。如果您使用 FusionReactor,FRAPI 公开了各种有趣的函数,例如
getCpuUsage()
。我不确定向用户公开此类信息是否有意义,但有一些选择。
For starters, you can obtain live information about memory usage within the JVM:
It's also possible -- although apparently not on all systems -- to get information about the memory situation on the server itself:
You can go into greater detail if you use the Server Monitor API. And if you use FusionReactor, the FRAPI exposes all kinds of interesting functions, like
getCpuUsage()
.I'm not sure it makes sense to expose this kind of information to your users, but there are options.
我不确定您是否在 Windows 上运行,但如果您是另一个选择是允许
perfmon
收集有关 ColdFusion 实例的统计信息,例如平均请求时间、队列长度等。您当然也可以通过
perfmon
收集 CPU、可用内存等,并将它们存储在一组日志文件中,您可以使用 CF 计划任务每分钟读取一次,并将其存储在数据库中以进行汇总和图表等。当然,您的数据可能在这种情况下最多可达一分钟,但它对于存储数天和数月的指标非常有用,这样您就可以了解服务器在一段时间内的性能情况。
我们已经使用这个解决方案几年了,虽然需要一些维护,但它确实让我们对所有服务器的性能有一个很好的了解。
我想将来使用 New Relic 之类的东西,但它们不支持 JRun。也许如果 CF 允许与 Tomcat 独立,我们将来会看到这个选项。
I'm not sure if you are running on Windows, but if you are another option is to allow
perfmon
gather stats about your ColdFusion instance such as Average Request Time, Queue Length etc.You can also of course gather CPU, Available Memory etc via
perfmon
and store them a set of log files you can read once a minute using a CF scheduled task and store in the database to summarise and graph etc.Of course your data might be up to a minute old in this case, but it can be very useful for storing metrics over days and months so you can see how your server is performing over time.
We have used this solution for a few years now and while it takes some maintenance, it does give us a great overview of how all our servers perform.
I would like to use something in future like New Relic but they do not support JRun. Maybe if CF allow standalone with Tomcat we'll see this option in future.
真的取决于您想看到什么具体数据?
我认为谷歌分析的混合,如果你在 Windows 上使用 wmi,收集硬件/操作系统/coldfusion 性能计数器/统计数据。
这是 wmi 和 Coldfusion 的示例。
http://misterdai.wordpress.com /2010/03/02/askdave-cf7-cpu-usage-on-windows/
然后这是我同样的问题,以及一些示例:
我想在 Windows 上的 ColdFusion 中使用 WMI 或 Java 来获取性能数据< /a>
Really depends on what exact data you want to see?
I think a mixture of google analytics, and if your on windows using the wmi, to gather hardware/os/coldfusion performance counters/statistics.
Here is an example of wmi and coldfusion.
http://misterdai.wordpress.com/2010/03/02/askdave-cf7-cpu-usage-on-windows/
And then here was my same exact question, and some examples:
I want to use WMI or Java in ColdFusion on Windows to get performance data