metrics

Graphing a process's memory usage

自作多情 提交于 2019-12-04 07:27:00
问题 Does anyone know of a tool to visually show the memory usage of a selected process on Ubuntu? ps aux will show a numerical snapshot, but I'd really like a line I can watch change as I hammer the process and hopefully see unexpected behaviours. Has anyone got any suggestions? 回答1: I couldn't find any real tools to do it. But I have found a neat small set of scripts that'll do it. Using this little bash loop to do the logging: while true; do ps -C <ProgramName> -o pid=,%mem=,vsz= >> /tmp/mem

Eclipse count lines of code

ⅰ亾dé卋堺 提交于 2019-12-04 07:23:12
问题 I've tried the Metrics plugin and although it's nice and all, it's not what my boss is looking for. It counts a line with just one } as a line and he doesn't want that to count as "its not a line, its a style choice". I also need to generate some form of report about the metrics provided. Are there any good tools for this? 回答1: Install the Eclipse Metrics Plugin. To create a HTML report (with optional XML and CSV) right-click a project -> Export -> Other -> Metrics . You can adjust the Lines

Unable to Access [Guest] metrics using Get-AzureRmMetric

两盒软妹~` 提交于 2019-12-04 06:12:52
问题 I have guest-level metrics enable for an Azure Virtual Machine and am trying to get the history for the [Guest]\Memory\Committed Bytes property using Get-AzureRMMetric . $endTime = Get-Date $startTime = $endTime.AddMinutes(-540) $timeGrain = '00:05:00' $metricName = '\Memory\Committed Bytes' $history=(Get-AzureRmMetric -ResourceId $resourceId ` -TimeGrain $timeGrain -StartTime $startTime ` -EndTime $endTime ` -MetricNames $metricName) $history.data | Format-table -wrap Average,Timestamp

springboot面试题

自古美人都是妖i 提交于 2019-12-04 05:36:24
Springboot面试题 1,SpringBoot启动方式 IDE 运行Application这个类的main方法 在springboot的应用的根目录下运行mvn spring-boot:run 使用mvn install 生成jar后运行 2,SpringBoot中用那些注解 @SpringBootApplication @Component: @RestController 3,@EnableAutoConfiguration作用 从classpath中搜索所有META-INF/spring.factories配置文件然后, 将其中org.springframework.boot.autoconfigure.EnableAutoConfiguration key对应的配置项加载到spring容器 4,SpringBoot热部署使用什么? Spring Loaded spring-boot-devtools 5,热部署原理与热加载区别是什么? 部署方式 热部署在服务器运行时重新部署项目 热加载在运行时重新加载class 实现原理 热部署直接重新加载整个应用 热加载在运行时重新加载class 使用场景 热部署更多的是在生产环境使用 热加载则更多的实在开发环境使用 6,SpringBoot多数据源事务如何管理 @Async 7,SpringBoot如何实现打包

Influxdb+Grafana打造Flink监控大盘

99封情书 提交于 2019-12-04 02:48:32
Influxdb+Grafana打造Flink监控大盘 Influxdb安装 Grafana安装 Flink配置 Grafana配置报表 Influxdb安装 为什么选influxdb,每条记录都有一个时间戳,很适合这种统计的场景,当然还有其它原因 安装参考文档 注意事项 ,如果要在界面打开查询界面 需修改配置 /etc/influxdb/influxdb.conf [admin] # Determines whether the admin service is enabled. enabled = true # The default bind address used by the admin service. bind-address = ":8083" 最后如图 web 端口 8083 命令行查询界面启动 influx setup Grafana安装 安装文档 Flink配置 参考文档 Flink 1.8才支持report到influxdb 修改配置文件 flink-conf.yaml metrics.reporter.influxdb.class: org.apache.flink.metrics.influxdb.InfluxdbReporter metrics.reporter.influxdb.host: centos-6 metrics.reporter

flink实战--REST API与metrics监控

江枫思渺然 提交于 2019-12-04 02:48:03
Flink metrics简介 Flink的metrics是Flink公开的一个度量系统,允许收集flink程序的公开指标到外部系统,我们也可以自定义指标通过metric收集,实际开发时经常需要查看当前程序的运行状况,flink 提供了 UI 界面,有比较详细的统计信息。但是 UI 界面也有不完善的地方,比如想要获取 flink 的实时吞吐。本文将详细介绍如何通过metric监控flink程序,自定义监控指标以及metrics在flink的UI界面的应用。 metrics在UI页面上的应用 在flink的UI的界面上我们点击任务详情,然后点击Task Metrics会弹出如下的界面,在 add metic按钮上 我们可以添加我需要的监控指标。 注意: 如果点击Task Metrics没有显示Add metics 点击一下任务的DAG图就会显示出来,当我们点击了DAG图中某个算子的名字,那么Add metric显示的就是该算子的监控指标,且按照分区显示,算子名前置的数字就是分区号。 各个指标的含义 关于各个指标的含义官网上有详细介绍: https://ci.apache.org/projects/flink/flink-docs-release-1.7/monitoring/metrics.html#availability 自定义监控指标 案例:在map算子内计算输入的总数据 设置

prometheus监控Flink(一)

跟風遠走 提交于 2019-12-04 02:46:57
目前Flink监控常用的手段有基于prometheus或者influxDB,还有就是基于rest api的。这里主要说的是基于prometheus的。附上官网的地址 https://ci.apache.org/projects/flink/flink-docs-release-1.9/monitoring/metrics.html#prometheuspushgateway-orgapacheflinkmetricsprometheusprometheuspushgatewayreporter 这种方式就是基于PushGateway + prometheus的方式。Flink任务先将数据推到pushgateway。然后pushgateway将值推送到prometheus,最后grafana展示prometheus中的值,就如同下图 1.pushgateway安装 pushgateway是prometheus的一个附属组件,所以下载地址都可以在prometheus官网中找到 https://prometheus.io/download/ 可以去下载最新的这两个组件的版本 解压pushgateway tar -zxvf pushgateway-1.0.0.linux-amd64.tar.gz 然后可以直接启动 nohup ./pushgateway & 如果启动成功

Apache Storm : Metrics log file is empty

我只是一个虾纸丫 提交于 2019-12-03 21:51:06
I am trying to follow the example here https://www.endgame.com/blog/storm-metrics-how here is my storm.yaml storm.zookeeper.servers: - localhost supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703 - 6704 nimbus.host: localhost ui.port: 8080 ui.host: localhost storm.log.dir: /path/to/storm/logdir topology.max.spout.pending: 5000 I tried running the topology in local and cluster mode. the metrics.log file is created at the location /path/to/storm/logdir but the file is empty! am i missing some configuration? The problem is with the current log4j2 setup of Metrics in Storm and the fix is a little

How can I reset timer of dropwizard metrics?

时间秒杀一切 提交于 2019-12-03 21:48:36
问题 We are processing messages that comes in periodically. We use codahale dropwizard metrics' "Timer" for measuring the time it takes to process them. I found someone had the same issue here: "problem with exponentially decaying reservoir is that if no new data comes in, it will keep on giving the same numbers all the times. For example, let say you update a timer with 5 and 7 (then don't put anything at all) , then no matter when you see (even after x hours), timer will still show the average

Disable plugins on Eclipse startup

半世苍凉 提交于 2019-12-03 17:50:25
问题 I just installed a plugin for Eclipse, but as a result Eclipse will no longer start. It says "There was an error" or some such uninformative message. How can I start Eclipse without it loading plugins so that I can actually uninstall the offending software? 回答1: As another person mentioned, you can try the -clean option. However, if it still fails to load and you need to revert your install, you should NOT simply delete a plugin on disk. If Eclipse thinks a plugin is there, and suddenly it's