|
Replies:
1
-
Last Post:
Mar 31, 2008 11:20 AM
by: bsergean
|
|
|
Posts:
11
From:
Palo Alto
Registered:
5/5/06
|
|
|
|
Handy script to list a binary deps on SVR4 packages and patches
Posted:
Mar 27, 2008 10:56 PM
To: Communities » install » discuss
|
|
|
|
I spent lots of time on a bug that was happening on Solaris 10 update 3 but not on update 4. To help (I also had a huge help from the Sun support team) I made a script that take as input a list of shared libraries my binary depends on, generated by the handy pldd, and the output of showrev -p.
One might find it handy to look for patches that might cure your binaries. There might be rought edge and a better UI as I just wrote it today but hey ... here it is (attached).
Benjamin.
|
|
|
Posts:
11
From:
Palo Alto
Registered:
5/5/06
|
|
|
|
Re: Handy script to list a binary deps on SVR4 packages and patches
Posted:
Mar 31, 2008 11:20 AM
in response to: bsergean
To: Communities » install » discuss
|
|
|
|
I changed the Interface, I think this is more usable now.
== Infos ==
Print (1) packages used by a binary, and (2) the list of installed patches related to these packages. If you have a binary that works with Solaris 10 update N, but doesn't with Solaris 10 update N-2, run this script on both platform and it will help you to find the patches you're looking for. (1) is retrieved: * By using pldd(pid) on the process you want to trace to get a list of loaded shared library
* By retrieving in the main /var/sadm/install/contents database the list of package related to these shared libraries
(2) is retrieved by parsing the output of the showrev -p command, given as input of this script
Requires Python 2.3 (Set module usage)
== Usage ==
Use the -h / --help switch for options.
# give it a pid $ pldd2pkg.py -p `pgrep dtexec`
# give it a file (offline) $ pldd 732 > /tmp/foobar $ pldd2pkg.py -l /tmp/foobar
== A sample output ==
$ pldd2pkg.py -p `pgrep dtexec` 777: /usr/dt/bin/dtexec -open 0 -ttprocid 2.17w-Vp 01 750 1289637086 1 1 50 /usr/openwin/lib/libtt.so.2 -> SUNWtltk /usr/dt/lib/libSDtFwa.so.1 -> SUNWdtbas /usr/lib/libc.so.1 -> SUNWcsl /usr/lib/libnsl.so.1 -> SUNWcsl /usr/lib/libsocket.so.1 -> SUNWcsl /usr/lib/libdl.so.1 -> SUNWcsl /usr/lib/libmp.so.2 -> SUNWcsl /usr/platform/sun4u-us3/lib/libc_psr.so.1 -> SUNWkvm /usr/openwin/lib/libX11.so.4 -> SUNWxwplt /usr/openwin/lib/libXext.so.0 -> SUNWxwplt
package used: SUNWtltk -> ToolTalk runtime SUNWdtbas -> CDE application basic runtime environment SUNWcsl -> Core Solaris, (Shared Libs) SUNWkvm -> Core Architecture, (Kvm) SUNWxwplt -> X Window System platform software
Get a list of patches installed on the system with `showrev -p` patch related to package used: 112663-01 -> SUNWxwplt 113679-05 -> SUNWkvm, SUNWcarx, SUNWcsr 110458-02 -> SUNWcslx, SUNWcsl, SUNWsra, SUNWarc, SUNWcstl, SUNWcstlx 110853-02 -> SUNWkvmx, SUNWkvm, SUNWcarx, SUNWhea, SUNWpstl, SUNWpstlx, SUNWmdb 111382-01 -> SUNWxwplt 111791-02 -> SUNWkvmx, SUNWkvm, SUNWcarx, SUNWhea, SUNWpstl, SUNWpstlx, SUNWmdb 111297-01 -> SUNWcslx, SUNWcsl, SUNWhea, SUNWcstl, SUNWcstlx 111310-01 -> SUNWcsr, SUNWcsl, SUNWcstl 110286-11 -> SUNWtltk, SUNWtltkx 110815-01 -> SUNWcsl, SUNWarc 109384-07 -> SUNWcslx, SUNWcsl, SUNWcstl, SUNWcstlx 110811-01 -> SUNWcslx, SUNWcsl, SUNWarc, SUNWcstl, SUNWcstlx 109147-37 -> SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWcsxu, SUNWhea, SUNWtoo, SUNWbtool, SUNWarc, SUNWbtoox, SUNWtoox, SUNWmdb, SUNWmdbx, SUNWosdem 111306-05 -> SUNWkvm, SUNWcar 108995-06 -> SUNWcsr, SUNWcslx, SUNWcsl, SUNWmdb, SUNWmdbx 108919-20 -> SUNWdtbas, SUNWdtdte 112135-01 -> SUNWcsl, SUNWarc 110833-01 -> SUNWkvmx, SUNWkvm, SUNWhea, SUNWpstl, SUNWpstlx, SUNWmdb 110380-04 -> SUNWcsr, SUNWcslx, SUNWcsl, SUNWarc, SUNWcstl, SUNWcstlx 108714-08 -> SUNWdtbas, SUNWdtbax 109142-07 -> SUNWdtbas, SUNWdtbax 108528-29 -> SUNWkvmx, SUNWkvm, SUNWcarx, SUNWcar, SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWscpu, SUNWcsxu, SUNWpmu, SUNWpmr, SUNWhea, SUNWapchr, SUNWapchu, SUNWapchd, SUNWsrh, SUNWarc, SUNWarcx, SUNWtnfc, SUNWtnfcx, SUNWcstl, SUNWcstlx, SUNWcpc, SUNWcpcx, SUNWcpr, SUNWcprx, SUNWpiclu, SUNWfruid, SUNWpiclx, SUNWfruix, SUNWfruip, SUNWusx, SUNWmdb, SUNWmdbx, SUNWncar, SUNWncarx, SUNWncau, SUNWncaux, SUNWpiclh, SUNWpmux 112161-02 -> SUNWkvm 108652-74 -> SUNWxwfnt, SUNWxwice, SUNWxwplt, SUNWxwman, SUNWxwfa, SUNWxwicx, SUNWxwplx, SUNWxwacx, SUNWxwpmn, SUNWxwdxm, SUNWxwinc, SUNWxwslb 113128-02 -> SUNWxwplt 109326-13 -> SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWhea, SUNWarc, SUNWarcx, SUNWcstl, SUNWcstlx 110376-01 -> SUNWkvmx, SUNWkvm, SUNWhea, SUNWpstl, SUNWpstlx, SUNWmdb 111327-05 -> SUNWcsr, SUNWcslx, SUNWcsl, SUNWarc, SUNWarcx, SUNWcstl, SUNWcstlx 108999-01 -> SUNWcsr, SUNWcslx, SUNWcsl 110912-04 -> SUNWcsu, SUNWcslx, SUNWcsl 112237-08 -> SUNWcslx, SUNWcsl 112167-01 -> SUNWkvm 110386-03 -> SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWhea, SUNWcstl, SUNWcstlx 111302-03 -> SUNWcsr, SUNWcslx, SUNWcsl, SUNWdhcsu, SUNWarc, SUNWarcx, SUNWcstl, SUNWcstlx 108949-07 -> SUNWdtbas, SUNWdtbax 113372-02 -> SUNWxwplt, SUNWxwman 109223-03 -> SUNWcsu, SUNWcslx, SUNWcsl, SUNWgss, SUNWgssx, SUNWcstl, SUNWcstlx 108820-02 -> SUNWcslx, SUNWcsl 108652-92 -> SUNWxwfnt, SUNWxwice, SUNWxwplt, SUNWxwman, SUNWxwfa, SUNWxwicx, SUNWxwplx, SUNWxwacx, SUNWxwpmn, SUNWxwdxm, SUNWxwinc, SUNWxwslb 115583-01 -> SUNWcslx, SUNWcsl 109007-13 -> SUNWcarx, SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWesu, SUNWhea, SUNWarc, SUNWarcx, SUNWcstl, SUNWcstlx 108993-31 -> SUNWcarx, SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWcsxu, SUNWhea, SUNWapppr, SUNWapppu, SUNWarc, SUNWarcx, SUNWatfsr, SUNWatfsu, SUNWcstl, SUNWcstlx, SUNWdpl, SUNWdplx, SUNWnisu, SUNWlldap, SUNWmdb, SUNWmdbx, SUNWpppd, SUNWpppdr, SUNWpppdu, SUNWpppdx 115829-01 -> SUNWcslx, SUNWcsl, SUNWhea, SUNWarc, SUNWarcx 109805-17 -> SUNWcsu, SUNWcslx, SUNWcsl 109147-26 -> SUNWcsu, SUNWcsr, SUNWcslx, SUNWcsl, SUNWcsxu, SUNWhea, SUNWtoo, SUNWbtool, SUNWarc, SUNWbtoox, SUNWtoox, SUNWosdem 109873-24 -> SUNWkvm, SUNWpiclu, SUNWfruip 111562-02 -> SUNWcslx, SUNWcsl 114956-02 -> SUNWdtbas 113684-04 -> SUNWkvm 110370-03 -> SUNWkvmx, SUNWkvm, SUNWhea, SUNWpstl, SUNWpstlx, SUNWmdb 112160-01 -> SUNWkvmx, SUNWkvm, SUNWhea, SUNWpstl, SUNWpstlx, SUNWmdb 111308-04 -> SUNWcslx, SUNWcsl, SUNWarc, SUNWarcx, SUNWcstl, SUNWcstlx 111075-02 -> SUNWxwplt 115831-01 -> SUNWcslx, SUNWcsl, SUNWhea, SUNWarc, SUNWarcx, SUNWcstl, SUNWcstlx 109889-07 -> SUNWkvmx, SUNWkvm, SUNWhea, SUNWpiclu, SUNWfruip, SUNWpstl, SUNWpstlx, SUNWmdb
patch related to package used: SUNWtltk -> ToolTalk runtime 110286-11 SUNWdtbas -> CDE application basic runtime environment 108714-08 108919-20 108949-07 109142-07 114956-02 SUNWcsl -> Core Solaris, (Shared Libs) 108528-29 108820-02 108993-31 108995-06 108999-01 109007-13 109147-26 109147-37 109223-03 109326-13 109384-07 109805-17 110380-04 110386-03 110458-02 110811-01 110815-01 110912-04 111297-01 111302-03 111308-04 111310-01 111327-05 111562-02 112135-01 112237-08 115583-01 115829-01 115831-01 SUNWkvm -> Core Architecture, (Kvm) 108528-29 109873-24 109889-07 110370-03 110376-01 110833-01 110853-02 111306-05 111791-02 112160-01 112161-02 112167-01 113679-05 113684-04 SUNWxwplt -> X Window System platform software 108652-74 108652-92 111075-02 111382-01 112663-01 113128-02 113372-02
|
|
|
|
|