mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
Optimize script logs
This commit is contained in:
parent
406228297e
commit
b85bb4ca4b
@ -409,20 +409,15 @@ openim::util::check_process_names() {
|
||||
|
||||
# Check if any process IDs were found
|
||||
if [[ ${#pids[@]} -eq 0 ]]; then
|
||||
not_started+=("$process_name")
|
||||
not_started+=($process_name)
|
||||
else
|
||||
# If there are PIDs, loop through each one
|
||||
for pid in "${pids[@]}"; do
|
||||
local command=$(ps -p $pid -o cmd=)
|
||||
local start_time=$(ps -p $pid -o lstart=)
|
||||
local port=$(get_port $pid | tr -d '\n') # Remove any newline characters
|
||||
|
||||
# Add space within port numbers, assuming you need to format them
|
||||
if [[ ! -z $port && $port != "N/A" ]]; then
|
||||
# Example formatting: assuming ports are returned as a single long string and you want to separate every 4 characters with a space
|
||||
port=$(echo "$port" | sed 's/.\{4\}/& /g')
|
||||
fi
|
||||
local port=$(get_port $pid)
|
||||
|
||||
# Check if port information was found for the PID
|
||||
if [[ -z $port ]]; then
|
||||
port="N/A"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user