The nzsw command

Use the nzsw command to manage the software.

Overview

The nzsw command is capable of:
  • Reporting overdue activities like genstats, reindexing, grooming. It shows details of databases and tables which are pending for these operations
  • Showing top statistics which can give a glimpse of system usage and important parameters, such as heavily loaded databases
  • Showing changes made to the default configuration (/nz/data/postgressql.conf)
  • Reporting catalog inconsistencies along with objects which are inconsistent
  • Estimating time for running genstat on the system based on historical data

Prerequisites

Query History must be enabled on the system.

Syntax

nzsw [-h|--help] <subcmd> [<subcmd options>] [-db <db_name>]

Usage

nzsw
When invoked with no arguments, the command lists all software items installed on the Netezza Performance Server and their versions.
$ nzsw
       PARAMETER        |          VALUE
------------------------+------------------------
 NPS Version            | 11.0.0.0
 NPS Uptime             | 7 hrs, 19 mins, 53 secs
 Catalog Version        | 3.1792
 INZA version           | 3.2.0.41744
 SQLEXT Toolkit Version | 7.2.1.5
 FDT Version            | 4.3.1.6
 HPF Version            | 5.6.0.1
 Model                  | "Q100_M"
 Number of User DBs     | 8
 Number of Data Slices  | 240
 Replication Node Role  | Master
 Replication Node State | Active
 Query history DB       | QHIST
 Query history version  | 3
 Zone Maps              | table oriented
 GoD                    | WLM based GoD enabled
 
You have new mail in /var/spool/mail/nz
nzsw -pgconf changes
Lists all configuration parameters with the value is other than default.
$ nzsw -pgconf_changes
           PARAMETER            | Changed Value
--------------------------------+--------------
 display_pg_deleted_records     | false
 enable_dateTime_meridian_delim | true
 fsync                          | off
 log_connections                | on
 max_connections                | 100
 
You have new mail in /var/spool/mail/nz
nzsw -issues
Lists all the software issues identified on the system.
 $ nzsw -issues
 
   PROBLEM_DESCRIPTION    |                                DETAILS
--------------------------+---------------------------------------------------------
 SUGGESTED REINDEX        | one or more databases needs reindexing.
 SUGGESTED GROOM VERSIONS | one or more databases contains version table that need to be groomed.
 GENSTATS SUGGESTED       | stats are not up to date on one or more tables.
 ORPHAN TABLES            | tables that are consuming disk space but is not part of catalog.
 CATALOG INCONSISTENCY    | one or more catalog objects are inconsistent.
 
 Execute nzsw -issues -details  for more details
You have new mail in /var/spool/mail/nz
nzsw -issues -details
Provides more detailed information about the issues along with the identified objects on the system.
$ nzsw -issues -details
 
   PROBLEM_DESCRIPTION    | DATABASES |  TABLES  |                          DETAILS
--------------------------+----------+---------+------------------------------------
 Suggested reindex        | SYSTEM    | ---      | Identified DBs need reindexing
                          | DB4       | ---      |
                          | DB3       | ---      |
                          | DB2       | ---      |
                          | DB1       | ---      |
                          | TREX_TEST | ---      |
                          | QHIST     | ---      |
                          | TEST      | ---      |
 Suggested Groom Versions | DB2       | T1_DB2   | Groom required on version tables
                          |           | T_DB2    |
 Catalog Inconsistency    | DB3       | T1       | objects in _t_object missing from _t_class
                          |           | T2       | relation with missing column attributes from _t_attribute
 Genstats suggested       | DB4       | EMP      | BASIC stats outdated
                          | DB1       | EMP1     | EXPRESS stats outdated
                          |           | T1       | BASIC stats outdated
                          | DB2       | CUSTOMER | EXPRESS stats outdated
                          | DB3       | EPILSON  | EXPRESS stats outdated
                          |           | T2       | BASIC stats outdated
                          | SYSTEM    | LOGPKT1  | EXPRESS stats outdated
 Orphan Tables            | ---       | ---      | 1 orphan tables found consuming 3,145,728 bytes disk space
 
You have new mail in /var/spool/mail/nz
nzsw -issues -details -genstats
Gives detailed information about the objects examined along with the estimated time (in seconds) it will take for genstats. you can fetch information with respect to reindex, groom, catalog and orphan issues.
$ nzsw -issues -details -genstats
 
 PROBLEM_DESCRIPTION | DATABASES |  TABLES  |        DETAILS         | ESTIMATION_IN_SECS
---------------------+----------+---------+-----------------------+-------------------
 Genstats suggested  | DB4       | EMP      | BASIC stats outdated   | No Entry                                                                             Found
                     | DB1       | EMP1     | EXPRESS stats outdated | less than 5                                                                           mins
                     |           | T1       | BASIC stats outdated   | No Entry                                                                             Found
                     | DB2       | CUSTOMER | EXPRESS stats outdated | 600.79
                     | DB3       | EPILSON  | EXPRESS stats outdated | 400.82
                     |           | T2       | BASIC stats outdated   | No Entry                                                                             Found
                     | SYSTEM    | LOGPKT1  | EXPRESS stats outdated | No Entry                                                                             Found 
nzsw -issues -details -db <db_name>
Examines a single database if required against all the issues.
$ nzsw -issues -details -db db2
 
   PROBLEM_DESCRIPTION    | DATABASES |  TABLES  |                          DETAILS
--------------------------+----------+---------+-----------------------------------------------------------
 Suggested reindex        | DB2       | ---      | Identified DBs need reindexing
 Suggested Groom Versions | DB2       | T1_DB2   | Groom required on version tables
                          |           | T_DB2    |
 Genstats suggested       | DB2       | CUSTOMER | EXPRESS stats outdated
 Orphan Tables            | ---       | ---      | 1 orphan tables found consuming                                                       3,145,728 bytes disk space
You have new mail in /var/spool/mail/nz