zoukankan      html  css  js  c++  java
  • [Erlang危机](5.1.0)VM检测概述

    原创文章。转载请注明出处:server非业余研究http://blog.csdn.net/erlib 作者Sunface
    联系邮箱:cto@188.com



    Global View

    全局视图

    For a view of the VM in the large, it’s useful to track statistics and metrics general to the VM, regardless of the code running on it. Moreover, you should aim for a solution that allows long-term views of each metric — some problems show up as a very long accumulation over weeks that couldn’t be detected over small time windows.
     Good examples for issues exposed by a long-term view include memory or process leaks, but also could be regular or irregular spikes in activities relative to the time of the day or week, which can often require having months of data to be sure about it.

     对于大型的VM,跟踪统计(statistics)和指标(metrics)通常对VM很实用。

    此外。你应该有一个同意长时间观察每一个指标的方案——一些问题仅仅能通过长时间的累积执行才浮现出来(甚至长达几周)。
     一个须要长时间观測才干检測的典型样例:内存或进程泄漏,可能是某一天或某一周时间内某些规则或不规则的活动峰值造成的,这可往往须要分析几个月的数据才干找出问题。

     For these cases, using existing Erlang metrics applications is useful. Common options are:
     • folsom 3 to store metrics in memory within the VM, whether global or app-specific..
     • vmstats  4 and statsderl 5, sending node metrics over to graphite through statsd 6.
     • exometer 7, a fancy-pants metrics system that can integrate with folsom (among other things), and a variety of back-ends (graphite, collectd, statsd, Riak, SNMP, etc.). It’s the newest player in town
     • ehmon 8 for output done directly to standard output, to be grabbed later through specific agents, splunk, and so on.
     • custom hand-rolled solutions, generally using ETS tables and processes periodically dumping the data. 9
     • or if you have nothing and are in trouble, a function printing stuff in a loop in a shell 10.
    It is generally a good idea to explore them a bit, pick one, and get a persistence layer that will let you look through your metrics over time.

     对于这些情况,使用现有的Erlang检測方法是很实用,经常使用的选择例如以下:
     • folsom3把执行指标储存在VM的内存中。能够指定是全局的还是app所特有的。
     • vmstats4 和 statsderl,能够使用statsd6发送节点的指标。
     • exometer7
     一个整合了folsom(还有其他的),各式各样的back-ends(graphite,collectd,statsd,Riak,SNMP等)的很高级的系统,也是最新的工具库。
     • ehmon8把输出直接放到标准输出上,能够被其他特定的代理所捕获。
     • 自己定义的方案:一般是使用ETS表、进程来定期的dump数据9

     • 也许你根本就没有什么麻烦。你仅仅须要一个函数在loop里面打印出东西到shell上即可了10


    对于以上方法,你能够大概浏览下他们,然后选一个。细致研究下,让它能够随时看到你想了解的指标。

    [3] https://github.com/boundary/folsom
    [4] https://github.com/ferd/vmstats
    [5] https://github.com/lpgauth/statsderl
    [6] https://github.com/etsy/statsd/
    [7] https://github.com/Feuerlabs/exometer
    [8] https://github.com/heroku/ehmon
    [9] Common patterns may fit the ectr application, at https://github.com/heroku/ectr
    [10] The recon application has the function recon:node_stats_print/2 to do this if you’re in app

    [注3]: https://github.com/boundary/folsom
    [注4]: https://github.com/ferd/vmstats
    [注5]: https://github.com/lpgauth/statsderl
    [注6]: https://github.com/etsy/statsd/
    [注7]: https://github.com/Feuerlabs/exometer
    [注8]: https://github.com/heroku/ehmon
    [注9]: Common patterns may fit the ectr application, at https://github.com/heroku/ectr
    [注意10]:recon application 有能够进行功能app巷电话recon:node_stats_print/2做这个事情。
  • 相关阅读:
    properties,yml 文件读取 pom.xml 文件变量
    Docker实战编写Dockerfile
    在SpringBoot中实现异步事件驱动
    HttpClient封装工具类
    oracle临时表的两种方式
    关于cxGrid选中行操作关联数据集的一种方法
    安全释放 TreeView的DATA!
    行字段值拼接成字符串
    delphi中遍历枚举类型的方法
    C#将XML字符串转换成实体对象,并去除cdata
  • 原文地址:https://www.cnblogs.com/blfshiye/p/4838497.html
Copyright © 2011-2022 走看看