会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ho966
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
13
下一页
2022年6月11日
栈帧
摘要: 栈帧的概念: 每个线程都有自己的栈空间,对应线程的每一个执行的函数,都有一个相对应的栈帧,栈帧存有该函数的入参、出参、局部变量以及返回地址,一个完整的栈信息就是由N个栈帧组成的,栈空间的开辟是由高地址向低地址的。 写一个简单的函数调用 #include <cstdio> #include <stri
阅读全文
posted @ 2022-06-11 12:27 ho966
阅读(117)
评论(0)
推荐(0)
2022年6月7日
tcp系统参数优化
摘要: 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
阅读(275)
评论(0)
推荐(0)
端口查看工具
摘要: 1、netstat -anl |grep 端口号 2、ss -anl |grep 端口号 3、lsof -i:端口号
阅读全文
posted @ 2022-06-07 23:05 ho966
阅读(174)
评论(0)
推荐(0)
禁用Ipv6
摘要: /etc/systctl.conf 添加 net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1
阅读全文
posted @ 2022-06-07 23:01 ho966
阅读(101)
评论(0)
推荐(0)
禁止ping功能
摘要: 系统配置文件 /etc/sysctl.conf 添加配置 net.ipv4.icmp_echo_ignore_all=1 重新生效 sysctl -p
阅读全文
posted @ 2022-06-07 22:58 ho966
阅读(57)
评论(0)
推荐(0)
network网卡设置
摘要: 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
阅读(592)
评论(0)
推荐(0)
2022年6月1日
EAGAIN和EWOULDBLOCK
摘要: EAGAIN或EWOULDBLOCK二者应该是一样的,对应的错误码是11, socket在对端关闭后,recv返回的长度为0 socket非阻塞模式下, 如果缓存区没数据,此时recv就会 返回-1,报错误码EAGAIN或EWOULDBLOCK,所以读取失败,要判断是errno是否为EAGAIN或E
阅读全文
posted @ 2022-06-01 17:32 ho966
阅读(701)
评论(0)
推荐(0)
2022年5月15日
rabbit持久化消息示例
摘要: 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
阅读(75)
评论(0)
推荐(0)
内存与磁盘相关配置rabbitmq
摘要: https://blog.csdn.net/weixin_45070175/article/details/118660954
阅读全文
posted @ 2022-05-15 22:15 ho966
阅读(20)
评论(0)
推荐(0)
2022年4月20日
linux死锁问题定位
摘要: 写一个死锁代码: #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
阅读(308)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
13
下一页
公告