当前位置: 首页 > news >正文

跨境电商平台下载优化用户体验

跨境电商平台下载,优化用户体验,手机网页制作与网站建设,电影网站如何优化版本控制 从 MongoDB 4.4 开始,mongostat 现在与 MongoDB 服务器分开发布,并使用自己的版本控制,初始版本为100.0.0. 之前, mongostat 与 MongoDB Server 一起发布并使用匹配的版本控制。 兼容性 mongostat 版本100.7.3支持以下…

版本控制

从 MongoDB 4.4 开始,mongostat 现在与 MongoDB 服务器分开发布,并使用自己的版本控制,初始版本为100.0.0. 之前,
mongostat 与 MongoDB Server 一起发布并使用匹配的版本控制。

兼容性

mongostat 版本100.7.3支持以下版本的 MongoDB Server:

MongoDB 6.0

MongoDB 5.0

MongoDB 4.4

MongoDB 4.2

mongostat 实用程序提供当前正在运行的mongod 或者 mongos 实例状态的概述 。

mongostat 功能上类似于 UNIX/Linux 文件系统实用程序vmstat。

访问权限

为了连接到 mongod 强制授权 --auth 选项,指定 --username 和–password选项,并且连接用户必须具有 serverStatus
对集群资源的特权操作。

内置角色 clusterMonitor 提供此特权以及其他特权。

sit_rs1:PRIMARY> db.getRole("clusterMonitor", { showPrivileges: true }).privileges[0]
{"resource" : {"cluster" : true},"actions" : ["checkFreeMonitoringStatus","connPoolStats","getDefaultRWConcern","getCmdLineOpts","getLog","getParameter","getShardMap","hostInfo","inprog","listDatabases","listSessions","listShards","netstat","replSetGetConfig","replSetGetStatus","serverStatus",                #  ------>  serverStatus  特权  "shardingState","top",                        "useUUID"]
}

示例

–uri=<connectionString> 指定可解析的 URI 连接字符串 MongoDB 部署的信息,用引号引起来:

root@ubuntu-x64_01:/opt# mongostat 5 --uri='mongodb://admin:******@192.168.88.11:27018/admin?authSource=admin'  
2023-07-28T14:51:32.527+0800    WARNING: On some systems, a password provided directly in a connection string or using --uri may be visible to system status programs such as `ps` that may be invoked by other users. Consider omitting the password to provide it via stdin, or using the --config option to specify a configuration file with the password.
insert query update delete getmore command dirty used flushes vsize  res qrw arw net_in net_out conn     set repl                time*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   455b   10.9k    9 sit_rs1  SEC Jul 28 14:51:37.564*0    *0     *0     *0       0     2|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   437b   11.1k    9 sit_rs1  SEC Jul 28 14:51:42.563*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   456b   11.0k    9 sit_rs1  SEC Jul 28 14:51:47.565*0    *0     *0     *0       0     2|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   438b   11.1k    9 sit_rs1  SEC Jul 28 14:51:52.560*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   456b   11.0k    9 sit_rs1  SEC Jul 28 14:51:57.561*0    *0     *0     *0       0     2|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   437b   11.1k    9 sit_rs1  SEC Jul 28 14:52:02.560*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   456b   11.0k    9 sit_rs1  SEC Jul 28 14:52:07.562*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   398b   11.1k    9 sit_rs1  SEC Jul 28 14:52:12.564*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 105M 0|0 1|0   495b   11.0k    9 sit_rs1  SEC Jul 28 14:52:17.565*0    *0     *0     *0       0     1|0  0.0% 0.3%       1 1.78G 105M 0|0 1|0   399b   10.9k    9 sit_rs1  SEC Jul 28 14:52:22.557

100.0从版本开始 mongostat ,连接字符串也可以作为位置参数提供,而不使用 --uri 选项:作为位置参数,可以在命令行上的任何点指定连接字符串,只要它以 mongodb:// 或 mongodb+srv:// 开头。例如:

root@ubuntu-x64_01:/opt# mongostat 5 --username admin --password ****** mongodb://192.168.88.11:27018 --authenticationDatabase=admin
2023-07-28T14:54:07.588+0800    WARNING: On some systems, a password provided directly using --password may be visible to system status programs such as `ps` that may be invoked by other users. Consider omitting the password to provide it via stdin, or using the --config option to specify a configuration file with the password.
insert query update delete getmore command dirty used flushes vsize  res qrw arw net_in net_out conn     set repl                time*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   415b   10.9k    9 sit_rs1  SEC Jul 28 14:54:12.614*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   478b   11.2k    9 sit_rs1  SEC Jul 28 14:54:17.612*0    *0     *0     *0       0     1|0  0.0% 0.3%       1 1.78G 106M 0|0 1|0   416b   10.9k    9 sit_rs1  SEC Jul 28 14:54:22.614*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   438b   11.2k    9 sit_rs1  SEC Jul 28 14:54:27.612*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   455b   10.9k    9 sit_rs1  SEC Jul 28 14:54:32.616*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   439b   11.0k    9 sit_rs1  SEC Jul 28 14:54:37.608*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   455b   11.0k    9 sit_rs1  SEC Jul 28 14:54:42.616*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   439b   11.0k    9 sit_rs1  SEC Jul 28 14:54:47.610*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   455b   11.1k    9 sit_rs1  SEC Jul 28 14:54:52.615*0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 106M 0|0 1|0   439b   11.0k    9 sit_rs1  SEC Jul 28 14:54:57.610

或者,您可以使用 --host 和 --port 指定主机和端口的选项:如果 mongod 实例需要认证,可以指定用户 -u,以及认证数据库 --authenticationDatabase。如果省略 --password 选项会提示输入密码。

root@ubuntu-x64_01:/opt# mongostat 5 --username=admin --password=****** --authenticationDatabase=admin --host=192.168.88.11 --port=27017 
2023-07-28T15:00:25.446+0800    WARNING: On some systems, a password provided directly using --password may be visible to system status programs such as `ps` that may be invoked by other users. Consider omitting the password to provide it via stdin, or using the --config option to specify a configuration file with the password.
insert query update delete getmore command dirty used flushes vsize  res qrw arw net_in net_out conn     set repl                time*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.43k   11.6k   17 sit_rs1  PRI Jul 28 15:00:30.478*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.01k   11.7k   17 sit_rs1  PRI Jul 28 15:00:35.472*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.63k   11.7k   17 sit_rs1  PRI Jul 28 15:00:40.470*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.01k   11.7k   17 sit_rs1  PRI Jul 28 15:00:45.469*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.43k   11.6k   17 sit_rs1  PRI Jul 28 15:00:50.474*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0   970b   11.5k   17 sit_rs1  PRI Jul 28 15:00:55.468*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.55k   11.9k   17 sit_rs1  PRI Jul 28 15:01:00.471*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0   970b   11.5k   17 sit_rs1  PRI Jul 28 15:01:05.469*0    *0     *0     *0       0     2|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  1.47k   11.8k   17 sit_rs1  PRI Jul 28 15:01:10.473*0    *0     *0     *0       1     4|0  0.0% 0.2%       0 1.83G 106M 0|0 1|0  2.98k   13.3k   17 sit_rs1  PRI Jul 28 15:01:15.468

连接到副本集或分片集群,使用 --discover 选项 发现并报告所有成员的统计数据 。

  • 在许多情况下,使用 --discover选项将有助于提供整个机器组状态的更完整的快照。如果连接到分片集群的mongos进程运行在本地机器的27017端口上,您可以使用以下表格返回集群所有成员的统计信息:
root@ubuntu-x64_01:/opt# mongostat 5 'mongodb://admin:******@192.168.88.11:27017,192.168.88.11:27018,192.168.88.11:27019/admin?authSource=admin&replicaSet=sit_rs1&readPreference=primary&ssl=false' --discoverhost insert query update delete getmore command dirty used flushes vsize  res qrw arw net_in net_out conn     set repl                time
192.168.88.11:27017     *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 1.83G 107M 0|0 1|0   875b   11.1k   17 sit_rs1  PRI Jul 28 15:09:56.999
192.168.88.11:27018     *0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 107M 0|0 1|0   395b   10.8k    9 sit_rs1  SEC Jul 28 15:09:57.017
192.168.88.11:27019     *0    *0     *0     *0       0     1|0  0.0% 0.4%       0 1.78G 116M 0|0 1|0   395b   10.8k   10 sit_rs1  SEC Jul 28 15:09:57.042192.168.88.11:27017     *0    *0     *0     *0       0     3|0  0.0% 0.2%       0 1.83G 107M 0|0 1|0  1.57k   12.2k   17 sit_rs1  PRI Jul 28 15:10:01.990
192.168.88.11:27018     *0    *0     *0     *0       0     2|0  0.0% 0.3%       0 1.78G 107M 0|0 1|0   498b   11.2k    9 sit_rs1  SEC Jul 28 15:10:02.020
192.168.88.11:27019     *0    *0     *0     *0       0     2|0  0.0% 0.4%       0 1.78G 116M 0|0 1|0   539b   11.4k   10 sit_rs1  SEC Jul 28 15:10:02.036192.168.88.11:27017     *0    *0     *0     *0       0     1|0  0.0% 0.2%       0 1.83G 107M 0|0 1|0   875b   11.1k   17 sit_rs1  PRI Jul 28 15:10:06.996
192.168.88.11:27018     *0    *0     *0     *0       0     1|0  0.0% 0.3%       0 1.78G 107M 0|0 1|0   396b   10.8k    9 sit_rs1  SEC Jul 28 15:10:07.019
192.168.88.11:27019     *0    *0     *0     *0       0     1|0  0.0% 0.4%       0 1.78G 116M 0|0 1|0   395b   10.8k   10 sit_rs1  SEC Jul 28 15:10:07.042192.168.88.11:27017     *0    *0     *0     *0       0     3|0  0.0% 0.2%       0 1.83G 107M 0|0 1|0  1.53k   12.0k   17 sit_rs1  PRI Jul 28 15:10:11.996
192.168.88.11:27018     *0    *0     *0     *0       0     2|0  0.0% 0.3%       0 1.78G 107M 0|0 1|0   498b   11.2k    9 sit_rs1  SEC Jul 28 15:10:12.016
192.168.88.11:27019     *0    *0     *0     *0       0     2|0  0.0% 0.4%       0 1.78G 116M 0|0 1|0   538b   11.4k   10 sit_rs1  SEC Jul 28 15:10:12.044

在交互式界面中查看统计信息使用 --interactive 以非滚动方式查看统计信息的选项 风格的交互式输出。这 --interactive 选项允许您突出显示要查看的特定主机、列或字段。当与 --discover, --interactive 显示副本集或分片集群的所有成员的统计信息,如下例所示:

  • 退出: ‘q’ or <Esc>
  • 高亮:
    ‘v’ 用于切换行
    ‘c’ 用于切换列
    ‘s’ 用于切换单元格
    <Space> 清除所有高亮显示
  • 重绘: 'r’修复损坏的输出。
  • 箭头: 用定位行、列、单元格。
#
root@ubuntu-x64_01:/opt# mongostat 5 'mongodb://admin:******@192.168.88.11:27017,192.168.88.11:27018,192.168.88.11:27019/admin?authSource=admin&replicaSet=sit_rs1&readPreference=primary&ssl=false' --discover --interactivehost insert query update delete getmore command dirty used flushes vsize  res qrw arw net_in net_out conn     set repl                time
192.168.88.11:27017     *0    *0     *0     *0       0     2|0  0.1% 0.3%       0 1.83G 107M 0|0 1|0  1.44k   11.9k   17 sit_rs1  PRI Jul 28 16:24:02.819
192.168.88.11:27018     *0    *0     *0     *0       0     1|0  0.1% 0.3%       0 1.79G 106M 0|0 1|0   398b   10.9k    9 sit_rs1  SEC Jul 28 16:24:02.829
192.168.88.11:27019     *0    *0     *0     *0       0     1|0  0.1% 0.4%       0 1.79G 102M 0|0 1|0   397b   10.9k   10 sit_rs1  SEC Jul 28 16:24:02.856Press '?' to toggle help

-o 指定 mongostat 输出字段。您可以指定任何 serverStatus 作为 mongostat 输出列。

以下示例使用自定义字段 mongostat:

root@ubuntu-x64_01:/opt# mongostat 5 --username=admin --password=****** --authenticationDatabase=admin --host=192.168.88.11 --port=27017  -o='host,opcounters.insert.rate()=Insert Rate,opcounters.query.rate()=Query Rate,opcounters.command.rate()=Command Rate,wiredTiger.cache.pages requested from the cache=Pages Req,metrics.document.inserted=inserted rate'host Insert Rate Query Rate Command Rate Pages Req inserted rate
192.168.88.11:27017           0          0            1    101249             0
192.168.88.11:27017           0          0            2    101303             0
192.168.88.11:27017           0          0            1    101340             0
192.168.88.11:27017           0          0            2    101394             0
192.168.88.11:27017           0          0            2    101431             0
192.168.88.11:27017           0          0            2    101487             0
192.168.88.11:27017           0          0            2    101524             0
192.168.88.11:27017           0          0            2    101578             0
192.168.88.11:27017           0          0            2    101798             0#  --discover --interactive   显示副本集或分片集群的所有成员的统计信息
root@ubuntu-x64_01:/opt# mongostat 5 'mongodb://admin:******@192.168.88.11:27017,192.168.88.11:27018,192.168.88.11:27019/admin?authSource=admin&replicaSet=sit_rs1&readPreference=primary&ssl=false'  -o='host,opcounters.insert.rate()=Insert Rate,opcounters.query.rate()=Query Rate,opcounters.command.rate()=Command Rate,wiredTiger.cache.pages requested from the cache=Pages Req,metrics.document.inserted=inserted rate'    --discover --interactive  host Insert Rate Query Rate Command Rate Pages Req inserted rate
192.168.88.11:27017           0          0            1    160296             0
192.168.88.11:27018           0          0            1    118386             0
192.168.88.11:27019           0          0            1    132224             0Press '?' to toggle help
计算器自定义字段名
opcounters.insert.rate插入率
opcounters.query.rate查询率
opcounters.command.rate命令率
wiredTiger.cache.pages页面请求
metrics.document.inserted页面重新插入率

Fields

mongostat 返回反映 1 秒内操作的值。当mongostat <sleeptime> 的值大于 1 时,mongostat 对统计数据进行平均以反映每秒的平均操作数。mongostat 输出以下字段:

字段描述
host主机节点的IP地址
inserts每秒插入数据库的对象数。如果后跟星号(例如*),则该数据指的是复制操作
query每秒的查询操作数。
update每秒更新操作的数量。
delete每秒删除操作的数量。
getmore每秒获取更多(即光标批处理)操作的数量。
command每秒的命令数。在辅助系统上,mongostat 由管道字符分隔 表示两个值(例如:“
flushes对于WiredTiger存储引擎,flushes 指的是每个轮询间隔之间触发的 WiredTiger 检查点的数量。
dirty仅适用于WiredTiger存储引擎。WiredTiger 缓存中脏字节的百分比。
used仅适用于WiredTiger存储引擎。正在使用的 WiredTiger 缓存的百分比。
vsize在最后一次调用mongostat时,进程使用的虚拟内存量(以兆字节为单位)。
res在最后一次调用mongostat时,进程使用的驻留内存量(以兆字节为单位)。
locked全局写锁的时间百分比。仅在MongoDB实例的3.0之前版本上运行时出现。
qr等待从 MongoDB 实例读取数据的客户端队列的长度。
qw等待从 MongoDB 实例写入数据的客户端队列的长度。
ar执行读取操作的活动客户端数量。
aw执行写入操作的活动客户端数量。
netInMongoDB 实例接收的网络流量(以字节为单位) 。这包括来自mongostat本身。
netOutMongoDB 实例发送的网络流量(以字节为单位) 。这包括来自mongostat本身。
conn打开连接的总数。
set副本集的名称(如果适用)。
repl成员的复制状态。
http://www.hengruixuexiao.com/news/42772.html

相关文章:

  • 中山网站建设公司seo优化网络公司排名
  • 网站域名跳转怎么做郑州seo优化培训
  • 做外贸的怎样才能上国外网站seo搜索优化待遇
  • 平台和网站有什么区别长春百度推广电话
  • 零售网站制作河南省最新通知
  • 信宜网站建设公司站外推广怎么做
  • 安全联盟这种网站建设内存优化大师
  • 深圳集团网站开发福州今日头条新闻
  • 网络设计课程设计前言优化设计单元测试卷答案
  • 加强政府网站信息内容建设十大免费最亏的免费app
  • 个人适合建什么网站免费的关键词优化软件
  • 网站交互怎么做网站站点查询
  • 网站方案书学新媒体运营最好的培训学校
  • 广州网站平台怎么做凡科建站登录
  • wordpress媒体优化宁波关键词优化平台
  • 哪家做网站比较好百度目前的推广方法
  • 做网站开发需要培训吗网站模板价格
  • 网站备案备注信息免费做网站网站的软件
  • 西部数码网站管理助手4.0 教程百度竞价开户渠道
  • 能自己做的ppt网站朋友圈产品推广文案
  • 网站游戏入口百度指数是什么
  • 龙岩做网站开发哪家做的好免费的编程自学网站
  • 购物网站建设与开发软件开发网站
  • 找人做网站 自己购买服务器付费推广方式有哪些
  • 保定网站制作哪家好建设百度推广seo优化
  • 东莞网站建设 旅游2022年五月份热点事件
  • 网站平台建设咨询合同成人英语培训
  • 网站开发文档word百度云搜索资源入口
  • 可以自建网站吗宁波网站优化公司推荐
  • 网页制作的方法成都seo优化推广