mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Profiler] Make sure grep pattern includes all node processes (#218430)
previously we only matched processes that looked like: `000 node scripts/` but we should actually match: `000 /.../node/v20.18.2/bin/node scripts/`
This commit is contained in:
parent
35407c9240
commit
ead7426c6d
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ export async function getNodeProcesses(
|
|||
): Promise<Array<{ pid: number; command: string; ports: number[] }>> {
|
||||
const candidates = await execa
|
||||
.command(
|
||||
`ps -eo pid,command | grep -E '^[[:space:]0-9]+[[:space:]]*node[[:space:]]?' | grep -v grep ${
|
||||
`ps -eo pid,command | grep -E '^[[:space:]]*[0-9]+[[:space:]]+([^[:space:]]+/)*node($|[[:space:]])' | grep -v grep ${
|
||||
grep ? `| grep "${grep}" ` : ''
|
||||
}`,
|
||||
{ shell: true, reject: false }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue