Tree device - Aix

This is a discussion on Tree device - Aix ; Hi, how can I find the tree device for a given device for example: cd0-> ide0 -> pci3 I can find the child for a device with lsdev -p xxx but if I know cd0 how can I find ide0 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Tree device

  1. Tree device

    Hi,

    how can I find the tree device for a given device
    for example:
    cd0-> ide0 -> pci3
    I can find the child for a device with lsdev -p xxx
    but if I know cd0 how can I find ide0 then pci3

    Thanks in advance (AIX 5.3)




  2. Re: Tree device

    On 9 Jul., 21:10, "astalavista" wrote:
    > Hi,
    >
    > how can I find the tree device for a given device
    > for example:
    > cd0-> ide0 -> pci3
    > I can find the child for a device with lsdev -p xxx
    > but if I know cd0 how can I find ide0 then pci3
    > [...]


    Do you want to identify the parent devices? In this case use lsdev
    till you end up with the slot id.
    (0)blah:/home/me> lsdev -l cd0 -F parent
    ide0
    (0)blah:/home/me> lsdev -l ide0 -F parent
    pci4



  3. Re: Tree device

    On Jul 10, 9:11 am, Andreas Schulze wrote:
    > On 9 Jul., 21:10, "astalavista" wrote:
    >
    > > Hi,

    >
    > > how can I find the tree device for a given device
    > > for example:
    > > cd0-> ide0 -> pci3
    > > I can find the child for a device with lsdev -p xxx
    > > but if I know cd0 how can I find ide0 then pci3
    > > [...]

    >
    > Do you want to identify the parent devices? In this case use lsdev
    > till you end up with the slot id.
    > (0)blah:/home/me> lsdev -l cd0 -F parent
    > ide0
    > (0)blah:/home/me> lsdev -l ide0 -F parent
    > pci4


    scnr todo the task

    $ cat ./lsdevpath
    #!/usr/bin/ksh
    f_lsdev ()
    {
    echo $1
    lsdev -l $1 -F parent 2>/dev/null | read y
    f_lsdev $y
    }
    set -e
    f_lsdev $1 | xargs echo


    $ ./lsdevpath hdiskpower10
    hdiskpower10 fscsi0 fcs0 pci13 pci3 sysplanar0 sys0


    Not multipath save.
    cheers
    Hajo

  4. Re: Tree device

    OK thanks all

    "Hajo Ehlers" a écrit dans le message de news:
    b7a6f83d-4503-4ad3-87cb-da748a05b5cd...oglegroups.com...
    > On Jul 10, 9:11 am, Andreas Schulze wrote:
    >> On 9 Jul., 21:10, "astalavista" wrote:
    >>
    >> > Hi,

    >>
    >> > how can I find the tree device for a given device
    >> > for example:
    >> > cd0-> ide0 -> pci3
    >> > I can find the child for a device with lsdev -p xxx
    >> > but if I know cd0 how can I find ide0 then pci3
    >> > [...]

    >>
    >> Do you want to identify the parent devices? In this case use lsdev
    >> till you end up with the slot id.
    >> (0)blah:/home/me> lsdev -l cd0 -F parent
    >> ide0
    >> (0)blah:/home/me> lsdev -l ide0 -F parent
    >> pci4

    >
    > scnr todo the task
    >
    > $ cat ./lsdevpath
    > #!/usr/bin/ksh
    > f_lsdev ()
    > {
    > echo $1
    > lsdev -l $1 -F parent 2>/dev/null | read y
    > f_lsdev $y
    > }
    > set -e
    > f_lsdev $1 | xargs echo
    >
    >
    > $ ./lsdevpath hdiskpower10
    > hdiskpower10 fscsi0 fcs0 pci13 pci3 sysplanar0 sys0
    >
    >
    > Not multipath save.
    > cheers
    > Hajo




  5. Re: Tree device

    astalavista wrote:
    > OK thanks all
    >
    > "Hajo Ehlers" a écrit dans le message de news:
    > b7a6f83d-4503-4ad3-87cb-da748a05b5cd...oglegroups.com...
    >> On Jul 10, 9:11 am, Andreas Schulze wrote:
    >>> On 9 Jul., 21:10, "astalavista" wrote:
    >>>
    >>>> Hi,
    >>>> how can I find the tree device for a given device
    >>>> for example:
    >>>> cd0-> ide0 -> pci3
    >>>> I can find the child for a device with lsdev -p xxx
    >>>> but if I know cd0 how can I find ide0 then pci3
    >>>> [...]
    >>> Do you want to identify the parent devices? In this case use lsdev
    >>> till you end up with the slot id.
    >>> (0)blah:/home/me> lsdev -l cd0 -F parent
    >>> ide0
    >>> (0)blah:/home/me> lsdev -l ide0 -F parent
    >>> pci4

    >> scnr todo the task
    >>
    >> $ cat ./lsdevpath
    >> #!/usr/bin/ksh
    >> f_lsdev ()
    >> {
    >> echo $1
    >> lsdev -l $1 -F parent 2>/dev/null | read y
    >> f_lsdev $y
    >> }
    >> set -e
    >> f_lsdev $1 | xargs echo
    >>
    >>
    >> $ ./lsdevpath hdiskpower10
    >> hdiskpower10 fscsi0 fcs0 pci13 pci3 sysplanar0 sys0
    >>
    >>
    >> Not multipath save.
    >> cheers
    >> Hajo

    >
    >


    I may not be thinking of the right thing (and I don't have a system
    handy) but lsdev -Cs scsi shows everything scsi connected, would lsdev
    -Cs ide do the same for the ide...probably doesn't show a "tree" but
    based on the output, it shouldn't be too hard to associate the location
    codes with the ide "base".

    Like I said, I don't have a system (with ide devices) handy but...

    Pete
    p.s. lsdev -Cs pci shows all the PCI devices...PS

+ Reply to Thread