共被编辑 3 次

版本 更新时间 贡献者 编辑原因 操作
#r3 6月8日 牙小木木885 更新问题 查看

swoole server启动后进程数的问题

启动server配置

$server->set(
            [
                'enable_static_handler' => true,
                'document_root'         => '/usr/share/nginx/xin_mount_dev/swoole30/demo/data/',
                'task_worker_num'       => 4,
                'worker_num'            => 2,
               
            ]

        );

查看启动进程

root@swoole_dev:/home/tb/mount_sh_all# ps -aux |grep ws_server
root      1826  0.0  3.5 390640 36572 pts/1    Sl+  23:03   0:00 php ws_server_oop.php
root      1827  0.0  0.8 316412  8368 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1829  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1830  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1831  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1832  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1833  0.0  0.8 308456  9080 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1834  0.0  0.8 308456  9080 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1837  0.0  0.1  12944  1032 pts/0    S+   23:04   0:00 grep --color=auto ws_server

其他信息

oot@swoole_dev:/proc/1828# ls -ail
total 0
22348 dr-xr-xr-x   9 root root 0 Jun  8 23:03 .
    1 dr-xr-xr-x 133 root root 0 Jun  8 22:29 ..
22611 dr-xr-xr-x   2 root root 0 Jun  8 23:08 attr
22593 -rw-r--r--   1 root root 0 Jun  8 23:08 autogroup
22588 -r--------   1 root root 0 Jun  8 23:08 auxv
22616 -r--r--r--   1 root root 0 Jun  8 23:08 cgroup
22608 --w-------   1 root root 0 Jun  8 23:08 clear_refs
22596 -r--r--r--   1 root root 0 Jun  8 23:08 cmdline
22594 -rw-r--r--   1 root root 0 Jun  8 23:08 comm
22622 -rw-r--r--   1 root root 0 Jun  8 23:08 coredump_filter
22615 -r--r--r--   1 root root 0 Jun  8 23:08 cpuset
22602 lrwxrwxrwx   1 root root 0 Jun  8 23:08 cwd -> /usr/share/nginx/xin_mount_dev/swoole30/demo/server
22587 -r--------   1 root root 0 Jun  8 23:08 environ
22604 lrwxrwxrwx   1 root root 0 Jun  8 23:08 exe -> /usr/bin/php7.0
22583 dr-x------   2 root root 0 Jun  8 23:08 fd
22585 dr-x------   2 root root 0 Jun  8 23:08 fdinfo
22625 -rw-r--r--   1 root root 0 Jun  8 23:08 gid_map
22623 -r--------   1 root root 0 Jun  8 23:08 io
22591 -r--r--r--   1 root root 0 Jun  8 23:08 limits
22620 -rw-r--r--   1 root root 0 Jun  8 23:08 loginuid
22584 dr-x------   2 root root 0 Jun  8 23:08 map_files
22599 -r--r--r--   1 root root 0 Jun  8 23:08 maps
22601 -rw-------   1 root root 0 Jun  8 23:08 mem
22606 -r--r--r--   1 root root 0 Jun  8 23:08 mountinfo
22605 -r--r--r--   1 root root 0 Jun  8 23:08 mounts
22607 -r--------   1 root root 0 Jun  8 23:08 mountstats
22586 dr-xr-xr-x   5 root root 0 Jun  8 23:08 net
22349 dr-x--x--x   2 root root 0 Jun  8 23:03 ns
22600 -r--r--r--   1 root root 0 Jun  8 23:08 numa_maps
22618 -rw-r--r--   1 root root 0 Jun  8 23:08 oom_adj
22617 -r--r--r--   1 root root 0 Jun  8 23:08 oom_score
22619 -rw-r--r--   1 root root 0 Jun  8 23:08 oom_score_adj
22610 -r--------   1 root root 0 Jun  8 23:08 pagemap
22590 -r--------   1 root root 0 Jun  8 23:08 personality
22626 -rw-r--r--   1 root root 0 Jun  8 23:08 projid_map
22603 lrwxrwxrwx   1 root root 0 Jun  8 23:08 root -> /
22592 -rw-r--r--   1 root root 0 Jun  8 23:08 sched
=========================================
oot@swoole_dev:/proc/1828# ps -aux |grep 1827 |grep -v grep
root      1827  0.0  0.8 316412  8368 pts/1    S+   23:03   0:00 php ws_server_oop.php
root@swoole_dev:/proc/1828# ps -aux |grep 1826 |grep -v grep
root      1826  0.0  3.5 390640 36572 pts/1    Sl+  23:03   0:00 php ws_server_oop.php
root@swoole_dev:/proc/1828# ps -aux |grep 1828 |grep -v grep
root@swoole_dev:/proc/1828# ps -aux |grep 1831 |grep -v grep
root      1831  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php

疑问 1828这个进程id代表啥呢?

root@swoole_dev:/home/tb/mount_sh_all# pstree -p 1826
php(1826)─┬─php(1827)─┬─php(1829)
          │           ├─php(1830)
          │           ├─php(1831)
          │           ├─php(1832)
          │           ├─php(1833)
          │           └─php(1834)
          └─{php}(1828)

可以看出MASTER ID IS :1826
MANAGER_PID IS: 1827,那么1828这个是?

#r2 6月8日 牙小木木885 更新问题 查看

swoole server启动后进程数的问题

启动server配置

$server->set(
            [
                'enable_static_handler' => true,
                'document_root'         => '/usr/share/nginx/xin_mount_dev/swoole30/demo/data/',
                'task_worker_num'       => 4,
                'worker_num'            => 2,
               
            ]

        );

查看启动进程

root@swoole_dev:/home/tb/mount_sh_all# ps -aux |grep ws_server
root      1826  0.0  3.5 390640 36572 pts/1    Sl+  23:03   0:00 php ws_server_oop.php
root      1827  0.0  0.8 316412  8368 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1829  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1830  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1831  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1832  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1833  0.0  0.8 308456  9080 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1834  0.0  0.8 308456  9080 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1837  0.0  0.1  12944  1032 pts/0    S+   23:04   0:00 grep --color=auto ws_server

其他信息

oot@swoole_dev:/proc/1828# ls -ail
total 0
22348 dr-xr-xr-x   9 root root 0 Jun  8 23:03 .
    1 dr-xr-xr-x 133 root root 0 Jun  8 22:29 ..
22611 dr-xr-xr-x   2 root root 0 Jun  8 23:08 attr
22593 -rw-r--r--   1 root root 0 Jun  8 23:08 autogroup
22588 -r--------   1 root root 0 Jun  8 23:08 auxv
22616 -r--r--r--   1 root root 0 Jun  8 23:08 cgroup
22608 --w-------   1 root root 0 Jun  8 23:08 clear_refs
22596 -r--r--r--   1 root root 0 Jun  8 23:08 cmdline
22594 -rw-r--r--   1 root root 0 Jun  8 23:08 comm
22622 -rw-r--r--   1 root root 0 Jun  8 23:08 coredump_filter
22615 -r--r--r--   1 root root 0 Jun  8 23:08 cpuset
22602 lrwxrwxrwx   1 root root 0 Jun  8 23:08 cwd -> /usr/share/nginx/xin_mount_dev/swoole30/demo/server
22587 -r--------   1 root root 0 Jun  8 23:08 environ
22604 lrwxrwxrwx   1 root root 0 Jun  8 23:08 exe -> /usr/bin/php7.0
22583 dr-x------   2 root root 0 Jun  8 23:08 fd
22585 dr-x------   2 root root 0 Jun  8 23:08 fdinfo
22625 -rw-r--r--   1 root root 0 Jun  8 23:08 gid_map
22623 -r--------   1 root root 0 Jun  8 23:08 io
22591 -r--r--r--   1 root root 0 Jun  8 23:08 limits
22620 -rw-r--r--   1 root root 0 Jun  8 23:08 loginuid
22584 dr-x------   2 root root 0 Jun  8 23:08 map_files
22599 -r--r--r--   1 root root 0 Jun  8 23:08 maps
22601 -rw-------   1 root root 0 Jun  8 23:08 mem
22606 -r--r--r--   1 root root 0 Jun  8 23:08 mountinfo
22605 -r--r--r--   1 root root 0 Jun  8 23:08 mounts
22607 -r--------   1 root root 0 Jun  8 23:08 mountstats
22586 dr-xr-xr-x   5 root root 0 Jun  8 23:08 net
22349 dr-x--x--x   2 root root 0 Jun  8 23:03 ns
22600 -r--r--r--   1 root root 0 Jun  8 23:08 numa_maps
22618 -rw-r--r--   1 root root 0 Jun  8 23:08 oom_adj
22617 -r--r--r--   1 root root 0 Jun  8 23:08 oom_score
22619 -rw-r--r--   1 root root 0 Jun  8 23:08 oom_score_adj
22610 -r--------   1 root root 0 Jun  8 23:08 pagemap
22590 -r--------   1 root root 0 Jun  8 23:08 personality
22626 -rw-r--r--   1 root root 0 Jun  8 23:08 projid_map
22603 lrwxrwxrwx   1 root root 0 Jun  8 23:08 root -> /
22592 -rw-r--r--   1 root root 0 Jun  8 23:08 sched
=========================================
oot@swoole_dev:/proc/1828# ps -aux |grep 1827 |grep -v grep
root      1827  0.0  0.8 316412  8368 pts/1    S+   23:03   0:00 php ws_server_oop.php
root@swoole_dev:/proc/1828# ps -aux |grep 1826 |grep -v grep
root      1826  0.0  3.5 390640 36572 pts/1    Sl+  23:03   0:00 php ws_server_oop.php
root@swoole_dev:/proc/1828# ps -aux |grep 1828 |grep -v grep
root@swoole_dev:/proc/1828# ps -aux |grep 1831 |grep -v grep
root      1831  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php

疑问 1828这个进程id代表啥呢?

可以看出MASTER ID IS :1826
MANAGER_PID IS: 1827,那么1828这个是?

#r1 6月8日 牙小木木885 创建问题 查看

swoole server启动后进程数的问题

启动server配置

$server->set(

        [
            'enable_static_handler' => true,
            'document_root'         => '/usr/share/nginx/xin_mount_dev/swoole30/demo/data/',
            'task_worker_num'       => 4,
            'worker_num'            => 2,
           
        ]

    );

查看启动进程

root@swoole_dev:/home/tb/mount_sh_all# ps -aux |grep ws_server
root      1826  0.0  3.5 390640 36572 pts/1    Sl+  23:03   0:00 php ws_server_oop.php
root      1827  0.0  0.8 316412  8368 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1829  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1830  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1831  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1832  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1833  0.0  0.8 308456  9080 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1834  0.0  0.8 308456  9080 pts/1    S+   23:03   0:00 php ws_server_oop.php
root      1837  0.0  0.1  12944  1032 pts/0    S+   23:04   0:00 grep --color=auto ws_server

其他信息

oot@swoole_dev:/proc/1828# ls -ail
total 0
22348 dr-xr-xr-x   9 root root 0 Jun  8 23:03 .
    1 dr-xr-xr-x 133 root root 0 Jun  8 22:29 ..
22611 dr-xr-xr-x   2 root root 0 Jun  8 23:08 attr
22593 -rw-r--r--   1 root root 0 Jun  8 23:08 autogroup
22588 -r--------   1 root root 0 Jun  8 23:08 auxv
22616 -r--r--r--   1 root root 0 Jun  8 23:08 cgroup
22608 --w-------   1 root root 0 Jun  8 23:08 clear_refs
22596 -r--r--r--   1 root root 0 Jun  8 23:08 cmdline
22594 -rw-r--r--   1 root root 0 Jun  8 23:08 comm
22622 -rw-r--r--   1 root root 0 Jun  8 23:08 coredump_filter
22615 -r--r--r--   1 root root 0 Jun  8 23:08 cpuset
22602 lrwxrwxrwx   1 root root 0 Jun  8 23:08 cwd -> /usr/share/nginx/xin_mount_dev/swoole30/demo/server
22587 -r--------   1 root root 0 Jun  8 23:08 environ
22604 lrwxrwxrwx   1 root root 0 Jun  8 23:08 exe -> /usr/bin/php7.0
22583 dr-x------   2 root root 0 Jun  8 23:08 fd
22585 dr-x------   2 root root 0 Jun  8 23:08 fdinfo
22625 -rw-r--r--   1 root root 0 Jun  8 23:08 gid_map
22623 -r--------   1 root root 0 Jun  8 23:08 io
22591 -r--r--r--   1 root root 0 Jun  8 23:08 limits
22620 -rw-r--r--   1 root root 0 Jun  8 23:08 loginuid
22584 dr-x------   2 root root 0 Jun  8 23:08 map_files
22599 -r--r--r--   1 root root 0 Jun  8 23:08 maps
22601 -rw-------   1 root root 0 Jun  8 23:08 mem
22606 -r--r--r--   1 root root 0 Jun  8 23:08 mountinfo
22605 -r--r--r--   1 root root 0 Jun  8 23:08 mounts
22607 -r--------   1 root root 0 Jun  8 23:08 mountstats
22586 dr-xr-xr-x   5 root root 0 Jun  8 23:08 net
22349 dr-x--x--x   2 root root 0 Jun  8 23:03 ns
22600 -r--r--r--   1 root root 0 Jun  8 23:08 numa_maps
22618 -rw-r--r--   1 root root 0 Jun  8 23:08 oom_adj
22617 -r--r--r--   1 root root 0 Jun  8 23:08 oom_score
22619 -rw-r--r--   1 root root 0 Jun  8 23:08 oom_score_adj
22610 -r--------   1 root root 0 Jun  8 23:08 pagemap
22590 -r--------   1 root root 0 Jun  8 23:08 personality
22626 -rw-r--r--   1 root root 0 Jun  8 23:08 projid_map
22603 lrwxrwxrwx   1 root root 0 Jun  8 23:08 root -> /
22592 -rw-r--r--   1 root root 0 Jun  8 23:08 sched
=========================================
oot@swoole_dev:/proc/1828# ps -aux |grep 1827 |grep -v grep
root      1827  0.0  0.8 316412  8368 pts/1    S+   23:03   0:00 php ws_server_oop.php
root@swoole_dev:/proc/1828# ps -aux |grep 1826 |grep -v grep
root      1826  0.0  3.5 390640 36572 pts/1    Sl+  23:03   0:00 php ws_server_oop.php
root@swoole_dev:/proc/1828# ps -aux |grep 1828 |grep -v grep
root@swoole_dev:/proc/1828# ps -aux |grep 1831 |grep -v grep
root      1831  0.0  0.8 306152  8824 pts/1    S+   23:03   0:00 php ws_server_oop.php

疑问 1828这个进程id代表啥呢?

可以看出MASTER ID IS :1826
MANAGER_PID IS: 1827,那么1828这个是?