Skip to main content
ndumaj
Staff
Staff
October 1, 2026

Technical Tip: How to identify disabled hosts directly from the database

Description

This article describes how to identify hosts that are currently marked as Disabled in the FortiNAC database by querying the HOSTRECORD table.

Scope

FortiNAC, FortiNAC-F.

Solution

The status field in the HOSTRECORD table is a bitmask value. A host is considered Disabled when the bit 2 is set in the status field.

From the FortiNAC CLI, enter the database shell and run the following query:

execute db-shell
SELECT * FROM HOSTRECORD WHERE status & 2 = 2;


Example output:

execute db-shell
MariaDB [bsc]> SELECT * FROM HOSTRECORD WHERE status & 2= 2;
+----+-----------+-------+--------+
| id | hostName  | owner | status |
+----+-----------+-------+--------+
| 1  | PC01      | NULL  |    130 |
| 2  | PC02      | NULL  |      2 |
+----+-----------+-------+--------+


Note:

  • status = 2 indicates the host is disabled.

  • status = 130 also contains the disabled bit (130 & 2 = 2), therefore the host is considered disabled as well.


Any record returned by this query has the Disabled status flag set and is considered a disabled host by FortiNAC.

Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
Thought Leadership. Security Summit. Thursday, October 8th. Disney's Grand Californian Hotel & SPA, Anaheim, CA.
Security Operations Summit: Modernize SecOps. Operate AI-Native.AMER: November 4 | 9:00 AM PST. India and SAARC: November 5 | 10:00 AM IST. EMEA: November 5 | 10:30 AM CET. APAC: November 5 | 11:00 AM SGT