- Preface
- Introduction to Cisco Data Center Network Manager
- Cisco DCNM User Roles
- Device Pack for Cisco DCNM
- Cisco DCNM Web Client
- Media Controller
- Configuring DCNM Native High Availability
- Cisco DCNM-SAN Overview
- Configuring Cisco DCNM-SAN Server
- Configuring Authentication in Cisco DCNM-SAN
- Configuring Cisco DCNM-SAN Client
- Device Manager
- Configuring Performance Manager
- Monitoring the Network
- Monitoring Performance
- Vacuum and Autovacuum Postgres Databases
- DCNM-SAN Event Management
- Vcenter Plugin
- Interface Nonoperational Reason Codes
DCNM Vacuum and Autovacuum Postgres Databases
This chapter describes how to vacuum the postgres database in Microsoft Windows and Linux.
Background Information
It is absolutely critical to vacuum postgres databases in order for the databases to properly function. Through the life of the database, new entries are added and current entries are updated. By design, postgres does not immediately remove the iterations of a record as it gets updated. Therefore, postgres databases can contain a large number of stale, unused records. These old records should be removed at least every two weeks with the vacuum function in order to reduce disk usage and improve the speed of database queries. It is even more effective if you configure postgres to automatically vacuum the database without the need to stop the Data Center Network Manager (DCNM) services.
Note $INSTALLDIR throughout this article refers to "C:\Program Files\Cisco Systems\" or "/usr/local/cisco/" based on the operating system, Microsoft Windows or Linux respectively. The install path could be changed from these defaults during installation.
Vacuum DCNM's Postgresql Database in Windows
Step 1 Stop the DCNM services by clicking Stop DCNM Servers button, or enter the command as below:
$INSTALLDIR/dcm/dcnm/bin/stopLANSANserver.bat
Step 2 Obtain the database name, username, and password. Locate the postgresql.cfg.xml file on the DCNM server.
$INSTALLDIR/dcm/jboss-4.2.2.GA/server/dcnm/conf/database/postgresql.cfg.xml
$INSTALLDIR/dcm/Jboss-as-7.2.0.Final/standalone/conf/postgresql.cfg.xml
Step 3 Open PgAdmin III.exe, which is a helpful GUI for the postgres database. Then, right-click the object in the list and connect to the database. Enter the password from Step 2 here.
Step 4 Navigate through the drop-down menus to the dcmdb database.
Step 5 Right-click dcmdb and select Maintenance. Select the Vacuum, Full, Analyze, and Verbose options in the Maintain Database dcmdb dialog box.
Note The vacuum operation usually completes within an hour, but can take much longer for larger databases. Remember to restart the DCNM services.
Vacuum DCNM's Postgresql Database in Linux
Step 1 Stop dcnm by using the appmgr stop dcnm command.
./usr/local/cisco/dcm/db/bin/psql -U <dbUsername> dcmdb
Step 3 Run the database vacuum and quit:
dcmdb=> VACUUM FULL ANALYZE VERBOSE;
Many pages of output pass on the screen. The vacuum is finished when you see a message similar to this one:
Current limits are: 532000 page slots, 1000 relations, using 3182 kB.
The previous command exits the sql prompt.
Step 4 Start DCNM services by using the appmgr start dcnm command.