Re: Storage device enumeration script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 May 2011 14:02:41 -0400
Phil Turmel <philip@xxxxxxxxxx> wrote:

> Hi Roman,
> 
> On 05/26/2011 01:54 PM, Roman Mamedov wrote:
> > On Thu, 26 May 2011 13:46:59 -0400
> > Phil Turmel <philip@xxxxxxxxxx> wrote:
> > 
> >> if you just want the latest script:
> >>
> >> https://github.com/pturmel/lsdrv/raw/HEAD/lsdrv
> > 
> > I already reported this earlier, but still in this version:
> > 
> > Traceback (most recent call last):
> >   File "./lsdrv", line 274, in <module>
> >     probe_block('/sys/block/'+x)
> >   File "./lsdrv", line 226, in probe_block
> >     dev.phy = probe_device(blkpath+'/device', nodestr)
> >   File "./lsdrv", line 193, in probe_device
> >     vendor=fileline1(devpath+'/vendor'),
> >   File "./lsdrv", line 49, in fileline1
> >     fh = open(filename, 'r')
> > IOError: [Errno 2] No such file or directory:
> > '/sys/devices/platform/floppy.0/vendor'
> 
> I used the wrong exception type.  Fix pushed.  Try again?

Now it locks up with 100% CPU load and no output, I waited for a couple of
minutes. On Ctrl-C:

^CTraceback (most recent call last):
  File "./lsdrv", line 274, in <module>
    probe_block('/sys/block/'+x)

$ ls /sys/block/
etherd!e1.5  etherd!e2.1  md0  md2  sda  sdc  sde  sdg
etherd!e1.6  fd0          md1  md4  sdb  sdd  sdf

The first two devices are actually down at this moment, maybe that's the
reason? Still I'd expect not 100% CPU load by lsdrv, but 0% CPU and 100%
iowait in this case.

Output of the old (bash) lsdrv:

Controller device @ pci0000:00/0000:00:06.0 [pata_amd]
  IDE interface: nVidia Corporation CK804 IDE (rev f2)
    host8: [Empty]
    host9: [Empty]
Controller device @ pci0000:00/0000:00:07.0 [sata_nv]
  IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
    host6: /dev/sdd ATA Hitachi HDS5C302 {SN: ..............}
    host7: /dev/sde ATA WDC WD15EADS-00S {SN: ..............}
Controller device @ pci0000:00/0000:00:08.0 [sata_nv]
  IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev f3)
    host10: /dev/sdf ATA WDC WD20EADS-00S {SN: ..............}
    host11: /dev/sdg ATA WDC WD20EADS-00S {SN: ..............}
Controller device @ pci0000:00/0000:00:0d.0/0000:02:00.0 [ahci]
  SATA controller: Marvell Technology Group Ltd. 88SE9123 PCIe SATA 6.0 Gb/s
controller (rev 10) host4: /dev/sdc ATA Hitachi HDS5C302 {SN: ..............}
    host5: [Empty]
Controller device @ pci0000:00/0000:00:0e.0/0000:01:00.0 [sata_mv]
  SCSI storage controller: Marvell Technology Group Ltd. 88SX7042 PCI-e 4-port
SATA-II (rev 02) host0: [Empty]
    host1: [Empty]
    host2: /dev/sda ATA ST31000528AS {SN: ..............}
    host3: /dev/sdb ATA Hitachi HDS72202 {SN: ..............}


-- 
With respect,
Roman

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux