美文网首页squbsScala In Action
squbs-12. 监控运行时的actor

squbs-12. 监控运行时的actor

作者: 吕亦行 | 来源:发表于2017-01-27 10:04 被阅读29次

原文地址:Monitoring Actors at Runtime

概览

在actor system中,squbs-actormonitor模块附加监控至每一个actor。这可以侵入大量的actor。监控的actor的数量可以在application.conf配置。在生产中,判断是否附加这些模块。该模块,没有用户的API。

依赖

以下依赖加入到你的 build.sbt或scala构建文件中

"org.squbs" %% "squbs-actormonitor" % squbsVersion

监控

每个actor有一个相对应的 JMXBean(org.squbs.unicomplex:type=ActorMonitor,name=%actorPath)来暴露actor信息:

 trait ActorMonitorMXBean {
  def getActor: String
  def getClassName: String
  def getRouteConfig : String
  def getParent: String
  def getChildren: String
  def getDispatcher : String
  def getMailBoxSize : String
}

配置

以下的是 squbs-actormonitor的配置条目:

squbs-actormonitor = {
  maxActorCount = 500
  maxChildrenDisplay = 20
}

JMX Bean org.squbs.unicomplex:type=ActorMonitor 暴露Actor Monitor的配置。JMX Bean是只读的。

 trait ActorMonitorConfigMXBean {
  def getCount : Int                //Count of JMX bean has been created 
  def getMaxCount: Int              //Maximum JMX bean can be created
  def getMaxChildrenDisplay: Int        //Per each actor, maximum children can be exposed 
 }

相关文章

  • squbs-12. 监控运行时的actor

    原文地址:Monitoring Actors at Runtime 概览 在actor system中,squbs...

  • [翻译]squbs官网之14 运行时监控Actor

    概述 squbs-actormonitor 模块在actor系统中为每一个actor进行监控。对于大量的actor...

  • Akka的监管和监控

    Akka的监管和监控 监管和监控 在 Actor 系统 中说过,监管描述的是actor之间的依赖关系:监管者将任务...

  • akka actor处理未捕获异常

    突然发现在actor中发生的未处理运行时异常,会导致actor重启,但是不会被记录到日志,只能输出到system....

  • 简谈JVM之性能监控和调优

    性能监控 linux命令监控uptime 显示系统运行时间、连接数、负载情况top 系统运行时间、平均负载情况、...

  • Spring Boot 揭秘与实战

    Spring Boot 揭秘与实战(九) 应用监控篇 - HTTP 应用监控 Spring Boot 提供运行时的...

  • Spring Boot揭秘与实战

    Spring Boot 揭秘与实战(九) 应用监控篇 - HTTP 应用监控 Spring Boot 提供运行时的...

  • Akka监控策略

    一. 创建一个监控策略 策略的选择one-for-one strategy: 每个actor被单独处理all-fo...

  • AKKA学习笔记

    有两种方式可以获取Actor引用,一是创建Actor,而是查找Actor。 创建Actor 一个actor系统通常...

  • SpringBoot之程序性能监控

    经典名言--无监控不调优 要想进行SpringBoot项目调优,首选需要监控项目运行时情况。当下SpringBoo...

网友评论

    本文标题:squbs-12. 监控运行时的actor

    本文链接:https://www.haomeiwen.com/subject/oixfittx.html