Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1283935
  • 博文数量: 554
  • 博客积分: 10425
  • 博客等级: 上将
  • 技术积分: 7555
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-09 09:49
文章分类

全部博文(554)

文章存档

2012年(1)

2011年(1)

2009年(8)

2008年(544)

分类:

2008-04-08 16:42:38

Solaris 10 Binary Application Guarantee

本文档介绍如何结合使用 Solaris Application Scanner 工具和 Solaris 10 Binary Application Guarantee 程序。

要使用 Solaris 10 Binary Application Guarantee 程序,可能需要对多个应用程序二进制文件运行 Solaris Application Scanner,并且可能需要将生成的报告文件发送回 Sun。

请按照以下步骤执行此操作:
  1. 从以下页面下载 SolCAT-v1.0.0 工具集:
    该页面将指导您如何从 Sun 下载中心下载该工具以及如何安装它。请按照安装说明安装 Solaris Application Scanner 工具 "abiscan"(无需安装 Solaris Appcert)。自安装脚本文件为:

    pkgs/abiscan_install-1.0.sh

    要进行安装,请键入以下命令:"sh pkgs/abiscan_install-1.0.sh"

    您可能还需要阅读位于安装目录的 "doc" 子目录中的 Solaris Application Scanner 文档。

  2. 接下来,确定需要检查哪些应用程序二进制文件。有多种方法可用来将此列表传送给 Solaris Application Scanner 工具:

    a) 在命令行中列出各个完整的文件名。

    b) 列出一个或多个目录,让该工具以递归方式进行查找,并检查所找到的所有二进制程序文件。

    c) 使用 "-f listfile" 选项,其中 "listfile" 是您创建的包含要检查的二进制文件列表(每个文件一行)的文件。
  3. Solaris Application Scanner 实用程序的名称是 "abiscan"。要生成适合 Solaris 10 Binary Application Guarantee 程序使用的报告,需要对 abiscan 应用 "-s" 选项并将输出收集在一个文件中,以便在需要时提交给 Sun。

    可以在 Solaris 7、8、9 或 10 中运行 abiscan 实用程序。不要求在 Solaris 10 中运行该工具。

    以下是上面第 2 步中所列三种方式的相应示例:

    abiscan -s /opt/APP/bin/binary1 /opt/APP/bin/binary2 > myreport
    abiscan -s /opt/APP/bin > myreport
    abiscan -s -f /tmp/myfilelist > myreport

    这些示例假设您已将 PATH 环境变量设置为 abiscan 实用程序所在的目录,例如 /var/tmp/abiscan/bin(实际目录取决于您选择安装该工具的方式)。

    此外,您还可以指定 abiscan 的全路径,例如:

    /var/tmp/abiscan/bin/abiscan -s /opt/APP/bin/binary1 > myreport

    在所有情况下,都将 abiscan 的输出收集在文件 "myreport" 中。

  4. 要查看应用程序是否通过了检查,请检查输出文件(上面示例中的 "myreport")。该文件提供所有已检查二进制文件的列表。没有问题的二进制文件标记有 "OK" 标记。如果所有二进制文件都标有 "OK" 标记,则表明应用程序通过了该测试。(请注意,您可能会看到一些 "SKIP" 行,这些行指示 abiscan 所指向的文件不是 ELF 二进制文件)。

    如果检测出任何二进制文件具有潜在问题,可以使用 "-v" 代替 "-s" 选项来重新运行 abiscan 以生成详细输出,这样就可以找到有关该问题的更多信息。重定向到一个新文件,如:

    abiscan -v /opt/APP/bin > myissues

    该输出包含已检测出问题的可读性比较强的描述。

  5. 要使用 Solaris 10 Binary Application Guarantee 程序,请按照所提供的说明进行操作,并将生成的报告文件(上面示例中的 "myreport")准备好,以在需要时上载该文件。

示例:

以下是在 Solaris 10 Binary Application Guarantee 程序中使用 Solaris Application Scanner abiscan 工具的一些示例。

对于类似于 csh 的 shell 可以使用如下所示的命令设置 PATH 变量以查找 abiscan 实用程序:

setenv PATH /var/tmp/abiscan/bin:$PATH

对于类似于 sh 的 shell,可以使用以下命令:

PATH=/var/tmp/abiscan/bin:$PATH

以下步骤假设已进行了该操作。下面的 "%" 符号表示 shell 命令行提示符。

第一个示例说明如何查看 abiscan 实用程序未检测出问题的应用程序:

% abiscan -s /home/user/netscape-7.0 > myreport

检查 "myreport" 文件表明所有应用程序二进制文件(大约 270 个)都接收到了 "OK" 标记。在该示例中,abiscan 实用程序未检测出问题。该报告文件中是所有已检查二进制文件的列表。

第二个示例说明一个被检测出其多个二进制文件具有潜在故障模式的应用程序:

% abiscan -s /home/user/faxtool-1.0 > myreport

在这种情况下,并非所有二进制文件都接收到了 "OK" 标记。使用 "-v" 选项重新运行 abiscan 将生成如下所示的输出:

/home/user/faxtool-1.0/bin/faxtool:
Refers to the following removed interfaces which can cause it to fail:
TIFFGetFileSize from /usr/openwin/lib/libtiff.so.3 removed in SunOS 5.10
TIFFModeCCITTFax3 from /usr/openwin/lib/libtiff.so.3 removed in SunOS 5.10

The above interface(s) have been removed from Solaris.
Note: if the application provides its own non-system library interface replacement(s) it will not fail.
Note: if the application never actually calls the above interface(s) it will not fail. Careful testing of the application is required.


...

该输出表明 "faxtool" 二进制文件使用了上面 libtiff.so.3 库中未记录的两个接口 "TIFFGetFileSize" 和 "TIFFModeCCITTFax3"。这些接口已从 Solaris 10 (SunOS 5.10) 的 libtiff.so.3 中删除。

该输出还提供了一些说明,指出在什么情况下应用程序二进制文件可以继续在 Solaris 10 中工作。在该示例中,这些情况是 1) 使用了非系统兼容性库,或 2) 应用程序二进制文件不会调用已删除的接口。由于在 abiscan 检查期间应用程序并未实际运行,因此 abiscan 工具无法确定是否存在这些情况。
 
 
 
以上文章转自于 : http://developers.sun.com.cn/
阅读(432) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~