On my computer, I noticed the following processes information:
$ pgrep -af f4f4a488c740adc8
3423257 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1487_f4f4a488c740adc80e1e4c43d81a14da.json -l 10014
3423263 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1487_f4f4a488c740adc80e1e4c43d81a14da.json -l 10014
As you can see, there are two processes listening
on the same port. On the other hand, if I kill
one of them, both will be terminated.
Why do these processes work this way?
Why are they listening on the same port at the same time?
On Sun, 26 Feb 2023 00:47:01 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:
On my computer, I noticed the following processes information:
$ pgrep -af f4f4a488c740adc8
3423257 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1487_f4f4a488c740adc80e1e4c43d81a14da.json -l 10014
3423263 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1487_f4f4a488c740adc80e1e4c43d81a14da.json -l 10014
As you can see, there are two processes listeningThis pgrep output does not prove these sslocal processes are
on the same port. On the other hand, if I kill
one of them, both will be terminated.
listening on the same port. It just says they are started with
the same -l parameter.
Two processes _can_ listen on the same portnumber on _different
interfaces_.
Why do these processes work this way?You'll have to study the documentation of sslocal, and/or ask
Why are they listening on the same port at the same time?
the author(s).
--
Kees Nuyt
Kees Nuyt wrote:
Two processes _can_ listen on the same portnumber on _different
interfaces_.
What might be the purpose of this? Can you give some similar examples?
On Sun, 26 Feb 2023 07:46:20 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:
Kees Nuyt wrote:
Two processes _can_ listen on the same portnumber on _different
interfaces_.
What might be the purpose of this? Can you give some similar examples?I have no idea, but it is possible.
Check with
sudo netstat -lntp
what your sslocal processes are actually doing.
--
Kees Nuyt
As you can see, there are two processes listening on the same port. On the other hand,
if I kill one of them, both will be terminated. Why do these processes work this way?
Why are they listening on the same port at the same time? Any tips for this behavior
will be appreciated.
hongy...@gmail.com <hongy...@gmail.com> wrote:
As you can see, there are two processes listening on the same port. On the other hand,
if I kill one of them, both will be terminated. Why do these processes work this way?
Why are they listening on the same port at the same time? Any tips for this behavior
will be appreciated.
When you examine these two process ids and take into account each one's ppid (parent process id), does it perhaps reveal these are a parent and child process?
--
::::::::::::: Greg Andrews ::::: ge...@panix.com :::::::::::::
I have a map of the United States that's actual size.
-- Steven Wright
As you can see, there are two processes listening on the same port.
Am 26.02.2023 schrieb "hongy...@gmail.com" <hongy...@gmail.com>:
As you can see, there are two processes listening on the same port.That is possible if they don't use the same IP.
So 2 different processes can listen on TCP [2001:db::123]:80 and TCP [2001:db::4444]:80.
Use ss -ltun to find more information.
They have the same pgid, sid, and sgid, as shown below:
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grep
68311 67948 67948 64750 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
68318 68311 67948 64750 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
Use ss -ltun to find more information.
See the following for more details:
werner@X10DAi:~$ ss -ltun | grep '10014'
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:*
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:*
On Sat, 4 Mar 2023 03:51:40 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:
Use ss -ltun to find more information.
See the following for more details:
werner@X10DAi:~$ ss -ltun | grep '10014'Now, add the -p option to see if udp and tcp are served by the
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:*
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:*
same process:
sudo ss -ltunp
--
Kees Nuyt
On Thu, 2 Mar 2023 21:42:50 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:
They have the same pgid, sid, and sgid, as shown below:
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grepSo, process 68318 was started by 68311.
68311 67948 67948 64750 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
68318 68311 67948 64750 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
This is a common construct:
The parent process (68311 in this case) does not handle
anything, it just spawns a child process (68318). That child
does the heavy lifting. If the child crashes, the parent spawns
a new one. In that case the child listens on the port.
There are other constructs, where the parent listens on the port
and spawns one or more child ("worker") processes to handle
incomin requests. The parent just mamages the request queue.
I don't know what happens here. As I said before, you have to
consult the sslocal documentation.
Ok, enough keywords there for you to search for mor elaborate
descriptions.
--
Kees Nuyt
On Thu, 2 Mar 2023 21:42:50 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:
They have the same pgid, sid, and sgid, as shown below:
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grepSo, process 68318 was started by 68311.
68311 67948 67948 64750 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
68318 68311 67948 64750 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
This is a common construct:
The parent process (68311 in this case) does not handle
anything, it just spawns a child process (68318). That child
does the heavy lifting. If the child crashes, the parent spawns
a new one. In that case the child listens on the port.
There are other constructs, where the parent listens on the port
and spawns one or more child ("worker") processes to handle
incomin requests. The parent just mamages the request queue.
I don't know what happens here. As I said before, you have to
consult the sslocal documentation.
Ok, enough keywords there for you to search for mor elaborate
descriptions.
--
Kees Nuyt
Now, add the -p option to see if udp and tcp are served by the
same process:
sudo ss -ltunp
See the following:
werner@X10DAi:~$ ss -ltunp | grep '10014'
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=4))
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=3))
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grep
3123709 3123347 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
3123715 3123709 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
werner@X10DAi:~$ ss -ltun | grep '10014'
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:*
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:*
On Sat, 4 Mar 2023 04:45:24 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:
Now, add the -p option to see if udp and tcp are served by the
same process:
sudo ss -ltunp
See the following:
werner@X10DAi:~$ ss -ltunp | grep '10014'Ok, there you are, that's clear. And what does the sslocal docs
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=4))
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=3))
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grep
3123709 3123347 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
3123715 3123709 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
tell you?
--
Kees Nuyt
On Monday, March 6, 2023 at 2:01:36?AM UTC+8, Kees Nuyt wrote:
On Sat, 4 Mar 2023 04:45:24 -0800 (PST), "hongy...@gmail.com"
<hongy...@gmail.com> wrote:
Ok, there you are, that's clear. And what does the sslocal docsNow, add the -p option to see if udp and tcp are served by the
same process:
sudo ss -ltunp
See the following:
werner@X10DAi:~$ ss -ltunp | grep '10014'
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=4))
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=3))
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grep
3123709 3123347 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
3123715 3123709 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
tell you?
TBF, I don't know. This is a program that stopped developing
many years ago, and its documentation is not friendly.
On Mon, 6 Mar 2023 00:05:38 -0800 (PST), "hongy...@gmail.com" <hongy...@gmail.com> wrote:fggggggtguttututttut8tttftytttffyy
On Monday, March 6, 2023 at 2:01:36?AM UTC+8, Kees Nuyt wrote:
On Sat, 4 Mar 2023 04:45:24 -0800 (PST), "hongy...@gmail.com"
<hongy...@gmail.com> wrote:
Ok, there you are, that's clear. And what does the sslocal docsNow, add the -p option to see if udp and tcp are served by the
same process:
sudo ss -ltunp
See the following:
werner@X10DAi:~$ ss -ltunp | grep '10014'
udp UNCONN 0 0 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=4))
tcp LISTEN 0 1024 0.0.0.0:10014 0.0.0.0:* users:(("sslocal",pid=3123715,fd=3))
werner@X10DAi:~$ ps xao pid,ppid,pgid,sid,sgid,command | grep ' -l 10014' |grep -v grep
3123709 3123347 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
3123715 3123709 3123347 3119533 1000 sslocal -c /home/werner/Public/anti-gfw/conf/ssr2json/ssr/US_ssr_eebzkdao.nodelist.xyz_1381_1421cc147ea4bb31049aea01851aac7e.json -l 10014
tell you?
TBF, I don't know. This is a program that stopped developingIt was brought to my attention that this subject is off-topic in comp.unix.shell , so I declare this END-OF-THREAD
many years ago, and its documentation is not friendly.
--
Kees Nuyt
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 22:13:20 |
Calls: | 6,667 |
Calls today: | 1 |
Files: | 12,216 |
Messages: | 5,337,350 |