Changes between Version 12 and Version 13 of Internal/InventoryV3
- Timestamp:
- Oct 18, 2009, 7:47:41 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/InventoryV3
v12 v13 1 1 James is working on a second generation inventory script. 2 2 3 Currently on: Writer3 Currently on: Testing - Have working prototype 4 4 5 5 … … 26 26 1. examine our IP to determine our current location 27 27 1. We gather information about the mother board: 28 1. '''Gatherer:''' 28 29 1. Disk Size (dmesg) 29 30 1. Memory Size (dmesg) 30 1. Gather information about attached devices: 31 1. 2 wired Ethernet addresses (ifconfig, /sys) 32 1. 2 wireless Ethernet addresses (ifconfig, /sys) 33 1. any usb devices (lsusb, /sys) 34 1. get the mother board id from the location table 35 1. update mother board information if diffrent, and stamp with current inventory number 36 1. update devices if diffrent and stamp with inventory number 31 1. Cpu number (dmesg) 32 1. Gather information about attached devices: 33 1. 2 wired Ethernet addresses (ifconfig, /sys) 34 1. 2 wireless Ethernet addresses (ifconfig, /sys) 35 1. any usb devices (lsusb, /sys) 36 1. '''Writer:''' 37 1. get the mother board id from the location table 38 1. update mother board information if diffrent, and stamp with current inventory number 39 1. add kinds if they don't exist already 40 1. update devices if diffrent and stamp with inventory number 37 41 1. profit. 38 42 … … 49 53 I may have discovered the cause of the device / vendor discrepancy. Joe seems to be looking at /sys/class/net/devincename/device... perhaps this points to a different device id. I'll have to check it out. 50 54 51 That being said I have a working protoype:55 That being said I have a working Gahterer protoype: 52 56 {{{ 53 57 ssugrim@external2:~/scripts$ ruby gatherer.rb … … 114 118 }}} 115 119 116 120 I've also gone to the original two script model. Gatherer is "feature complete". 117 121 ---- 118 122 … … 134 138 Quick edit to gatherer to convert the device and vendor tags to decimal instead of hex. The reason they didn't match before was 135 139 because in the sql database, they are stored as decimal (I guess cuz you can't store hex in mysql). 140 141 === 10/18/09 === 142 143 Writer is "feature complete". The mail (non-data) class is Check_sql. Besides new, it's main methods are check and update. They respectively compare the xmldata against sql and update the database if the data doesn't match. I'd like to be more "indpendent" of the form of the xmldata, but that would involve a lot more dummy varibles and searching of hashes. 144 145 Big TODO is mostly rescuing errors. First on the list is connect retries. Class interface descriptions to follow soon.