Deployment and Management Guide for Cisco IoT FND on OVA with Postgres and InfluxDB, Release 5.x.x and Later

PDF

Check the Postgres DB status

Updated: February 4, 2026

Overview

Use this procedure to check the status of your system and Postgres database before upgrading Cisco IoT FND on OVA. Verifying these statuses ensures that all necessary services are running before you proceed with the upgrade process.

Performing this task helps you verify the system and database status before upgrading Cisco IoT FND on OVA.

Before you begin

  • Take a snapshot of the existing VM before you upgrade.

  • Perform a backup of cgms.properties file and cgms_keystore file in the location, /opt/fnd/data/. You can either SCP these files to another server for backup or you can copy in the same or different folder. Here's an example:
    root@iot-fnd:~[root@iot-fnd ~]# 
                  root@iot-fnd:~[root@iot-fnd ~]# cd /opt/fnd/data
                  root@iot-fnd:/opt/fnd/data[root@iot-fnd data]# 
                  root@iot-fnd:/opt/fnd/data[root@iot-fnd data]#ls 
                  cgms_keystore  cgms.properties  cisco-sudi-ca.pem  userPropertyTypes.xml
                  root@iot-fnd:/opt/fnd/data[root@iot-fnd data]# 
                  root@iot-fnd:/opt/fnd/data[root@iot-fnd data]# cp cgms.properties cgms.properties_backup_09May2025
                  [root@iot-fnd data]# keytool -importkeystore -srckeystore cgms_keystore -destkeystore cgms_keystore_backup_9May2022 -deststoretype PKCS12
                  Importing keystore cgms_keystore to cgms_keystore_backup_9May2022...
                  Enter destination keystore password:
                  Re-enter new password:
                  Enter source keystore password:
                  Entry for alias cgms successfully imported.
                  Entry for alias cisco_sudi successfully imported.
                  Entry for alias jmarconi successfully imported.
                  Import command completed:  3 entries successfully imported, 0 entries failed or cancelled
                  [root@iot-fnd data]#
                  [root@iot-fnd data]# ls
                  cgms_keystore                  cgms_keystore.selfsigned  cgms.properties_backup_09May2022  fnd_psk.keystore
                  cgms_keystore_backup_9May2025  cgms.properties           cisco-sudi-ca.pem                 userPropertyTypes.xml
                  [root@iot-fnd data]#
  • Ensure that the Postgres services are running before perfomring an upgrade.

Procedure

1.

Using the SSH terminal and navigate to the root directory.

2.

Run the following command:

Example:

/opt/scripts/status.sh
[root@iot-fnd ~]# /opt/scripts/status.sh
            --------------------
            ● postgresql-12.service - PostgreSQL 12 database server
            Loaded: loaded (/usr/lib/systemd/system/postgresql-12.service; enabled; vendor preset: disabled)
            Active: active (running) since Mon 2022-05-09 02:01:29 PDT; 2h 6min ago
            Docs: https://www.postgresql.org/docs/12/static/
            Main PID: 27638 (postmaster)
            Tasks: 26
            Memory: 250.5M
            CGroup: /system.slice/postgresql-12.service
            --------------------
            ● influxdb.service - InfluxDB is an open-source, distributed, time series database
            Loaded: loaded (/usr/lib/systemd/system/influxdb.service; enabled; vendor preset: disabled)
            Active: active (running) since Mon 2022-05-09 02:02:39 PDT; 2h 5min ago
            Docs: https://docs.influxdata.com/influxdb/
            Main PID: 27892 (influxd)
            Tasks: 21
            Memory: 219.0M
            --------------------
            ● kapacitor.service - Time series data processing engine.
            Loaded: loaded (/usr/lib/systemd/system/kapacitor.service; enabled; vendor preset: disabled)
            Active: active (running) since Mon 2022-05-09 02:02:06 PDT; 2h 5min ago
            Docs: https://github.com/influxdb/kapacitor
            Main PID: 27805 (kapacitord)
            Tasks: 14
            Memory: 21.0M
            --------------------
            fnd-container is running, pid=61255
            CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
            a02e6388607d        fnd-container       6.44%               2.612GiB / 23.38GiB   11.17%              17MB / 13.7MB       20.3MB / 2.64MB     580
            --------------------
            fogd-container is running, pid=63469
            CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT    MEM %               NET I/O             BLOCK I/O           PIDS
            a40aa29e2392        fogd-container      6.38%               2.18GiB / 23.38GiB   9.32%               434kB / 135kB       8.19kB / 145kB      99
            --------------------
            [root@iot-fnd ~]#
            docker version
            [root@iot-fnd ~]# docker version
            Client: Docker Engine - Community
            Version:           19.03.15
            API version:       1.40
            Go version:        go1.13.15
            Git commit:        99e3ed8919
            Built:             Sat Jan 30 03:17:57 2021
            OS/Arch:           linux/amd64
            Experimental:      false
            Server: Docker Engine - Community
            Engine:
            Version:          19.03.15
            API version:      1.40 (minimum version 1.12)
            Go version:       go1.13.15
            Git commit:       99e3ed8919
            Built:            Sat Jan 30 03:16:33 2021
            OS/Arch:          linux/amd64
            Experimental:     false
            containerd:
            Version:          1.4.4
            GitCommit:        05f951a3781f4f2c1911b05e61c160e9c30eaa8e
            runc:
            Version:          1.0.0-rc93
            GitCommit:        12644e614e25b05da6fd08a38ffa0cfe1903fdec
            docker-init:
            Version:          0.18.0
            GitCommit:        fec3683
            You have new mail in /var/spool/mail/root
            [root@iot-fnd ~]#
            /opt/fnd/scripts/fnd-container.sh status
            [root@iot-fnd ~]# /opt/fnd/scripts/fnd-container.sh status
            fnd-container is running, pid=61255
            CONTAINER ID        NAME                CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
            a02e6388607d        fnd-container       6.47%               2.613GiB / 23.38GiB   11.18%              17MB / 13.8MB       20.3MB / 2.64MB     592
            [root@iot-fnd ~]#
            You have new mail in /var/spool/mail/root
            [root@iot-fnd ~]#
            docker exec -it fnd-container /etc/init.d/cgms status
            [root@iot-fnd ~]# docker exec -it fnd-container /etc/init.d/cgms status
            IoT-FND Version 4.7.2-8
            05-09-2022 04:09:46 PDT: INFO: IoT-FND database server: 192.68.5.1
            05-09-2022 04:09:47 PDT: INFO: IoT-FND database connection verified.
            05-09-2022 04:09:47 PDT: INFO: IoT FND timeseries database server: 192.68.5.1
            05-09-2022 04:09:47 PDT: INFO: IoT FND kapacitor server: 192.68.5.1
            05-09-2022 04:09:47 PDT: INFO: IoT-FND timeseries database/kapacitor connection verified.
            05-09-2022 04:09:49 PDT: INFO: IoT-FND application server is up and running.
            05-09-2022 04:09:50 PDT: INFO: IoT-FND is up and running.
            [root@iot-fnd ~]#
            rpm -qa | grep -i postgres
            root@iot-fnd:/opt/fnd/data[root@iot-fnd data]# rpm -qa | grep -i postgres
            postgresql96-devel-9.6.15-1PGDG.rhel7.x86_64
            postgresql96-libs-9.6.15-1PGDG.rhel7.x86_64
            postgresql96-server-9.6.15-1PGDG.rhel7.x86_64
            postgresql96-9.6.15-1PGDG.rhel7.x86_64
            cgms-postgres-4.5.1-11.x86_64
            postgresql96-contrib-9.6.15-1PGDG.rhel7.x86_64
            root@iot-fnd:/opt/fnd/data[root@iot-fnd data]# 

You can view all the statuses of your Cisco IoT FND on OVA before proceeding with an upgrade.