Page MenuHomePhabricator
Paste P10095

(An Untitled Masterwork)
ActivePublic

Authored by Marostegui on Thu, Jan 9, 7:49 AM.
root@cumin1001:/home/marostegui# mysql.py -hdb1135 -e "select table_name from information_schema.columns where column_name like 'device_id'" -BN
access_points
alert_device_map
alert_log
alerts
applications
bgpPeers
bgpPeers_cbgp
cef_switching
ciscoASA
component
customoids
device_graphs
device_group_device
device_mibs
device_oids
device_perf
devices
devices_attribs
devices_perms
entPhysical
entPhysical_state
entityState
eventlog
hrDevice
ipsec_tunnels
ipv4_mac
loadbalancer_rservers
loadbalancer_vservers
mefinfo
mempools
mpls_lsp_paths
mpls_lsps
mpls_saps
mpls_sdp_binds
mpls_sdps
mpls_services
mpls_tunnel_ar_hops
mpls_tunnel_c_hops
munin_plugins
netscaler_vservers
ospf_areas
ospf_instances
ospf_nbrs
ospf_ports
packages
ports
ports_fdb
ports_nac
ports_stack
ports_stp
ports_vlans
processes
processors
proxmox
pseudowires
route
sensors
services
slas
storage
stp
syslog
tnmsneinfo
toner
ucd_diskio
vlans
vminfo
vrf_lite_cisco
vrfs
wireless_sensors

Event Timeline

Marostegui created this paste.Thu, Jan 9, 7:49 AM
root@cumin1001:/home/marostegui# for i in `mysql.py -hdb1135 -e "select table_name from information_schema.columns where column_name like 'device_id'" -BN`; do echo $i; mysql.py -hdb1135 librenms -e "select count(*) from $i where device_id=20;";done
access_points
+----------+
| count(*) |
+----------+
|        0 |
+----------+
alert_device_map
+----------+
| count(*) |
+----------+
|        0 |
+----------+
alert_log
+----------+
| count(*) |
+----------+
|        0 |
+----------+
alerts
+----------+
| count(*) |
+----------+
|       18 |
+----------+
applications
+----------+
| count(*) |
+----------+
|        0 |
+----------+
bgpPeers
+----------+
| count(*) |
+----------+
|        0 |
+----------+
bgpPeers_cbgp
+----------+
| count(*) |
+----------+
|        0 |
+----------+
cef_switching
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ciscoASA
+----------+
| count(*) |
+----------+
|        0 |
+----------+
component
+----------+
| count(*) |
+----------+
|        0 |
+----------+
customoids
+----------+
| count(*) |
+----------+
|        0 |
+----------+
device_graphs
+----------+
| count(*) |
+----------+
|       11 |
+----------+
device_group_device
+----------+
| count(*) |
+----------+
|        0 |
+----------+
device_mibs
+----------+
| count(*) |
+----------+
|        0 |
+----------+
device_oids
+----------+
| count(*) |
+----------+
|        0 |
+----------+
device_perf
+----------+
| count(*) |
+----------+
|        0 |
+----------+
devices
+----------+
| count(*) |
+----------+
|        0 |
+----------+
devices_attribs
+----------+
| count(*) |
+----------+
|        0 |
+----------+
devices_perms
+----------+
| count(*) |
+----------+
|        0 |
+----------+
entPhysical
+----------+
| count(*) |
+----------+
|       66 |
+----------+
entPhysical_state
+----------+
| count(*) |
+----------+
|        0 |
+----------+
entityState
+----------+
| count(*) |
+----------+
|        0 |
+----------+
eventlog
+----------+
| count(*) |
+----------+
|        0 |
+----------+
hrDevice
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ipsec_tunnels
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ipv4_mac
+----------+
| count(*) |
+----------+
|        0 |
+----------+
loadbalancer_rservers
+----------+
| count(*) |
+----------+
|        0 |
+----------+
loadbalancer_vservers
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mefinfo
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mempools
+----------+
| count(*) |
+----------+
|       10 |
+----------+
mpls_lsp_paths
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_lsps
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_saps
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_sdp_binds
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_sdps
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_services
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_tunnel_ar_hops
+----------+
| count(*) |
+----------+
|        0 |
+----------+
mpls_tunnel_c_hops
+----------+
| count(*) |
+----------+
|        0 |
+----------+
munin_plugins
+----------+
| count(*) |
+----------+
|        0 |
+----------+
netscaler_vservers
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ospf_areas
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ospf_instances
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ospf_nbrs
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ospf_ports
+----------+
| count(*) |
+----------+
|        0 |
+----------+
packages
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ports
+----------+
| count(*) |
+----------+
|      685 |
+----------+
ports_fdb
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ports_nac
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ports_stack
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ports_stp
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ports_vlans
+----------+
| count(*) |
+----------+
|        0 |
+----------+
processes
+----------+
| count(*) |
+----------+
|        0 |
+----------+
processors
+----------+
| count(*) |
+----------+
|        0 |
+----------+
proxmox
+----------+
| count(*) |
+----------+
|        0 |
+----------+
pseudowires
+----------+
| count(*) |
+----------+
|        0 |
+----------+
route
+----------+
| count(*) |
+----------+
|        0 |
+----------+
sensors
+----------+
| count(*) |
+----------+
|        0 |
+----------+
services
+----------+
| count(*) |
+----------+
|        0 |
+----------+
slas
+----------+
| count(*) |
+----------+
|        0 |
+----------+
storage
+----------+
| count(*) |
+----------+
|        6 |
+----------+
stp
+----------+
| count(*) |
+----------+
|        0 |
+----------+
syslog
+----------+
| count(*) |
+----------+
|        0 |
+----------+
tnmsneinfo
+----------+
| count(*) |
+----------+
|        0 |
+----------+
toner
+----------+
| count(*) |
+----------+
|        0 |
+----------+
ucd_diskio
+----------+
| count(*) |
+----------+
|        0 |
+----------+
vlans
+----------+
| count(*) |
+----------+
|       26 |
+----------+
vminfo
+----------+
| count(*) |
+----------+
|        0 |
+----------+
vrf_lite_cisco
+----------+
| count(*) |
+----------+
|        0 |
+----------+
vrfs
+----------+
| count(*) |
+----------+
|        0 |
+----------+
wireless_sensors
+----------+
| count(*) |
+----------+
|        0 |
+----------+
root@cumin1001:/home/marostegui#