可以用指令:
netstat -apnt
Active Internet connections (established and servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program Name
tcp 0 0 127.0.0.1:42434 0.0.0.0:* LISTEN 628/android.hardware.gnss@1.0-service-ubx
tcp 0 0 192.168.225.2:36274 192.168.225.1:1883 ESTABLISHED 617/android.hardware.automotive.vehicle@2.0-service
tcp6 0 0 :::6507 :::* LISTEN 1578/com.xiaopeng.car.xpu.uploader
d21:/ #