我喜欢使用这些命令来查看服务器上的内存使用情况:
ps -u $USERNAME -o pid,rss,command | awk '{print $0}{sum+=$2} END {print "Total", sum}'
Run Code Online (Sandbox Code Playgroud)
在 Python 脚本中收集总和的最佳方法是什么?我查看了 psutil,但该模块仅收集全局内存信息,并且无法按用户过滤它。
将 wmi_exporter 或 scollector_exporter 与 Prometheus 一起使用时,我发现很难获得准确的 CPU 使用情况。这是我正在使用的指标以及我用于 scollector 的查询:
os_cpu with returns: 1.54432653e+07
Run Code Online (Sandbox Code Playgroud)
我用费率进行查询:
rate(os_cpu{exported_instance="myHost"}[30s])
Run Code Online (Sandbox Code Playgroud)
os_cpu 返回总体 CPU 使用情况,即所有核心,并将其与 Windows 中的任务管理器进行比较,它不会累加,因为显示的最大值为 100%。CPU 使用率不可能达到 300%。
我该如何处理查询才能获得更准确的测量结果?
我有詹金斯https://jenkins.example.com。插件与 2 环境一起工作。变量:
PROMETHEUS_ENDPOINT Configures rest endpoint. Defaults to "prometheus"
PROMETHEUS_NAMESPACE Configure prometheus metric namespace. Defaults to "default"
我需要将指标发送至https://jenkins.example.com/metrics
什么PROMETHEUS_ENDPOINT和PROMETHEUS_NAMESPACE价值观?
我正在使用spring-boot 2与graphite. 我想为我的所有指标添加前缀。
@Bean
public MeterRegistry graphiteRegistsry() {
return new GraphiteMeterRegistry(
GraphiteConfig.DEFAULT, Clock.SYSTEM,
(id, convention) -> "prefix." +
HierarchicalNameMapper.DEFAULT.toHierarchicalName(id,convention));
}
Run Code Online (Sandbox Code Playgroud)
如果我使用此代码,这实际上是添加前缀,但也创建一些没有前缀的指标。看来他们几乎所有的指标都是重复的。
如何添加这个前缀?并且从此应用程序转到石墨的所有指标都将包含前缀?
谢谢。
在 stein 版本中,ceilometer 删除了对 cpu_util 的轮询。
请遵循此文档: https://docs.openstack.org/ceilometer/stein/admin/telemetry-measurements.html#openstack-compute
仅测量 cpu(使用的 CPU 时间)和 vcpus(分配给实例的虚拟 CPU 数量)。
并检查关于ceilometer的github提交https://github.com/openstack/ceilometer/blob/4ae919c96e4116ab83e5d83f2b726ed44d165278/releasenotes/notes/save-rate-in-gnocchi-66244262bc4b7842.yaml,
cpu_util 计量表已弃用。
这个关于云高计的提交删除了变压器支持。
根据提交消息,gnocchi 处理变压器数据。
那么,如何使用gnocchi聚合cpu和vcpu来计算cpu使用率呢?
如何在不使用rate()或irate()的情况下计算Prometheus或Grafana中时间序列的每秒即时增长率?
此驱动功能无助于实现与 irate 相同的结果
irate(node_cpu_seconds_total[5m])
deriv(node_cpu_seconds_total_gauge[5m])
Run Code Online (Sandbox Code Playgroud)
实际上,我需要计算计量指标数据的时间序列的每秒瞬时增长率,这是一种修改后的计数器指标类型数据。
我想为 Lambda 的错误日志添加 CloudWatch 自定义仪表板。我想要仅包含反映 Lambda 函数中错误的日志的指标。我尝试在日志见解中使用以下查询,但它不起作用:
fields @timestamp, @message
| sort @timestamp desc
| filter @message like ERROR
| limit 20
Run Code Online (Sandbox Code Playgroud)
我也尝试创建过滤器,但它向我展示There are no metrics in this namespace for the region "Europe (London)"
<< 当我运行下面的代码时,我已经导入了 import tensorflow_addons as tfa
densenetmodelupdated.compile(loss ='categorical_crossentropy', optimizer=sgd_optimizer, metrics=
['accuracy', tf.keras.metrics.Recall(),
tf.keras.metrics.Precision(),
tf.keras.metrics.AUC(),
tfa.metrics.F1Score(num_classes=25, average="macro")])
Run Code Online (Sandbox Code Playgroud)
<<显示错误
AttributeError Traceback (most recent call last)
<ipython-input-25-5f3ab8b4cc77> in <module>()
16 tf.keras.metrics.Precision(),
17 tf.keras.metrics.AUC(),
---> 18 tfa.metrics.F1Score(num_classes=25, average="macro")])
AttributeError: module 'tensorflow.keras.metrics' has no attribute 'F1Score'
Run Code Online (Sandbox Code Playgroud) 我有两组形状相同的列向量 X = (X_1 ... X_n), Y = (Y_1 ... Y_n)。
我想计算这样的东西:
即 X 和 Y 之间直到列排列的最小 L2 范数。是否有可能在小于 O(n!) 的时间内完成?例如,它已经在 Numpy 中实现了吗?先感谢您。
是否有KISSmetrics API的node.js库(http://support.kissmetrics.com/apis/specifications)?
不幸的是,我不认为客户端js(http://support.kissmetrics.com/apis/javascript)库与node.js一起使用?
注意:我想KISSmetrics的node.js库看起来很像MixPanel库:https://github.com/carlsverre/mixpanel-node
metrics ×10
monitoring ×3
prometheus ×3
cpu-usage ×2
grafana ×2
java ×2
python ×2
algorithm ×1
analytics ×1
aws-lambda ×1
ceilometer ×1
graphite ×1
jenkins ×1
keras ×1
kissmetrics ×1
memory ×1
micrometer ×1
mixpanel ×1
node.js ×1
numpy ×1
openstack ×1
permutation ×1
spring-boot ×1
tensorflow ×1