Skip to content

Commit 41d2af5

Browse files
committed
add recently knowledge
1 parent 55885fe commit 41d2af5

File tree

6 files changed

+27
-1
lines changed

6 files changed

+27
-1
lines changed

awesome_project.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
// 记录一些值得深入研究的开源项目
2+
13
1、ext3grep
24
url: https://code.google.com/archive/p/ext3grep/source/default/source

docker.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// 记录docker相关知识点
2+
3+
1、之前一直没有留意,在宿主机上使用ps 或 top 等命令是可以看到docker内进程信息的,但由于namespace隔离机制,
4+
docker内部是无法看到宿主os的进程信息
5+
6+
2、怎么确认一个进程是由docker启动的?
7+
(tips:从上面 1 中由ps 或 top 获取进程pid,然后cat /proc/${pid}/cgroup | grep docker,如果有输出,则可以确认进程
8+
由docker创建; 另外,也可以使用 docker inspect 来反向验证)

git.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// record awsome git tool
2+
3+
1、当远端git仓库不支持添加ssh public key的方式进行免密访问时,可以使用 git config --global credential.helper store 命令,在随后的git 命令中再次输入账密后,
4+
git会自动记录账号 密码,之后的访问就可以免密
5+
6+
2、git clone 下载代码hang住时,如果排除了基本的网络和权限原因外,还是不能发现问题,可以尝试
7+
GIT_TRACE=1 git clone ${git_url}
8+
上述命令会展示git clone的细节,比 git clone --verbose 还要详细
9+
10+
3、查看一个被删除文件的log时,可以使用 git log --all --full-history -- <path to file>

network.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
6、客户端可以创建多少个socket?(同一个IP地址)
8080

8181
7、epoll poll select 区别与联系?
82+
(tips:select实现了基本的IO多路复用,但是一是支持的fdset数量固定,受一个内核宏的控制
83+
而且不好修改,之前有人尝试改过,但效果不佳,内核会panic,二是select基于遍历操作,时间复杂度是O(N),
84+
三是fdset需要频繁的在用户空间和内核空间进行拷贝;poll则针对待监听fd数量进行了优化;
85+
epoll则针对上述三项分别进行了优化)
8286

8387
8、epoll 中 LT ET 区别,使用场景?
8488
(tips:ET中,如果没有read socket到 EAGAIN,有可能导致整个处理过程阻塞,

tools.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
this doc record some useful tools to trace problem or optimize performance
1+
// this doc record some useful tools to trace problem or optimize performance
22

33
#No.1 dropwatch
44
用来查看机器丢包信息,辅助定位网络问题

website_url.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// 记录一些 awsome 网站
2+
1、linux-commits-search.typesense.org 内核commit搜索网站

0 commit comments

Comments
 (0)