muduo library net source code analysis III (timer)
Enables EventLoop to handle timer events
Timing function
Used to make the program wait for a period of time or schedule a scheduled task:
sleep
alarm usleep
nanosleep
clock_nanosleep
getitimer / setitimer
timer_create / timer_settime / timer_gettime / timer_delete
timerfd_create / timerfd_gettime / timerfd_settime chooses this method. ...
Added by Ixplodestuff8 on Mon, 21 Feb 2022 08:34:16 +0200
Common concepts and commands of Kubernetes
How kubedm works
Install master
When initializing the master, just execute the kubedm init command:
kubeadm init --pod-network-cidr 10.244.0.0/16 --kubernetes-version st able
This command will automatically:
System status inspection;Generate a token;Generate self signed CA and client certificate;Generate kubeconfig to connect kubelet to A ...
Added by climbjm on Mon, 21 Feb 2022 05:44:56 +0200
Common java troubleshooting commands and tools under Linux
Most of the environments described in this article are based on linux. For a program, under Linux, we can find the corresponding process ID according to the program response information:
ps -ef | grep java | grep -v grep | |awk '{print $2}'
In this way, we can get the process id and PID of the corresponding program
After obtaining the PI ...
Added by ledtear on Mon, 21 Feb 2022 05:37:52 +0200
How to set the management password for your nginx service
catalogue
1. Install the package on which Nginx compilation depends
2. Download and install Nginx
Generate certificate:
Configure nginx https:
1. Install the package on which Nginx compilation depends
In centos, you can use yum to install the following dependent packages:
yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-deve ...
Added by lexx on Mon, 21 Feb 2022 05:37:44 +0200
Detailed explanation of Linux orphan process and zombie process
1. Foreword
When looking at Chapter 8 of advanced programming in unix environment, I mentioned orphan process and zombie process. I have been vague about these two concepts. Today, I was asked what is the orphan process and zombie process, what problems will be brought about and how to solve them. I just stay on the concept without going deep. ...
Added by bond00 on Sun, 20 Feb 2022 20:14:24 +0200
Linux fork system call
In Linux, the fork system call can be used to create a child process. The child process will inherit most of the properties of the parent process, and then the child process will call the exec cluster function to run other programs. Let's take a concrete example to illustrate the relationship between parent-child processes
#include <stdio.h ...
Added by BioBob on Sun, 20 Feb 2022 19:25:49 +0200
Ubuntu/Linux Terraform oci one click script snapping up Oracle VM Standard. A1. Flex # 4 OCPU, 24 GB memory vps
Oracle's machine was blown up, so that the little partners could not open the free machine, so they wrote a script and robbed it on the server. When the resources came out, they could basically open it. This script uses Terraform to call API to execute tasks. The following is a brief description.
Oracle ARM has been used by everyone for a wh ...
Added by adam87 on Sun, 20 Feb 2022 19:22:56 +0200
How should I configure the server after spending 288 for three years
preface
The ECS that Alibaba cloud bought for 95 yuan is about to expire. It needs more than 1000 to renew. I thought there was nothing important on the server, so I took advantage of Tencent cloud discount and spent 288 to buy a three-year CVM. CVM is a cloud virtual machine. Let's call it a server for the time being.
1 core 2G, it seems tha ...
Added by dch27 on Sun, 20 Feb 2022 19:06:18 +0200
Day 12 of MySQL Introduction (database configuration and deployment)
catalogue
12.1MySQL configuration file
(1) Configuration section
(2) Basic configuration
(3) Memory and optimized configuration
(4) Log configuration
12.2 data backup and restore
(1) Data backup
(2) Data restore
(3) Binary log
12.3 multi instance deployment
12.4 master slave replication
12.1MySQL configuration file
(1) Configu ...
Added by sun14php on Sun, 20 Feb 2022 16:11:48 +0200
Variable 4 in shell script
1. Definition of variables A variable is the address of an area of memory Meaning of variables The command cannot manipulate the value that changes all the time. Using a fixed string of characters to represent an unfixed target can solve this problem 2. Variable definition method in shell script Environment level: the variable becomes invalid a ...
Added by ChrisDarl on Sun, 20 Feb 2022 15:44:40 +0200