zabbix自定义监控mysql状态和延迟

zabbix自定义监控mysql状态和延迟

文章目录

  • zabbix自定义监控mysql状态和延迟
    • zabbix自定义监控mysql状态
      • 配置主从
      • 配置自定义监控
      • 添加监控项
      • 添加触发器
      • 模拟测试异常
    • zabbix自定义监控mysql延迟
      • 配置自定义监控
      • 添加监控项
      • 添加触发器
      • 测试

zabbix自定义监控mysql状态

配置主从

1.安装mysql-server
//主
[root@master ~]# yum -y install mysql-server
Complete!//从
[root@slave ~]# yum -y install mysql-server
Complete!2.开启服务
//主
[root@master ~]# systemctl enable --now mysqld
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service.
[root@master ~]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  4096                                  0.0.0.0:10050                                0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    //从
[root@slave ~]# systemctl enable --now mysqld
Created symlink /etc/systemd/system/multi-user.target.wants/mysqld.service → /usr/lib/systemd/system/mysqld.service.
[root@slave ~]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    3.修改数据库密码
//主
[root@master ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> alter user root@localhost identified with mysql_native_password by 'Passw0rd@_~'-> ;
Query OK, 0 rows affected (0.00 sec)mysql> quit
Bye
[root@master ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> quit
Bye//从
[root@slave ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> alter user root@localhost identified with mysql_native_password by 'Passw0rd@_~';
Query OK, 0 rows affected (0.00 sec)mysql> quit
Bye
[root@slave ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> quit
Bye4.创建用户授权并修改配置文件
//主
[root@master ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> create user repl@192.168.116.139 identified with mysql_native_password by 'Passw0rd@_~';
Query OK, 0 rows affected (0.00 sec)mysql> grant replication slave on *.* to repl@192.168.116.139;
Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)mysql> quit
Bye//从
[root@slave ~]# mysql -urepl -p'Passw0rd@_~' -h192.168.116.143
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> //主
[root@master ~]# vim /etc/my.cnf.d    //进去之后看见一个mysql-server.cnf,把光标移到这回车一下,直接在后面加内容
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysql/mysqld.log
pid-file=/run/mysqld/mysqld.pid
log-bin = mysql_bin
server-id = 10
[root@master ~]# systemctl restart mysqld
[root@master ~]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  4096                                  0.0.0.0:10050                                0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    //从
[root@slave ~]# vim /etc/my.cnf.d
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysql/mysqld.log
pid-file=/run/mysqld/mysqld.pid
relay-log = mysql_relay_bin
server-id = 20
[root@slave ~]# systemctl restart mysqld
[root@slave ~]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    5.实现主从的同步
//主
[root@master ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show master status;
+------------------+----------+--------------+------------------+-------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql_bin.000001 |      157 |              |                  |                   |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)//从
[root@slave ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> change master to -> master_host='192.168.116.143',-> master_user='repl',-> master_password='Passw0rd@_~',-> master_log_file='mysql_bin.000001',-> master_log_pos=157;
Query OK, 0 rows affected, 8 warnings (0.01 sec)mysql> start slave;
Query OK, 0 rows affected, 1 warning (0.01 sec)mysql> show slave status\G;
*************************** 1. row ***************************Slave_IO_State: Waiting for source to send eventMaster_Host: 192.168.116.143Master_User: replMaster_Port: 3306Connect_Retry: 60Master_Log_File: mysql_bin.000001Read_Master_Log_Pos: 157Relay_Log_File: mysql_relay_bin.000002Relay_Log_Pos: 326Relay_Master_Log_File: mysql_bin.000001Slave_IO_Running: YesSlave_SQL_Running: YesReplicate_Do_DB: Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0Last_Error: Skip_Counter: 0Exec_Master_Log_Pos: 157Relay_Log_Space: 536Until_Condition: NoneUntil_Log_File: Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: NoLast_IO_Errno: 0Last_IO_Error: Last_SQL_Errno: 0Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 10Master_UUID: 77f22ade-aeb5-11ee-b197-000c297b5e5cMaster_Info_File: mysql.slave_master_infoSQL_Delay: 0SQL_Remaining_Delay: NULLSlave_SQL_Running_State: Replica has read all relay log; waiting for more updatesMaster_Retry_Count: 86400Master_Bind: Last_IO_Error_Timestamp: Last_SQL_Error_Timestamp: Master_SSL_Crl: Master_SSL_Crlpath: Retrieved_Gtid_Set: Executed_Gtid_Set: Auto_Position: 0Replicate_Rewrite_DB: Channel_Name: Master_TLS_Version: Master_public_key_path: Get_master_public_key: 0Network_Namespace: 
1 row in set, 1 warning (0.00 sec)//主
[root@master ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)mysql> create database hl;
Query OK, 1 row affected (0.00 sec)mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| hl                 |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.00 sec)//从
[root@slave ~]# mysql -uroot -pPassw0rd@_~
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 8.0.32 Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| hl                 |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

配置自定义监控

1.编写脚本
//从
[root@slave ~]# mysql -uroot -pPassw0rd@_~ -e 'show slave status\G' 2> /dev/null | grep Running: | awk '{print $2}'|grep -c 'Yes'
2
[root@slave ~]# mkdir /scripts
[root@slave ~]# touch /scripts/mysql_msstatus.sh
[root@slave ~]# cd /scripts
[root@slave scripts]# ls
mysql_msstatus.sh
[root@slave scripts]# chmod +x mysql_msstatus.sh 
[root@slave scripts]# ls
mysql_msstatus.sh
[root@slave scripts]# vim mysql_msstatus.sh 
[root@slave scripts]# cat mysql_msstatus.sh 
#!/bin/bashcount=$(mysql -uroot -pPassw0rd@_~ -e 'show slave status\G' 2> /dev/null | grep Running: | awk '{print $2}'|grep -c 'Yes')echo $count
[root@slave scripts]# ./mysql_msstatus.sh 
22.安装zabbix_agent
//安装依赖包
[root@slave ~]# yum -y install gcc gcc-c++ pcre-devel
Complete!//下载软件包
[root@slave ~]# ls
alter  anaconda-ks.cfg  quit  zabbix-6.4.10.tar.gz//解压
[root@slave ~]# tar xf zabbix-6.4.10.tar.gz 
[root@slave ~]# ls
alter  anaconda-ks.cfg  quit  zabbix-6.4.10  zabbix-6.4.10.tar.gz//编译
[root@slave ~]# cd zabbix-6.4.10
[root@slave zabbix-6.4.10]# ./configure --help| grep agent--enable-agent          Turn on build of Zabbix agent and client utilities--enable-agent2         Turn on build of Zabbix agent 2
[root@slave zabbix-6.4.10]# ./configure --enable-agent
***********************************************************
*            Now run 'make install'                       *
*                                                         *
*            Thank you for using Zabbix!                  *
*              <http://www.zabbix.com>                    *
***********************************************************
[root@slave zabbix-6.4.10]# make && make install
[root@slave zabbix-6.4.10]# echo $?
0//设置开机自启
[root@slave ~]# cp /usr/lib/systemd/system/sshd.service /usr/lib/systemd/system/zabbix.service
[root@slave ~]# vim /usr/lib/systemd/system/zabbix.service 
[root@slave ~]# cat /usr/lib/systemd/system/zabbix.service 
[Unit]
Description=zabbix server daemon
After=network.target [Service]
Type=forking
ExecStart=/usr/local/sbin/zabbix_agentd
ExecStop=pkill zabbix
ExecReload=/bin/kill -HUP $MAINPID[Install]
WantedBy=multi-user.target
[root@slave ~]# systemctl daemon-reload//创建系统用户
[root@slave ~]# useradd -r -M -s /sbin/nologin zabbix//启动服务
[root@slave ~]# systemctl start zabbix
[root@slave ~]# systemctl enable zabbix
[root@slave ~]# systemctl start zabbix
[root@slave ~]# systemctl enable zabbix
[root@slave ~]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  4096                                  0.0.0.0:10050                                0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    3.编辑zabbix_agentd.conf配置文件
[root@slave ~]# cd /usr/local/etc
[root@slave etc]# ls
zabbix_agentd.conf  zabbix_agentd.conf.d
[root@slave etc]# vim zabbix_agentd.conf
UnsafeUserParameters=1          //取消注释并开启
UserParameter=check_mysqlms,/scripts/mysql_msstatus.sh    //到最后面加
[root@slave ~]# systemctl restart zabbix
[root@slave ~]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  4096                                  0.0.0.0:10050                                0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    4.到zabbix_server主机中获取数据
[root@zabbixserver ~]# zabbix_get -s 192.168.116.139 -k check_mysqlms
25.加密脚本文件让其他用户不可查看
[root@slave ~]# chown -R zabbix.zabbix /scripts
[root@slave ~]# ll /scripts
total 8
-rwxr-xr-x 1 zabbix zabbix 148 Jan  9 16:19 mysql_msrelay.sh
-rwxr-xr-x 1 zabbix zabbix 150 Jan  9 14:59 mysql_msstatus.sh
[root@slave ~]# chmod 700 /scripts
[root@slave ~]# ll /
drwx------    2 zabbix zabbix   55 Jan  9 16:19 scripts//测试
[root@slave ~]# su - tom
[tom@slave ~]$ ll /
drwx------    2 zabbix zabbix   55 Jan  9 16:19 scripts
[tom@slave ~]$ cd /scripts
-bash: cd: /scripts: Permission denied
[tom@slave ~]$ cat /scripts/mysql_msstatus.sh
cat: /scripts/mysql_msstatus.sh: Permission denied

添加监控项

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

添加触发器

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

模拟测试异常

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

zabbix自定义监控mysql延迟

配置自定义监控

1.编写脚本
mysql> show slave status\G;
Seconds_Behind_Master: 0
[root@slave ~]# mysql -uroot -pPassw0rd@_~ -e 'show slave status\G' 2> /dev/null | grep Seconds_Behind_Master | awk '{print $2}'
0
[root@slave ~]# cd /scripts
[root@slave scripts]# ls
mysql_msstatus.sh
[root@slave scripts]# touch mysql_msrelay.sh
[root@slave scripts]# chmod +x mysql_msrelay.sh 
[root@slave scripts]# vim mysql_msrelay.sh 
[root@slave scripts]# cat mysql_msrelay.sh 
#!/bin/bashrelay=$(mysql -uroot -pPassw0rd@_~ -e 'show slave status\G' 2> /dev/null | grep Seconds_Behind_Master | awk '{print $2}')echo $relay
[root@slave scripts]# ./mysql_msrelay.sh 
02.写入配置文件
[root@slave scripts]# vim /usr/local/etc/zabbix_agentd.conf
UserParameter=check_msrelay,/scripts/mysql_msrelay.sh
[root@slave scripts]# systemctl restart zabbix
[root@slave scripts]# ss -antl
State              Recv-Q             Send-Q                          Local Address:Port                            Peer Address:Port             Process             
LISTEN             0                  128                                   0.0.0.0:22                                   0.0.0.0:*                                    
LISTEN             0                  4096                                  0.0.0.0:10050                                0.0.0.0:*                                    
LISTEN             0                  70                                          *:33060                                      *:*                                    
LISTEN             0                  128                                      [::]:22                                      [::]:*                                    
LISTEN             0                  151                                         *:3306                                       *:*                                    3.在zabbixserver主机中获取数据
[root@zabbixserver ~]# zabbix_get -s 192.168.116.139 -k check_msrelay
0

添加监控项

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

添加触发器

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

测试

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/28226.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

FreeRTOS简单内核实现5 阻塞延时

文章目录 0、思考与回答0.1、思考一0.2、思考二0.3、思考三 1、创建空闲任务2、实现阻塞延时3、修改任务调度策略4、提供延时时基4.1、SysTick4.2、xPortSysTickHandler( )4.3、xTaskIncrementTick( ) 5、实验5.1、测试5.2、待改进 0、思考与回答 0.1、思考一 为什么 FreeRTO…

hbuilderx如何创建html模板

需求&#xff1a;想要将34.html文件的内容作为一个模板&#xff0c;以便后续直接能创建类似内容的html文件 1 首先ctrlc复制模板文件 2 在顶部菜单栏点击 文件 -> 新建 或者使用快捷键 CtrlN 3 在弹出的对话框中选择【自定义模板】 4 将第一步复制的模板文件复制到弹出的文件…

Android Studio项目升级报错:Namespace not specified

原项目升级AGP到8.0时报错&#xff1a; Namespace not specified. Specify a namespace in the modules build file: C:\Users\Administrator\Desktop\MyJetpack\app\build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about…

IT人的拖延——这个任务太复杂,太难了怎么办?

随着科技的发展&#xff0c;IT人需要不断地运用新技术来解决更多传统方式难以解决的问题&#xff0c;有些问题真的不是不想解决&#xff0c;而是真的太复杂&#xff0c;太难了&#xff0c;根本不知道从何开始&#xff0c;也没有什么前辈的经验可以借鉴。我们这些对事情难度的认…

软链接和硬链接的详解 (Linux系统下)

文章目录 硬链接的引入软链接和硬链接的形成软链接硬链接 软硬链接区别的探究硬链接数结语 硬链接的引入 当我们在命令行中输入ll时会出现很多行信息&#xff0c;详情请看下面的图 ~~~~εεε(&#xffe3;▽&#xffe3;) 我在之前的几篇Linux的文章也讲过哦 (o&#xff9f;v…

ARM32开发--电源管理单元

知不足而奋进 望远山而前行 目录 文章目录 前言 学习目标 学习内容 PMU 电源域 VDD/VDDA域 备份域 1.2V域 省电模式 睡眠模式 深度睡眠模式 待机模式 几种模式总结 WFI和WFE指令 案例需求 模式初始化 源码 总结 前言 在嵌入式系统中&#xff0c;有效的电池管…

buuctf-findKey

exe文件 运行发现这个窗口,没有任何消息 32位 进入字符串就发现了flag{ 左边红色代表没有F5成功 我们再编译一下(选中红色的全部按p) LRESULT __stdcall sub_401640(HWND hWndParent, UINT Msg, WPARAM wParam, LPARAM lParam) {int v5; // eaxsize_t v6; // eaxDWORD v7; /…

【python基础语法1】注释,变量与运算符

这里写自定义目录标题 一、注释分类注意 二、变量变量的声明变量的命名注意 变量的交换常量 三、数据类型分类六大标准数据类型Number 数字类型 分类&#xff1a;2个内置方法 type 和 id自动类型转换强制类型转换容器类型分类&#xff1a;五个字符串类型 str列表类型 list内置函…

【Numpy】一文向您详细介绍 np.round()

【Numpy】一文向您详细介绍 np.round() 下滑即可查看博客内容 &#x1f308; 欢迎莅临我的个人主页 &#x1f448;这里是我静心耕耘深度学习领域、真诚分享知识与智慧的小天地&#xff01;&#x1f387; &#x1f393; 博主简介&#xff1a;985高校的普通本硕&#xff0c;…

Vue2+Element-ui实现el-table表格自适应高度

效果图 新建指令 Vue.directive(height, {inserted(el, _binding, vnode) {const paginationRef vnode.context.$refs.paginationRefconst calculateHeight () > {const windowHeight window.innerHeightconst topOffset el.getBoundingClientRect().topconst otherEle…

debug调试高级功能 断点、布局 及Android Studio常用快捷按键使用详情

文章目录 debug断点篇&#xff1a;打临时断点&#xff08;只用一次&#xff09;&#xff1a;alt断点条件断点&#xff1a;在断点上&#xff0c;点击右键&#xff0c;在Condition那里&#xff0c;设置我们需要的值&#xff0c;循环就会自动停到我们设置的那个值那里依赖断点&…

Jmeter多个请求按照比例并发压测的几种方式

&#x1f345; 视频学习&#xff1a;文末有免费的配套视频可观看 &#x1f345; 点击文末小卡片 &#xff0c;免费获取软件测试全套资料&#xff0c;资料在手&#xff0c;涨薪更快 一、需求 在压测的过程中&#xff0c;为了能够压测整个链路&#xff0c;通常需要多个接口进行并…

Markdown如何分页操作

Markdown导出分页操作 在平时的文档导出过程中Markdown过程中会出现因为不能分页导致的排版问题。 排版问题在将Markdown文档导出为PDF或其他格式时尤为明显。当文档内容超过一页时&#xff0c;无法自动调整页面布局&#xff0c;导致内容不连续&#xff0c;甚至导致图片或表格…

【每日刷题】Day66

【每日刷题】Day66 &#x1f955;个人主页&#xff1a;开敲&#x1f349; &#x1f525;所属专栏&#xff1a;每日刷题&#x1f34d; &#x1f33c;文章目录&#x1f33c; 1. 小乐乐改数字_牛客题霸_牛客网 (nowcoder.com) 2. 牛牛的递增之旅_牛客题霸_牛客网 (nowcoder.com)…

预编译、函数变量提升

函数声明会覆盖变量的声明&#xff0c;也就是会提升到最前面。 形参传进来相当于变量声明&#xff0c;所以当有函数声明时&#xff0c;会被覆盖。

计算机组成原理之定点加法与减法运算

文章目录 补码的加减法算法的流程与逻辑实现溢出判断溢出原因单符号位判断双符号位&#xff08;变形补码&#xff09; 基本的加法/减法器舍入方法习题 补码的加减法 数用补码表示&#xff0c;符号位参与运算 考虑几个问题&#xff1f; 1.实际操作能否只取决于操作码&#xff1f…

python-求分数序列和

[题目描述]&#xff1a; 输入&#xff1a; 输入一行一个正整数n(n≤30)。输出&#xff1a; 输出一行一个浮点数&#xff0c;表示分数序列前n 项的和&#xff0c;精确到小数点后4位。样例输入1 2 样例输出1 3.5000 来源/分类&#xff08;难度系数&#xff1a;一星&#xff09;…

和鲸科技执行总裁殷自强:面向空间数据协同分析场景的模型生命周期管理方法

导读&#xff1a; 由 ACM SIGSPATIAL 中国分会主办的第五届空间数据智能学术会议&#xff08;SpatialDI 2024&#xff09;于 2024 年 4 月 25 日- 27 日在南京圆满召开&#xff0c;主题为“ AGI 时代下的空间数据智能”&#xff0c;旨在深入推动空间数据智能研究的理论进步与应…

模型实战(23)之 yolov10 使用总结及训练自己的数据集

yolov10 使用总结及训练自己的数据集 0. yolov10 原理分析 此处参考:https://blog.csdn.net/CVHub/article/details/139204248论文:https://arxiv.org/pdf/2405.14458源码:https://github.com/THU-MIG/yolov10 论文原理分析: 创新: 双标签分配策略 众所周知,标签分配策略…

【嵌入式DIY实例】-Nokia 5110显示DS3231 RTC数据

Nokia 5110显示DS3231 RTC数据 文章目录 Nokia 5110显示DS3231 RTC数据1、硬件准备与接线2、代码实现本文将介绍如何使用 ESP8266 NodeMCU 板和 DS3231 RTC 模块制作一个简单的数字实时时钟,其中可以使用连接到 NodeMCU 的两个按钮设置时间和日期,并将它们打印在诺基亚 5110 …