#!/usr/bin/env bash set -e cat << 'LOGO' ---------------------------------- LOGO base_dir=$( cd "$(dirname "$0")" pwd ) cd $base_dir server_pid=$(ps -auxc | grep minio-into-stck | grep -vE "grep|-Xmx700m" | awk '{print $2}') if [[ $server_pid == "" ]]; then echo "minio-into-stck 未在运行" else running_time=$(ps -o etime= -p "$server_pid") ports=$(ss -tnlp | grep minio-into-stck | awk '{print $4}') echo "minio-into-stck 当前PID: $server_pid" echo "当前运行时间: $running_time" | tr -s " " echo "当前运行端口:" for i in "$ports"; do echo "$i" break done fi