shutdown和close都可以用来关闭TCP连接, 那么它们有区别与联系呢? 下面来研究下这个问题: 1. close 关闭连接和套接字. 成功返回0; 失败为-1, errno被设置 #include <unistd.h> int close(int fd); close会把描述符(sockf ...
分类:
系统相关 时间:
2021-06-06 19:09:08
阅读次数:
0
一、简介 cgroups 的全称是control groups,是Linux内核提供的一种可以限制、记录、隔离进程组所使用的物理资源(包括:CPU、memory、IO等),可以对 cpu,内存等资源实现精细化的控制,目前越来越火的轻量级容器 Docker 就使用了 cgroups 提供的资源限制能力 ...
分类:
其他好文 时间:
2021-06-06 19:06:23
阅读次数:
0
Django实现MySQL读写分离 1. 增加slave数据库的配置 DATABASES = { 'default': { # 写(主机) 'ENGINE': 'django.db.backends.mysql', # 数据库引擎 'HOST': '192.168.103.158', # 数据库主机 ...
分类:
数据库 时间:
2021-06-06 19:02:54
阅读次数:
0
1、下载 https://downloads.mysql.com/archives/community/ wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.5.62-linux-glibc2.12-x86_64.tar.g ...
分类:
系统相关 时间:
2021-06-06 18:56:23
阅读次数:
0
Preliminaries Linux Basics Change Password: passwd shutdown: sudo shutdown -h 3 (broadcast to all users in 3 mins) reboot: sudo reboot -r now create a ...
分类:
其他好文 时间:
2021-06-06 18:53:34
阅读次数:
0
#使用Markdown格式 最近的事 课程考试 程序比赛 四级 回家的事 考研还是就业(好慌) 考驾照 该不该买计算机网络的书 Linux的学习 public static void main(String[] args){ SyStem.out.println("Hello,World"); } ...
分类:
其他好文 时间:
2021-06-05 18:37:20
阅读次数:
0
定时任务简介 什么是定时任务 maintains crontab files for individual users 为单一用户维护crontab文件 为什么要使用定时任务 使用计划任务可以周期性的执行一些命令、脚本等,比如批量服务、备份脚本 Linux系统的定时任务分类 1、linux系统自身定 ...
分类:
系统相关 时间:
2021-06-05 18:27:27
阅读次数:
0
在Windows中,有时特定的ip只能访问特定的网络,就需要进行路由的转发。 1.查询路由信息 route print -4 是查询IPv4的路由信息,若要查询所有的,把`-4`去掉即可。 2.添加路由 route -p add 目的ip mask 子网掩码 下一跳ip 例如把目的为:10.100. ...
在 linux 下面,查找路径一般是 where ,但是同样的命令在PS下面是不行的。 在PS下有个查看别名的命令:Get-Alias ,看一下where是啥? Alias where -> Where-Object 原来 where 是 Where-Object 这个命令的别名,并不是查看路径用的 ...
分类:
系统相关 时间:
2021-06-05 18:16:02
阅读次数:
0
因为某种应用场景我需要将特定目录下的txt文件进行清理,核心命令如下: find 目录 -name '*.txt' -type f -print -exec rm -rf {} \; 例如: find /home/tech/data_log -name '*.txt' -type f -print ...
分类:
系统相关 时间:
2021-06-05 17:53:08
阅读次数:
0