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)
Printable View
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)
On 9 Jul., 21:10, "astalavista" <nob...@nowhere.com> wrote:[color=blue]
> 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
> [...][/color]
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
On Jul 10, 9:11 am, Andreas Schulze <b79...@gmx.de> wrote:[color=blue]
> On 9 Jul., 21:10, "astalavista" <nob...@nowhere.com> wrote:
>[color=green]
> > Hi,[/color]
>[color=green]
> > 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
> > [...][/color]
>
> 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[/color]
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
OK thanks all
"Hajo Ehlers" <service@metamodul.com> a écrit dans le message de news:
[email]b7a6f83d-4503-4ad3-87cb-da748a05b5cd@i76g2000hsf.googlegroups.com[/email]...[color=blue]
> On Jul 10, 9:11 am, Andreas Schulze <b79...@gmx.de> wrote:[color=green]
>> On 9 Jul., 21:10, "astalavista" <nob...@nowhere.com> wrote:
>>[color=darkred]
>> > Hi,[/color]
>>[color=darkred]
>> > 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
>> > [...][/color]
>>
>> 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[/color]
>
> 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[/color]
astalavista wrote:[color=blue]
> OK thanks all
>
> "Hajo Ehlers" <service@metamodul.com> a écrit dans le message de news:
> [email]b7a6f83d-4503-4ad3-87cb-da748a05b5cd@i76g2000hsf.googlegroups.com[/email]...[color=green]
>> On Jul 10, 9:11 am, Andreas Schulze <b79...@gmx.de> wrote:[color=darkred]
>>> On 9 Jul., 21:10, "astalavista" <nob...@nowhere.com> 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[/color]
>> 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[/color]
>
>[/color]
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