CONDENSED_MODE too wide
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
Display is too wide.
How could we reproduce this issue?
And narrower
It only outputs correctly when the terminal is very wide.
millette@pop-os:~$ pm2 list
┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ verdaccio │ default │ 5.31.0 │ fork │ 2559076 │ 7m │ 0 │ online │ 0% │ 82.8mb │ millette │ enabled │
└────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
millette@pop-os:~$ tput cols
138
Supporting information
# Run the following commands
$ pm2 report
--- PM2 report ----------------------------------------------------------------
Date : Fri May 24 2024 11:29:25 GMT-0400 (Eastern Daylight Saving Time)
===============================================================================
--- Daemon --------------------------------------------------------------------
pm2d version : 5.4.0
node version : 18.20.3
node path : /home/millette/.local/share/pnpm/pm2
argv : /home/millette/.local/share/pnpm/nodejs/18.20.3/bin/node,/home/millette/.local/share/pnpm/global/5/.pnpm/pm2@5.4.0/node_modules/pm2/lib/Daemon.js
argv0 : node
user : millette
uid : 1000
gid : 1000
uptime : 9min
===============================================================================
--- CLI -----------------------------------------------------------------------
local pm2 : 5.4.0
node version : 18.20.3
node path : /home/millette/.local/share/pnpm/pm2
argv : /home/millette/.local/share/pnpm/nodejs/18.20.3/bin/node,/home/millette/.local/share/pnpm/global/5/node_modules/pm2/bin/pm2,report
argv0 : /home/millette/.local/share/pnpm/nodejs/18.20.3/bin/node
user : millette
uid : 1000
gid : 1000
===============================================================================
--- System info ---------------------------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : AMD Ryzen 7 4800HS with Radeon Graphics
cpus nb : 16
freemem : 5435662336
totalmem : 16153038848
home : /home/millette
===============================================================================
--- PM2 list ------------------------------------------------------------------
┌────┬──────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼──────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ verdaccio │ default │ 5.31.0 │ fork │ 2559076 │ 9m │ 0 │ online │ 0.1% │ 82.8mb │ millette │ enabled │
└────┴──────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs ---------------------------------------------------------------
/home/millette/.pm2/pm2.log last 20 lines:
PM2 | 2024-05-24T11:20:16: PM2 log: PM2 successfully stopped
PM2 | 2024-05-24T11:20:16: PM2 log: ===============================================================================
PM2 | 2024-05-24T11:20:16: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
PM2 | 2024-05-24T11:20:16: PM2 log: Time : Fri May 24 2024 11:20:16 GMT-0400 (Eastern Daylight Saving Time)
PM2 | 2024-05-24T11:20:16: PM2 log: PM2 version : 5.4.0
PM2 | 2024-05-24T11:20:16: PM2 log: Node.js version : 18.20.3
PM2 | 2024-05-24T11:20:16: PM2 log: Current arch : x64
PM2 | 2024-05-24T11:20:16: PM2 log: PM2 home : /home/millette/.pm2
PM2 | 2024-05-24T11:20:16: PM2 log: PM2 PID file : /home/millette/.pm2/pm2.pid
PM2 | 2024-05-24T11:20:16: PM2 log: RPC socket file : /home/millette/.pm2/rpc.sock
PM2 | 2024-05-24T11:20:16: PM2 log: BUS socket file : /home/millette/.pm2/pub.sock
PM2 | 2024-05-24T11:20:16: PM2 log: Application log path : /home/millette/.pm2/logs
PM2 | 2024-05-24T11:20:16: PM2 log: Worker Interval : 30000
PM2 | 2024-05-24T11:20:16: PM2 log: Process dump file : /home/millette/.pm2/dump.pm2
PM2 | 2024-05-24T11:20:16: PM2 log: Concurrent actions : 2
PM2 | 2024-05-24T11:20:16: PM2 log: SIGTERM timeout : 1600
PM2 | 2024-05-24T11:20:16: PM2 log: ===============================================================================
PM2 | 2024-05-24T11:20:16: PM2 log: [Watch] Start watching verdaccio
PM2 | 2024-05-24T11:20:16: PM2 log: App [verdaccio:0] starting in -fork mode-
PM2 | 2024-05-24T11:20:16: PM2 log: App [verdaccio:0] online
Same problem with earlier version (5.3.1).
See also #4335 and #4906.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running pm2 list in a narrower terminal and compare it with the reported 138-column output; inspect the CLI table-rendering entry point responsible for CONDENSED_MODE. Done means the process list fits narrower terminals while remaining readable, without reproducing the reported excessive width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100