Skip to content

Instantly share code, notes, and snippets.

@brandonweeks
Created November 10, 2015 19:42
Show Gist options
  • Save brandonweeks/9b618e9a7ed61e1e48dc to your computer and use it in GitHub Desktop.
Save brandonweeks/9b618e9a7ed61e1e48dc to your computer and use it in GitHub Desktop.
foreman=# SELECT count(*), host_id, identifier FROM nics GROUP BY host_id, identifier HAVING COUNT(*) > 1;
count | host_id | identifier
-------+---------+------------
2 | 776 | eth0
2 | 683 | ovs_system
2 | 670 | ovs_system
2 | 691 | ovs_system
2 | 690 | br_tun
2 | 690 | ovs_system
5 | 593 | br_tun
5 | 593 | ovs_system
6 | 657 | br_tun
4 | 657 | ovs_system
6 | 600 | br_tun
2 | 600 | ovs_system
2 | 323 | p1p1
2 | 678 | ovs_system
2 | 678 | br_tun
2 | 689 | br_tun
2 | 689 | ovs_system
2 | 677 | ovs_system
2 | 677 | br_tun
2 | 671 | ovs_system
2 | 671 | br_tun
2 | 323 | em1
2 | 323 | em2
2 | 683 | br_tun
2 | 670 | br_tun
2 | 691 | br_tun
2 | 323 | p1p2
(27 rows)
foreman=#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment