Open shivaraj-bh opened 2 months ago
Hi @shivaraj-bh,
Just to make sure, are you aware that this information already exists in the general process info F3
?
Do you think it deserves a dedicated column?
I can’t see that in F3
, is there any configuration that needs to be set? in this case, the port used by postgres
.
Do you think it deserves a dedicated column?
I don’t mind if its available in F3
for now, regarding whether this deserves a column, you can take call once there are enough thumbs ups on this issue.
Are you running postgres in a script? The port should be visible like in the screenshot below:
Ah yes, it is in a script. Is there any workaround for such a case, i.e can we set this TCP port manually?
Ah yes, it is in a script. Is there any workaround for such a case, i.e can we set this TCP port manually?
Use exec postgres
instead of just postgres
at the end of the script so the postgres process replaces the bash script.
Ah yes, it is in a script. Is there any workaround for such a case, i.e can we set this TCP port manually?
Use
exec postgres
instead of justpostgres
at the end of the script so the postgres process replaces the bash script.
Thanks for the suggestion. This didn’t work though. Here’s my script:
set -o errexit
set -o nounset
set -o pipefail
export PATH="/nix/store/w11g7nvm4h1ph7kjq6c4cxna3yppsn2v-postgresql-16.4/bin:/nix/store/vb8mdklw65p9wikp97ybmnyay0xzipx3-coreutils-9.5/bin:$PATH"
PGDATA=$(readlink -f "./data/pg1")
export PGDATA
exec postgres
And the corresponding screenshot with F3
on the process:
Ah yes, it is in a script. Is there any workaround for such a case, i.e can we set this TCP port manually?
Use
exec postgres
instead of justpostgres
at the end of the script so the postgres process replaces the bash script.Thanks for the suggestion. This didn’t work though. Here’s my script:
set -o errexit set -o nounset set -o pipefail export PATH="/nix/store/w11g7nvm4h1ph7kjq6c4cxna3yppsn2v-postgresql-16.4/bin:/nix/store/vb8mdklw65p9wikp97ybmnyay0xzipx3-coreutils-9.5/bin:$PATH" PGDATA=$(readlink -f "./data/pg1") export PGDATA exec postgres
And the corresponding screenshot with
F3
on the process:
Thanks for trying it, sorry it didn't work. Can you please post a screenshot of process-compose
htop
screenshot with tree mode enabled (F5)? The immediate child process should be postgresql
, nothing in between.
There is a top-level script that starts process-compose
and directly under it is the postgres
process. This is the top-level script:
#!/nix/store/vpvy79k1qq02p1vyqjk6nb89gwhxqvyb-bash-5.2p32/bin/bash
set -o errexit
set -o nounset
set -o pipefail
export PATH="/nix/store/4sxr0bayv0rv5xpmm7ma8p8ks3ls0lml-process-compose-1.24.2/bin:$PATH"
export PC_CONFIG_FILES=/nix/store/l7dkx7fk9i6i94m32bi800wlakika46z-process-compose-postgres.json
set -x; process-compose --no-server \
"$@"; set +x
Hey @shivaraj-bh,
Will you be able to provide an output of:
ss -tulpn | grep postgres
❯ ss -tulpn | grep postgres
tcp LISTEN 0 200 127.0.0.1:5433 0.0.0.0:* users:(("postgres",pid=2807031,fd=8))
tcp LISTEN 0 200 127.0.0.1:5432 0.0.0.0:* users:(("postgres",pid=2806984,fd=8))
tcp LISTEN 0 200 127.0.0.1:5433 0.0.0.0:* users:(("postgres",pid=2807031,fd=8))
tcp LISTEN 0 200 127.0.0.1:5432 0.0.0.0:* users:(("postgres",pid=2806984,fd=8))
^^^^^^^
Is this PID 2806984
equal to the one shown by PC?
Yes, see pg1
and pg2
. Also included pg1
’s process info
Last question. Can you please:
> cd /proc/net
> grep 1538 *
and share the output (including the file name).
1538 = HEX(5432)
tcp: 4: 0100007F:1538 00000000:0000 0A 00000000:00000000 00:00000000 00000000 1000 0 14071023 1 ffff88830e853600 100 0 0 10 0
tcp: 5: 0100007F:DA7A 0100007F:1538 06 00000000:00000000 03:00000032 00000000 0 0 0 3 ffff888128775ed0
tcp: 7: 0100007F:AADC 0100007F:1538 06 00000000:00000000 03:0000041A 00000000 0 0 0 3 ffff8882a8bac660
tcp: 10: 0100007F:D18A 0100007F:1538 06 00000000:00000000 03:000013BA 00000000 0 0 0 3 ffff888b28b5eee0
tcp: 16: 0100007F:CC56 0100007F:1538 06 00000000:00000000 03:00000802 00000000 0 0 0 3 ffff8881acd96660
tcp: 17: 0100007F:87C0 0100007F:1538 06 00000000:00000000 03:00000BEA 00000000 0 0 0 3 ffff88835e03eaa0
tcp: 19: 0100007F:ED3A 0100007F:1538 06 00000000:00000000 03:00000FD2 00000000 0 0 0 3 ffff88812108ccc0
Hi @shivaraj-bh, Can you please confirm that the issue still exists in v1.40?
Feature Request
Use Case:
It will be inconvenient to scroll up the logs of the process to usually find the port it is listening on, a port column will be nice to have.
Proposed Change:
Who Benefits From The Change(s)?
Alternative Approaches