上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: 1、设置tcp保活时间,600单位是s net.ipv4.tcp_keepalive_time=600 2、自动分配端口范围为37268~65535 net.ipv4.ip_local_port_range=37268 65535 3、设置tcp连接等待队列长度 net.ipv4.tcp_max_s 阅读全文
posted @ 2022-06-07 23:12 ho966 阅读(258) 评论(0) 推荐(0)
摘要: 1、netstat -anl |grep 端口号 2、ss -anl |grep 端口号 3、lsof -i:端口号 阅读全文
posted @ 2022-06-07 23:05 ho966 阅读(167) 评论(0) 推荐(0)
摘要: /etc/systctl.conf 添加 net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 阅读全文
posted @ 2022-06-07 23:01 ho966 阅读(98) 评论(0) 推荐(0)
摘要: 系统配置文件 /etc/sysctl.conf 添加配置 net.ipv4.icmp_echo_ignore_all=1 重新生效 sysctl -p 阅读全文
posted @ 2022-06-07 22:58 ho966 阅读(47) 评论(0) 推荐(0)
摘要: 1、查看所有网卡 ip a 2、查看单个网卡信息 ethtool 网卡名 3、网卡配置文件 路径 /etc/sysconfig/network-scripts/ifcfg-ens33 4、修改配置文件后重启network生效 systemctl restart network 5、查询网卡速率 sa 阅读全文
posted @ 2022-06-07 21:47 ho966 阅读(582) 评论(0) 推荐(0)
摘要: EAGAIN或EWOULDBLOCK二者应该是一样的,对应的错误码是11, socket在对端关闭后,recv返回的长度为0 socket非阻塞模式下, 如果缓存区没数据,此时recv就会 返回-1,报错误码EAGAIN或EWOULDBLOCK,所以读取失败,要判断是errno是否为EAGAIN或E 阅读全文
posted @ 2022-06-01 17:32 ho966 阅读(687) 评论(0) 推荐(0)
摘要: consumer.cpp #include "AMQPcpp.h" #include <thread> #include <string> #include <iostream> #include <chrono> int onCancel(AMQPMessage * message) { std: 阅读全文
posted @ 2022-05-15 22:26 ho966 阅读(72) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/weixin_45070175/article/details/118660954 阅读全文
posted @ 2022-05-15 22:15 ho966 阅读(13) 评论(0) 推荐(0)
摘要: 写一个死锁代码: #include <mutex> #include <thread> #include <chrono> std::mutex s_mtx_1; std::mutex s_mtx_2; int main() { std::thread thread1([&](){ s_mtx_1. 阅读全文
posted @ 2022-04-20 07:37 ho966 阅读(302) 评论(0) 推荐(0)
摘要: 包含的头文件: #include <dlfcn.h> 使用的函数有以下4个: 1) void * dlopen( const char * pathname, int mode) 参数pathname: 动态库so名称; 参数mode: 打开方式,有以下选项 RTLD_DEEPBIND -- 动态库 阅读全文
posted @ 2022-03-20 21:23 ho966 阅读(1266) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页