Access official resources from Carbon Black experts
Standalone: # sudo systemctl stop cb-enterprise Cluster: # sudo /usr/share/cb/cbcluster stop2. Confirm all cb-enterprise services are down prior to vacuuming.
Standalone: # ps ef | grep cb Cluster: # sudo /usr/share/cb/cbcluster status3. Only cb-pgsql should be running. Start only the Postgres service on the Standalone or Primary server.
# /usr/share/cb/cbservice cb-pgsql start4. Determine which tables are too large. View a list of tables ordered from largest to smallest.
psql -p 5002 cb -c "SELECT nspname || '.' || relname AS "relation", pg_size_pretty(pg_relation_size(C.oid)) AS "size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) WHERE nspname NOT IN ('pg_catalog', 'information_schema') ORDER BY pg_relation_size(C.oid) DESC;"* Typically if a table needs to be vacuumed, it will be much larger than most tables. The command to vacuum a table is below:
psql -p 5002 -d cb -c "vacuum (full, analyze, verbose) <TABLE_NAME>;" Examples (these two tables can be very large): psql -p 5002 -d cb -c "vacuum (full, analyze, verbose) sensor_registrations;" psql -p 5002 -d cb -c "vacuum (full, analyze, verbose) sensor_queued_data_stats;"5. When the commands from Step 4 are complete, stop Postgres.
# sudo /usr/share/cb/cbservice cb-pgsql stop6. Restart EDR.
Standalone: # sudo systemctl start cb-enterprise Cluster: # sudo /usr/share/cb/cbcluster start
psql -p 5002 -d cb -c "vacuum (full, analyze, verbose);"
Copyright © 2005-2023 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.