I’m writing a js script to locate all pid files on a server, extract the pids and then run ‘ ps -fp {pid} ‘ on each of it and extract the memory usages. This is what I’ve got so far: The issue is pidsarr is not getting updated, probably since it’s not declared global or something to do with exec