[huntadmin@iZwz9diw9y2w5pkse0cx3jZ ~]$ sudo lsof -n |grep 'redis' | wc -l 10314 [huntadmin@iZwz9diw9y2w5pkse0cx3jZ ~]$ sudo lsof -n |grep 'php-fpm' | wc -l 60074
#top 然后输入1
$ sudo strace -p 21113
追踪进程执行的文件
lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/SetMembers.php", O_RDONLY) = 17 fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0 fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0 fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0 mmap(NULL, 516, PROT_READ, MAP_SHARED, 17, 0) = 0x7fc0e2ad8000 fcntl(17, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(17, {st_mode=S_IFREG|0644, st_size=516, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(17, 0, SEEK_CUR) = 0 lseek(17, 0, SEEK_SET) = 0 read(17, "<?php\n\n/*\n * This file is part o"..., 4096) = 516 lseek(17, 516, SEEK_SET) = 516 munmap(0x7fc0e2ad8000, 516) = 0 lseek(17, -516, SEEK_CUR) = 0 close(17) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command/Command.php", {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/Command.php", O_RDONLY) = 17 fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0 fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0 fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0 mmap(NULL, 2595, PROT_READ, MAP_SHARED, 17, 0) = 0x7fc0e2ad8000 fcntl(17, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(17, {st_mode=S_IFREG|0644, st_size=2595, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(17, 0, SEEK_CUR) = 0 lseek(17, 0, SEEK_SET) = 0 read(17, "<?php\n\n/*\n * This file is part o"..., 4096) = 2595 lseek(17, 2595, SEEK_SET) = 2595 munmap(0x7fc0e2ad8000, 2595) = 0 lseek(17, -2595, SEEK_CUR) = 0 close(17) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 gettimeofday({1702605733, 724233}, NULL) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 17 fcntl(17, F_GETFL) = 0x2 (flags O_RDWR) fcntl(17, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(17, {sa_family=AF_INET, sin_port=htons(6379), sin_addr=inet_addr("172.18.137.40")}, 16) = -1 EINPROGRESS (Operation now in progress) poll([{fd=17, events=POLLIN|POLLOUT|POLLERR|POLLHUP}], 1, 5000) = 1 ([{fd=17, revents=POLLOUT}]) getsockopt(17, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 fcntl(17, F_SETFL, O_RDWR) = 0 sendto(17, "*2\r\n$4\r\nAUTH\r\n$11\r\nicDb29mLy2s\r\n", 32, MSG_DONTWAIT, NULL, 0) = 32 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response/Status.php", {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Response/Status.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0 mmap(NULL, 1743, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=1743, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 1743 lseek(18, 1743, SEEK_SET) = 1743 munmap(0x7fc0e2ad8000, 1743) = 0 lseek(18, -1743, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response/ResponseInterface.php", {st_mode=S_IFREG|0644, st_size=417, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Response", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Response/ResponseInterface.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0 mmap(NULL, 417, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=417, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 417 lseek(18, 417, SEEK_SET) = 417 munmap(0x7fc0e2ad8000, 417) = 0 lseek(18, -417, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 sendto(17, "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n", 23, MSG_DONTWAIT, NULL, 0) = 23 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5 sendto(17, "*2\r\n$8\r\nSMEMBERS\r\n$17\r\nspider_wh"..., 42, MSG_DONTWAIT, NULL, 0) = 42 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, "*153\r\n$11\r\n120.79.24.7\r\n$14\r\n113"..., 8192, MSG_DONTWAIT, NULL, NULL) = 3114 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command/StringSet.php", {st_mode=S_IFREG|0644, st_size=505, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/StringSet.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0 mmap(NULL, 505, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=505, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 505 lseek(18, 505, SEEK_SET) = 505 munmap(0x7fc0e2ad8000, 505) = 0 lseek(18, -505, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 brk(0x3415000) = 0x3415000 sendto(17, "*3\r\n$3\r\nSET\r\n$34\r\nspider_warning"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "4zNDk3LjEwMCBTYWZhcmkvNTM3LjM2Ii"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "hLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb2"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "dpbjY0OyB4NjQpIEFwcGxlV2ViS2l0Lz"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "oiTW96aWxsYS81LjAgKFdpbmRvd3MgTl"..., 8192, MSG_DONTWAIT, NULL, 0) = 6288 sendto(17, "5UIDYuMTsgV2luNjQ7IHg2NCkgQXBwbG"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "AwIiwiVWEiOiJNb3ppbGxhLzUuMCAoV2"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "A2OjUxOjE3IiwiSXAiOiI1OC4yNDYuMT"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "IyMzk2fSx7Ik5vd1RpbWUiOiIxNS9EZW"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "h0bWwiLCJVbml4IjoxNzAyNjMwMjg0LC"..., 8192, MSG_DONTWAIT, NULL, 0) = 8192 sendto(17, "NhZmFyaS81MzcuMzYiLCJVcmwiOiIvbm"..., 424, MSG_DONTWAIT, NULL, 0) = 424 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command/KeyExpire.php", {st_mode=S_IFREG|0644, st_size=511, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src/Command", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis/predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../predis", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/predis/predis/src/Command/KeyExpire.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0 mmap(NULL, 511, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=511, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 511 lseek(18, 511, SEEK_SET) = 511 munmap(0x7fc0e2ad8000, 511) = 0 lseek(18, -511, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 sendto(17, "*3\r\n$6\r\nEXPIRE\r\n$34\r\nspider_warn"..., 67, MSG_DONTWAIT, NULL, 0) = 67 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, ":1\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 4 sendto(17, "*3\r\n$3\r\nSET\r\n$34\r\nspider_warning"..., 101, MSG_DONTWAIT, NULL, 0) = 101 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, "+OK\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 5 sendto(17, "*3\r\n$6\r\nEXPIRE\r\n$34\r\nspider_warn"..., 67, MSG_DONTWAIT, NULL, 0) = 67 poll([{fd=17, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=17, revents=POLLIN}]) recvfrom(17, ":1\r\n", 8192, MSG_DONTWAIT, NULL, NULL) = 4 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http/Response.php", {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/laravel/framework/src/Illuminate/Http/Response.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0 mmap(NULL, 2697, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=2697, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\nnamespace Illuminate\\Http"..., 4096) = 2697 lseek(18, 2697, SEEK_SET) = 2697 munmap(0x7fc0e2ad8000, 2697) = 0 lseek(18, -2697, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation/Response.php", {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/symfony/http-foundation/Response.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0 mmap(NULL, 35446, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad0000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=35446, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2acf000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 4096 lseek(18, 4096, SEEK_SET) = 4096 munmap(0x7fc0e2ad0000, 35446) = 0 lseek(18, -4096, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2acf000, 4096) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http/ResponseTrait.php", {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate/Http", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src/Illuminate", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework/src", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel/framework", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../laravel", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/laravel/framework/src/Illuminate/Http/ResponseTrait.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0 mmap(NULL, 2016, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad8000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=2016, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad7000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\nnamespace Illuminate\\Http"..., 4096) = 2016 lseek(18, 2016, SEEK_SET) = 2016 munmap(0x7fc0e2ad8000, 2016) = 0 lseek(18, -2016, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad7000, 4096) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation/ResponseHeaderBag.php", {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony/http-foundation", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer/../symfony", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor/composer", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net/vendor", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot/waf.ichunt.net", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data/wwwroot", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 lstat("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 open("/data/wwwroot/waf.ichunt.net/vendor/symfony/http-foundation/ResponseHeaderBag.php", O_RDONLY) = 18 fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0 fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0 mmap(NULL, 8777, PROT_READ, MAP_SHARED, 18, 0) = 0x7fc0e2ad6000 fcntl(18, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE) fstat(18, {st_mode=S_IFREG|0644, st_size=8777, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc0e2ad5000 lseek(18, 0, SEEK_CUR) = 0 lseek(18, 0, SEEK_SET) = 0 read(18, "<?php\n\n/*\n * This file is part o"..., 4096) = 4096 lseek(18, 4096, SEEK_SET) = 4096 munmap(0x7fc0e2ad6000, 8777) = 0 lseek(18, -4096, SEEK_CUR) = 0 close(18) = 0 munmap(0x7fc0e2ad5000, 4096) = 0 clock_gettime(CLOCK_MONOTONIC, {180905924, 898678056}) = 0 gettimeofday({1702605733, 783981}, NULL) = 0 close(13) = 0 clock_gettime(CLOCK_MONOTONIC, {180905924, 898857463}) = 0 munmap(0x7fc0e2ad9000, 8192) = 0 write(4, "\1\6\0\1\37\370\0\0tml\"\n [\"Unix\"]=>\n "..., 8192) = 8192 write(4, "\1\6\0\1\1L\4\00064) AppleWebKit/537.36 ("..., 360) = 360 shutdown(4, SHUT_WR) = 0 recvfrom(4, "\1\5\0\1\0\0\0\0", 8, 0, NULL, NULL) = 8 recvfrom(4, "", 8, 0, NULL, NULL) = 0 close(4) = 0 clock_gettime(CLOCK_MONOTONIC, {180905924, 899778500}) = 0 chdir("/") = 0 clock_gettime(CLOCK_MONOTONIC, {180905924, 900108244}) = 0 times({tms_utime=14272, tms_stime=2106, tms_cutime=0, tms_cstime=0}) = 18517244170 close(17) = 0 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 sendto(14, "\1\0\0\0\1", 5, MSG_DONTWAIT, NULL, 0) = 5 close(14) = 0 close(10) = 0 unlink("/tmp/phpqJ5WPM") = 0 setitimer(ITIMER_PROF, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {180905924, 906997799}) = 0 accept(0, ^CProcess 21106 detachedView Code
查看php-fpm慢日志
目前出现的问题基本上都是too many open file的错误,
优化建议:
1,代码层面,减少api项目内部curl调用(继续优化ichuntapi项目内部的curl调用)
2,迁移项目到其它服务器(增加php-fpm资源)
user.ichunt.net
perm.ichunt.net
so.ichunt.com
2.1优化php-fpm参数调优
2.2根据php-fpm慢日志(上面的请求慢日志)优化代码
3,增加内存,服务器内存已不足
4,linux性能调优
查看当前TCP连接的状态和对应的连接数量:
[huntadmin@iZwz9diw9y2w5pkse0cx3jZ wwwroot]$ netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
TIME_WAIT 3397
CLOSE_WAIT 214
FIN_WAIT1 9
FIN_WAIT2 2
ESTABLISHED 2000
SYN_RECV 8
vim /etc/sysctl.conf
net.ipv4.tcp_syncookies= 1 #开启SYNCookies。当SYN等待队列溢出时,启用cookies处理,可防范少量SYN攻击,默认0,表关闭;
net.ipv4.tcp_tw_reuse= 1 #开启重用。允许将TIME-WAITsockets重用于新的TCP连接,默认0,表示关闭;
net.ipv4.tcp_tw_recycle= 1 #开启TCP连接中TIME-WAITsockets的快速回收,默认0,表关闭;
net.ipv4.tcp_fin_timeout= 30 #修改系統默认的 TIMEOUT 时间。
#输入下面的命令,让内核参数生效:
sysctl -p
Centos排除too many open files的问题 增加文件句柄打开数量
cat /etc/sysctl.conf
fs.file-max = 100000
cat /etc/security/limits.conf
* soft nofile 100000
* hard nofile 100000
重启服务
标签:...,ichunt,网站,性能,st,mode,net,优化,size From: https://www.cnblogs.com/sunlong88/p/17902755.html