You could use wireshark but it’s the wrong tool for the job. Why not ask the OS? SNMP and such tools are designed for this.