监控和管理Cassandra
了解Cassandra集群的性能特点有助于诊断和维护Cassandra。由于Cassandra使用JAVA开发的,所以它就提供了JMX环境下的一些管理工具来管理Cassandra,它们包括:Cassandra nodetool工具、DataStax OpsCenter管理控制台和JConsole。
使用nodetool工具
nodetool是一个命令行的工具集,它可以监控Cassandra和执行例行的数据库操作。作为内建的工具,nodetool一般用于在节点上直接运行。
nodetool工具集支持大多数重要的JMX指标和操作,并且包含了一些为管理员准备的命令。这个工具集用得最多的还是输出集群环的快速摘要和集群的当前状况——也就是nodetool status。
nodetool工具集提供了一批用于查看表的指标、服务器指标和压缩统计。
- nodetool cfstats显示了每个表和keyspace的统计数据
- nodetool cfhistograms提供了表的统计数据,包括读写延迟,行大小,列的数量和SSTable的数量。
- nodetool netstats提供了网络连接操作的统计数据。
- nodetool tpstats提供了如active、pending以及完成的任务等Cassandra操作的每个阶段的状态。
示例:
nodetool cfstats命令:
D:\EBOOK\NoSQL\apache-cassandra-2.2.\bin>nodetool cfstats
Starting NodeTool
Keyspace: system_traces
Read Count:
Read Latency: NaN ms.
Write Count:
Write Latency: NaN ms.
Pending Flushes:
Table: events
SSTable count:
Space used (live):
Space used (total):
Space used by snapshots (total):
Off heap memory used (total):
SSTable Compression Ratio: 0.0
Number of keys (estimate): -
Memtable cell count:
Memtable data size:
Memtable off heap memory used:
Memtable switch count:
Local read count:
Local read latency: NaN ms
Local write count:
Local write latency: NaN ms
Pending flushes:
Bloom filter false positives:
Bloom filter false ratio: 0.00000
Bloom filter space used:
Bloom filter off heap memory used:
Index summary off heap memory used:
Compression metadata off heap memory used:
Compacted partition minimum bytes:
Compacted partition maximum bytes:
Compacted partition mean bytes:
Average live cells per slice (last five minutes): NaN
Maximum live cells per slice (last five minutes):
Average tombstones per slice (last five minutes): NaN
Maximum tombstones per slice (last five minutes): Table: sessions
SSTable count:
Space used (live):
Space used (total):
Space used by snapshots (total):
Off heap memory used (total):
SSTable Compression Ratio: 0.0
Number of keys (estimate): -
Memtable cell count:
Memtable data size:
Memtable off heap memory used:
Memtable switch count:
Local read count:
Local read latency: NaN ms
Local write count:
Local write latency: NaN ms
Pending flushes:
Bloom filter false positives:
Bloom filter false ratio: 0.00000
Bloom filter space used:
Bloom filter off heap memory used:
Index summary off heap memory used:
Compression metadata off heap memory used:
Compacted partition minimum bytes:
Compacted partition maximum bytes:
Compacted partition mean bytes:
Average live cells per slice (last five minutes): NaN
Maximum live cells per slice (last five minutes):
Average tombstones per slice (last five minutes): NaN
Maximum tombstones per slice (last five minutes): ----------------
Keyspace: system
Read Count:
Read Latency: 7.373384615384615 ms.
Write Count:
...
...
nodetool netstats命令:
D:\EBOOK\NoSQL\apache-cassandra-2.2.\bin>nodetool netstats
Starting NodeTool
Mode: NORMAL
Not sending any streams.
Read Repair Statistics:
Attempted:
Mismatch (Blocking):
Mismatch (Background):
Pool Name Active Pending Completed
Large messages n/a
Small messages n/a
Gossip messages n/a D:\EBOOK\NoSQL\apache-cassandra-2.2.\bin>
nodetool tpstats命令:
D:\EBOOK\NoSQL\apache-cassandra-2.2.\bin>nodetool tpstats
Starting NodeTool
Pool Name Active Pending Completed Blocked All time blocked
MutationStage
ReadStage
RequestResponseStage
ReadRepairStage
CounterMutationStage
HintedHandoff
MiscStage
CompactionExecutor
MemtableReclaimMemory
PendingRangeCalculator
GossipStage
MigrationStage
MemtablePostFlush
ValidationExecutor
Sampler
MemtableFlushWriter
InternalResponseStage
AntiEntropyStage
CacheCleanupExecutor
Native-Transport-Requests Message type Dropped
READ
RANGE_SLICE
_TRACE
MUTATION
COUNTER_MUTATION
REQUEST_RESPONSE
PAGED_RANGE
READ_REPAIR D:\EBOOK\NoSQL\apache-cassandra-2.2.\bin>
DataStax OpsCenter
相对于nodetool而言,DataStax OpsCenter就方便多了。DataStax OpsCenter提供了统一的图形化入口来监控和管理Cassandra集群。DataStax OpsCenter是与DataStax服务一起打包的。你可以注册一个免费的版本用于开发或非生产环境下使用。
有一点屁民瑞威认为比较重要:那就是OpsCenter的监控指标和相关信息是存储在Cassandra里面而不是存储到其他地方,所以这就给我们一个好的学习使用Cassandra的例子。
关于这个工具的安装和使用,屁民部落将在随后的文章中提及。
JConsole
JConsole这个工具是JDK5.0以后自带的用于监控JAVA程序。估计这个工具用得不多,也就不做过多介绍。有兴趣的朋友可以查看其官方文档。
监控和管理Cassandra的更多相关文章
- Spring Boot (27) actuator服务监控与管理
actuaotr是spring boot项目中非常强大的一个功能,有助于对应用程序进行监控和管理,通过restful api请求来监管.审计.收集应用的运行情况,针对微服务而言它是必不可少的一个环节. ...
- 笔记:Spring Boot 监控与管理
在微服务架构中,我们将原本庞大的单体系统拆分为多个提供不同服务的应用,虽然,各个应用的内部逻辑因分解而简化,但由于部署的应用数量成倍增长,使得系统的维护复杂度大大提升,为了让运维系统能够获取各个为服务 ...
- 监控与管理dubbo服务
Dubbo是阿里多年前开源的一套服务治理框架,在众多互联网企业里应用广泛.本文介绍了一些如何监控与管理dubbo服务.使用的工具与<dubbox 的各种管理和监管>大致相同,本文更侧重于命 ...
- Spring Boot监控与管理的实现
认识Actuator 在SpringBoot应用中引入spring-boot-starter-actuator依赖,它可以为开发团队提供系统运行的各项监控指标. 在项目中引入依赖配置如下: appli ...
- 监控和管理Oracle UNDO表空间的使用
对Oracle数据库UNDO表空间的监控和管理是我们日常最重要的工作之一,UNDO表空间通常都是Oracle自动化管理(通过undo_management初始化参数确定):UNDO表空间是用于存储DM ...
- Spring Boot 监控与管理
在微服务架构中,我们将原本庞大的单体系统拆分为多个提供不同服务的应用,虽然,各个应用的内部逻辑因分解而简化,但由于部署的应用数量成倍增长,使得系统的维护复杂度大大提升,为了让运维系统能够获取各个为服务 ...
- JDK5.0 特性 监控与管理虚拟机
来自:http://www.cnblogs.com/taven/archive/2011/12/17/2291465.html import java.lang.management.ClassLoa ...
- 170707、springboot编程之监控和管理生产环境
spring-boot-actuator模块提供了一个监控和管理生产环境的模块,可以使用http.jmx.ssh.telnet等拉管理和监控应用.审计(Auditing). 健康(health).数据 ...
- Springboot监控之一:SpringBoot四大神器之Actuator之3-springBoot的监控和管理--指标说明
Spring Boot包含很多其他的特性,它们可以帮你监控和管理发布到生产环境的应用.你可以选择使用HTTP端点,JMX或远程shell(SSH或Telnet)来管理和监控应用.审计(Auditing ...
随机推荐
- sersync2 实时同步配置
在同步服务器上开启sersync,将监控路径中的文件同步到目标服务器,因此需要在同步服务器配置sersync,在同步目标服务器配置rsync. 一.同步目标服务器配置rsync # rpm -qa | ...
- Linux查看端口使用状态、关闭端口方法
前提:首先你必须知道,端口不是独立存在的,它是依附于进程的.某个进程开启,那么它对应的端口就开启了,进程关闭,则该端口也就关闭了.下次若某个进程再次开启,则相应的端口也再次开启.而不要纯粹的理解为关闭 ...
- linq实现左连接
1.左连接: var LeftJoin = from emp in ListOfEmployees join dept in ListOfDepartment on emp.DeptID equals ...
- linux包之gdb之gdb命令与core文件产生
gdb-7.2-64.el6_5.2.x86_64/usr/bin/gcore/usr/bin/gdb/usr/bin/gdb-add-index/usr/bin/gdbtui/usr/bin/gst ...
- linux服务之svn
架构:c/s 开发语言:python 服务器端:在linux平台下部署 客户端:分gui与cli两种操作界面 相关包: http://blog.sina.com.cn/s/blog_53b95aec0 ...
- 【C语言模拟实现】浮点数-转-定点数
要想超神,就要什么都精! 知识准备: 1. 输出浮点数的十六进制形式?(利用指针输出) 将浮点数指针-转换成-整型指针,以十六进制的格式输出指针内容. 示例程序: #include<stdio. ...
- eclipse开发Android程序sdk和avd的图标不见了
在eclipse中开发我们的Android程序时,安装sdk是必不可少的,有时候会出现sdk和avd的图标都不见了的情况,一般出现这种情况的原因是你从别处copy了一个sdk的包然后直接在引用造成的, ...
- jQuery Mobile_事件
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- dubbo远程调试运行
缺包问题: maven配置或则下载 http://central.maven.org/maven2/org/mortbay/jetty/jetty/7.0.0.pre5/jetty-7.0.0.pre ...
- 宝洁的Pvp
1.公司宗旨(Purpose) 我们生产和提供更佳品质及价值的产品,以改善全球消费者的生活.作为回报,我们将会获得领先的市场销售地位和利润增长,从而令我们的员工.我们的股东以及我们的生活.工作所处的社 ...