Is there a way to directly gather the vmware port-id using commandline?
I'm trying to make monitoring switchports easy through esxcli but in order to get port statistics I require the portid of a VM which seems to be quite an involved operation using vMA (Virtual Machine Assistant)
Example below, I just want to easily be able to get portid by doing something like:
esxcli network portid (VMNAME)But I cannot find anything similar to that.
esxcli network port stats get Error: Missing required parameter -p|--portid Usage: esxcli network port stats get [cmd options] Description: get Packet statistics for a given port. Cmd options: -p|--portid= Port ID for the port to get statistics. (required)