| @@ 139-148 (lines=10) @@ | ||
| 136 | * PCI devices |
|
| 137 | * @return void |
|
| 138 | */ |
|
| 139 | private function _pci() |
|
| 140 | { |
|
| 141 | foreach ($this->readaixdata() as $line) { |
|
| 142 | if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*PCI.*)/", $line, $ar_buf)) { |
|
| 143 | $dev = new HWDevice(); |
|
| 144 | $dev->setName(trim($ar_buf[1])); |
|
| 145 | $this->sys->setPciDevices($dev); |
|
| 146 | } |
|
| 147 | } |
|
| 148 | } |
|
| 149 | ||
| 150 | /** |
|
| 151 | * IDE devices |
|
| @@ 154-163 (lines=10) @@ | ||
| 151 | * IDE devices |
|
| 152 | * @return void |
|
| 153 | */ |
|
| 154 | private function _ide() |
|
| 155 | { |
|
| 156 | foreach ($this->readaixdata() as $line) { |
|
| 157 | if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*IDE.*)/", $line, $ar_buf)) { |
|
| 158 | $dev = new HWDevice(); |
|
| 159 | $dev->setName(trim($ar_buf[1])); |
|
| 160 | $this->sys->setIdeDevices($dev); |
|
| 161 | } |
|
| 162 | } |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * SCSI devices |
|
| @@ 169-178 (lines=10) @@ | ||
| 166 | * SCSI devices |
|
| 167 | * @return void |
|
| 168 | */ |
|
| 169 | private function _scsi() |
|
| 170 | { |
|
| 171 | foreach ($this->readaixdata() as $line) { |
|
| 172 | if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*SCSI.*)/", $line, $ar_buf)) { |
|
| 173 | $dev = new HWDevice(); |
|
| 174 | $dev->setName(trim($ar_buf[1])); |
|
| 175 | $this->sys->setScsiDevices($dev); |
|
| 176 | } |
|
| 177 | } |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * USB devices |
|
| @@ 184-193 (lines=10) @@ | ||
| 181 | * USB devices |
|
| 182 | * @return void |
|
| 183 | */ |
|
| 184 | private function _usb() |
|
| 185 | { |
|
| 186 | foreach ($this->readaixdata() as $line) { |
|
| 187 | if (preg_match("/^[\*\+]\s\S+\s+\S+\s+(.*USB.*)/", $line, $ar_buf)) { |
|
| 188 | $dev = new HWDevice(); |
|
| 189 | $dev->setName(trim($ar_buf[1])); |
|
| 190 | $this->sys->setUsbDevices($dev); |
|
| 191 | } |
|
| 192 | } |
|
| 193 | } |
|
| 194 | ||
| 195 | /** |
|
| 196 | * Network devices |
|
| @@ 520-531 (lines=12) @@ | ||
| 517 | * |
|
| 518 | * @return void |
|
| 519 | */ |
|
| 520 | protected function usb() |
|
| 521 | { |
|
| 522 | foreach ($this->readdmesg() as $line) { |
|
| 523 | // if (preg_match('/^(ugen[0-9\.]+): <(.*)> (.*) (.*)/', $line, $ar_buf)) { |
|
| 524 | // $dev->setName($ar_buf[1].": ".$ar_buf[2]); |
|
| 525 | if (preg_match('/^(u[a-z]+[0-9]+): <([^,]*)(.*)> on (usbus[0-9]+)/', $line, $ar_buf)) { |
|
| 526 | $dev = new HWDevice(); |
|
| 527 | $dev->setName($ar_buf[2]); |
|
| 528 | $this->sys->setUSBDevices($dev); |
|
| 529 | } |
|
| 530 | } |
|
| 531 | } |
|
| 532 | ||
| 533 | /** |
|
| 534 | * filesystem information |
|