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.
|