get the port stat information,doing the encode port_stats