dlmarion commented on code in PR #5502:
URL: https://github.com/apache/accumulo/pull/5502#discussion_r2059083729


##########
assemble/bin/accumulo-service:
##########
@@ -215,9 +225,20 @@ function kill_service() {
 function list_processes() {
   local service_type=$1
   find_processes "$service_type"
-  echo "Currently running ${service_type} processes:"
+  echo "Currently running ${service_type} processes (fields: process pid 
port):"
   for process in "${RUNNING_PROCESSES[@]}"; do
-    echo "$process"
+    local pid_file
+    local pid
+    local port
+    pid_file="${ACCUMULO_PID_DIR}/accumulo-${process}.pid"
+    pid=<("$pid_file")
+    port=$(netstat -tnlp 2>/dev/null | grep "$pid" | awk '{print $4}' | awk -F 
':' '{print $2}' | paste -sd "," -)

Review Comment:
   I think that if you do the following, then it will handle ipv6 addresses of 
the form ":::1234"
   
   ```suggestion
       port=$(netstat -tnlp 2>/dev/null | grep "$pid" | awk '{print $4}' | awk 
-F ':' '{print $NF}' | paste -sd "," -)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to