sql
Use these commands to diagnose the SQL database.
Syntax
diagnose sql config auto-cache-delay [set <seconds>| reset]
diagnose sql config debug-filter [set | test] <daemon> <string>
diagnose sql config deferred-index-timespan [set <value>]
diagnose sql config hcache-agg-step [reset | set <integer>]
diagnose sql config hcache-base-trim-interval [reset | set <integer>]
diagnose sql config hcache-max-fv-row [reset | set <integer>]
diagnose sql config hcache-max-rpt-row [reset | set <integer>]
diagnose sql config sampling-max-row [reset | set <integer>]
diagnose sql config sampling-status [reset | set <integer>]
diagnose sql config sampling-type [reset | set <integer>]
diagnose sql debug hcache-agg dbgoff
diagnose sql debug hcache-agg dbgon
diagnose sql debug hcache-agg delete
diagnose sql debug hcache-agg show [<filter>]
diagnose sql debug hcache-agg upload {ftp | sftp} <host> <dir> <user name> <password>
diagnose sql debug sqlqry dbgoff
diagnose sql debug sqlqry dbgon <level value>
diagnose sql debug sqlqry delete
diagnose sql debug sqlqry show [<filter>]
diagnose sql debug sqlqry upload {ftp | sftp} <host> <dir> <user name> <password>
diagnose sql hcache add-task agg <adom> <norm-query-hash> <agg-level> <timestamp> <num-of-days>
diagnose sql hcache add-task agg-update <adom> <hid>
diagnose sql hcache dump-task <filter>
diagnose sql hcache list <adom> <query-hash/tag> <filter> <detail>
diagnose sql hcache plan <adom> <start-time> <end-time> <query-tag/norm-qry-hash/sql> <is-fortiview> <max-time-scale>
diagnose sql hcache rebuild-both <start-time> <end-time>
diagnose sql hcache rebuild-fortiview <start-time> <end-time>
diagnose sql hcache rebuild-report <start-time> <end-time>
diagnose sql hcache rebuild-status
diagnose sql hcache show hcache <adom> <id>
diagnose sql hcache show hcache-query <adom> <norm-qry-hash>
diagnose sql hcache show hcache-res-tbl <adom> <res-tbl-id>
diagnose sql hcache show time <time> <time> <time> <time>
diagnose sql hcache status {all | all-summary | <adom>}
diagnose sql process kill <pid>
diagnose sql process list [full]
diagnose sql remove {hcache <adom> [fast] | query-cache | rebuild-db-flag | tmp-tabe}
diagnose sql show {db-size | hcache-size | log-filters | log-stfile <device-id> <vdom> | policy info <adom> }
diagnose sql status {rebuild-adom <adom> | rebuild-db | run_sql_rpt | sqlplugind | sqlreportd}
diagnose sql upload {ftp | tftp} <host> <directory> <user_name> <password>
Variable |
Description |
---|---|
config auto-cache-delay [set <seconds>| reset] |
Show, set, or reset the auto-cache delay, in seconds (default = 300). |
config debug-filter {set | test} <daemon> <string> |
Show sqlplugind and sqlreportd debug filter. Enter |
config deferred-index-timespan [set <value>] |
View or set the time span for the deferred index (default = 10000). |
config hcache-agg-step [reset | set <integer>] |
Show, set, or reset the hcache aggregation step (default = 10). |
config hcache-base-trim-interval [reset | set <integer>] |
Show, set, or reset the hcache base trim interval (default = 172800). |
config hcache-max-fv-row [reset | set <integer>] |
Show, set, or reset max row number for fortiview hcache (default = 100000). |
config hcache-max-rpt-row [reset | set <integer>] |
Show, set, or reset max row number for report hcache (default = 18000). |
config sampling-max-row [reset | set <integer>] |
Show, set, or reset max row number for sampling (default = 1000000). |
config sampling-status [reset | set <integer>] |
Show, set, or reset the sampling status. Enter 0 for disabling and 1 for enabling the sample status (default = 1). |
config sampling-type [reset | set <integer>] |
Show, set, or reset the type of sampling (default = 0). |
debug hcache-agg dbgoff |
Disable hcache-agg debug output. |
debug hcache-agg dbgon |
Enable hcache-agg debug output. |
debug hcache-agg delete |
Delete hcache-agg debug file. |
debug hcache-agg show [<filter>] |
Show the last 10 lines of the hcache-agg debug file. Set filter for the debug file. The filter is optional. |
debug hcache-agg upload {ftp | sftp} <host> <dir> <user name> <password> |
Upload hcache-agg debug file to FTP or SFTP server. Enter host IP address, directory, user name, and password. |
debug sqlqry dbgoff |
Disable SQL query debug output. |
debug sqlqry dbgon <level value> |
Enable SQL query debug output. Set SQL query debug level (1-5). The default level is 1. Note: When the debug level is |
debug sqlqry delete |
Delete the SQL query debug file. |
debug sqlqry show [<filter>] |
Show the last 10 lines of the SQL query debug file. Set filter for the debug file. The filter is optional. |
debug sqlqry upload {ftp | sftp} <host> <dir> <user name> <password> |
Upload SQL query debug file to FTP or SFTP server. Enter host IP address, directory, user name, and password. |
hcache add-task agg <adom> <norm-query-hash> <agg-level> <timestamp> <num-of-days> |
Add an hcache agg task:
|
hcache add-task agg-update <adom> <hid> |
Add an hcache agg update task:
|
hcache dump-task <filter> |
Dump hcache tasks. Enter the task filter. |
hcache list <adom> <query-hash/tag> <filter> <detail> |
List hcaches:
|
hcache plan <adom> <start-time> <end-time> <query-tag/norm-qry-hash/sql> <is-fortiview> <max-time-scale> |
Plan hcaches:
|
hcache rebuild-both <start-time> <end-time> |
Rebuild hcache for both report and FortiView. Start and end times are in the format yyyy-mm-dd hh:mm:ss. |
hcache rebuild-fortiview <start-time> <end-time> |
Rebuild hcache for FortiView only. Start and end times are in the format yyyy-mm-dd hh:mm:ss. |
hcache rebuild-report <start-time> <end-time> |
Rebuild hcache for report only. Start and end times are in the format yyyy-mm-dd hh:mm:ss. |
hcache rebuild-status |
Show report hcache rebuild/check status. |
hcache show hcache <adom> <id> |
Show hcache information. Enter the ADOM name and hcache ID. |
hcache show hcache-query <adom> <norm-qry-hash> |
Show hcache query information. Enter the ADOM name and the normalized query hash. |
hcache show hcache-res-tbl <adom> <res-tbl-id> |
Show hcache result table information. Enter the ADOM name and the result table ID. |
hcache show time <time> <time> <time> <time> |
Show hcache time. Enter up to four timestamps. |
hcache status {all | all-summary | <adom>} |
Show detailed hcache information. Enter the ADOM name, |
process kill <pid> |
Kill a running query. |
process list [full] |
List running query processes. |
remove {hcache <adom> [fast] | query-cache | rebuild-db-flag | tmp-table} |
Remove the selected information:
|
show {db-size | hcache-size | log-filters | log-stfile <device-id> <vdom> | policy-info <adom>} |
Show the database, hcache size, log filters, or log status file:
|
status {rebuild-adom <adom> | rebuild-db | run_sql_rpt | sqlplugind | sqlreportd} |
Show the status:
|
upload {ftp | tftp} <host> <directory> <user_name> <password> |
Upload sqlplugind messages / pgsvr logs with FTP or TFTP. |