onconfig_diff 实用程序

使用 onconfig_diff 实用程序比较两个 onconfig 文件。

语法

元素 用途
-d 对照当前的 onconfig 文件的设置来进行不同设置
-c 同另一个 onconfig 文件做比较
-f filepath_1 指定要比较的第一个文件名称。除非该文件在 $GBASEDBTDIR/bin目录下,否则需提供该文件的路径
-s filepath_2 指定要比较的第二个文件名称。除非该文件在 $GBASEDBTDIR/bin目录下,否则需提供该文件的路径

用法

可以执行 onconfig_diff 实用程序比较两个不同的 onconfig 文件。该 onconfig_diff 实用程序在 $GBASEDBTDIR/bin 里。

要比较的这两个文件必须在同一目录下。

以下为使用该实用程序的以下方法:
  • 比较当前的 onconfig 和同版本的 onconfig.std
  • 比较当前的 onconfig 和新版本的 onconfig.std
  • 比较两个在不同服务器上的 onconfig 文件。

示例

在该示例中,onconfig.std 文件与 onconfig.production 文件作比较:
$ onconfig_diff -c -f onconfig.std -s onconfig.production
以下是该命令的输出:
==========================================
          File 1: onconfig.std
          File 2: onconfig.production
          ==========================================
          Parameters Found in File 1, not in File 2
          ==========================================
          
          FULL_DISK_INIT  0
          
          NETTYPE         ipcshm,1,50,CPU
          
          NUMFDSERVERS    4
          ...
          ============================================== 
          Parameters Found in File 2, not in File 1 
          ============================================== 
          
          JVPJAVAHOME    $GBASEDBTDIR/extend/krakatoa/jre
          
          ...
          ============================================== 
          Parameters Found in both files, but different 
          ==============================================  
          ROOTPATH  
          
          File 1: $GBASEDBTDIR/tmp/demo_on.rootdbs 
          File 2: /usr2/support/grantf/g1150fc8/rootdbs  
          
          LOGFILES  
          
          File 1: 6 
          File 2: 10  
          
          LOGSIZE  
          
          File 1: 10000 
          File 2: 3000 
          ...