月度归档:2018年11月

LVM ext4缩容

缩减逻辑卷,xfs不支持,缩减前先unmount

e2fsck -f /dev/vg1/lv1 #检查磁盘错误 (针对ext4执行)
resize2fs /dev/vg1/lv1 100M #更新逻辑卷信息(针对ext4执行)
lvresize -L 100M /dev/vg1/lv1 #重新设定大小

作者:pcct
来源:CSDN
原文:https://blog.csdn.net/lovektm/article/details/78461453
版权声明:本文为博主原创文章,转载请附上博文链接!

学习下

#include <stdio.h>

void pass(){
    int a=0;
    int *p=&a;
    while(1){
        if(*p==123)
            break;
        p++;
    }
    *p=456;
}

int main(){
    int x=123;
    pass();
    printf("%d\n",x);
    return 0;
}

accept4() failed (24: Too many open files)

nginx添加如下配置然后reload一下就好了:

worker_rlimit_nofile 655350;

worker_connections  60000;    # 需要小于或等于  worker_rlimit_nofile 

2019/12/14 20:24:12 [alert] 2642#2642: setrlimit(RLIMIT_NOFILE, 65535) failed (1: Operation not permitted)

setsebool -P httpd_setrlimit 1

https://www.linuxquestions.org/questions/centos-111/nginx-setrlimit-operation-not-permitted-4175599913/

kernel: TCP: request_sock_TCP: Possible SYN flooding on port 9000. Sending cookies.  Check SNMP counters.

[alert] 1319#1319: 1024 worker_connections are not enough