Fortinet white logo
Fortinet white logo

CLI reference

diagnose system top

diagnose system top

Use this command to display real-time system information, including CPU and memory usage, and running processes. By default, it refreshes every 5 seconds and shows the last 20 lines if no parameters are specified.

Syntax

diagnose system top <seconds> <lines> <iterations>

Variable

Description

Default

seconds

The interval between each refresh of the process list in seconds, range [1, 60] (default 5). For example, to refresh the process list every 5 seconds, type 5.

5

lines

The lines of the process list to display, range [1, 100] (default 20).

20

iterations

Specifies how many times to refresh and display the system information (1 to 1000). If not specified, the display runs continuously in real-time (default: unlimited).

unlimited

The first two lines of the display indicate the up time, and the processor and memory usage. Processor and memory usages on the second line have abbreviated labels shown below in bold.

Run Time: 0 days, 21 hours and 3 minutes

0U, 4S, 95I; 1035792T, 646920F

Letter

Description

U

User CPU usage (%)

S

System CPU usage (%)

I

Idle CPU usage (%)

T

Total memory (KB)

F

Free memory (KB)

The remaining lines contain the process list, which has the following columns:

Column 1 is the process name, such as SSHD.

Column 2 is the process ID (PID) number, such as 731.

Column 3 is the status:

  • S: Sleeping (idle)
  • R: Running
  • Z: Zombie (crashed)

    You might be able to restart a zombie process without rebooting. See Execute commands.

  • <: High priority
  • N: Low priority

Column 4 is CPU usage (%).

Column 5 is memory usage (%).

When the command is running, you can sort the process list. The default sort order is by CPU usage.

  • Shift + P: Sort by CPU usage.
  • Shift + M: Sort by memory usage.

Process list output displays in your CLI window until you stop it by pressing q or Ctrl + C.

Example

This example refreshes the display of the top 19 most system-intensive processes every five seconds. The output indicates that FortiNDR is mostly idle except for some processor resources used by a connection to the web UI (admin.fe) and to the CLI.

diagnose system top 5

Run Time: 0 days, 21 hours and 3 minutes

0U, 4S, 95I; 1035792T, 646920F

admin.fe 987 S 6.0 0.0

admin.fe 979 S 1.4 0.0

cli 984 R 0.2 0.0

miglogd 755 S 0.2 0.0

dbmanager 731 S 0.0 0.0

mailfilter 767 S 0.0 0.0

httpd 972 S 0.0 0.0

smtpd 793 S 0.0 0.0

smtpd 796 S 0.0 0.0

dbdaemon 766 S 0.0 0.0

smtpd 829 S 0.0 0.0

smtpd 830 S 0.0 0.0

smtpd 831 S 0.0 0.0

smtpd 828 S 0.0 0.0

smtpproxy 780 S 0.0 0.0

spamreport 790 S 0.0 0.0

fmlmonitor 799 S 0.0 0.0

cmdbsvr 745 S 0.0 0.0

netd 756 S 0.0 0.0

diagnose system top

diagnose system top

Use this command to display real-time system information, including CPU and memory usage, and running processes. By default, it refreshes every 5 seconds and shows the last 20 lines if no parameters are specified.

Syntax

diagnose system top <seconds> <lines> <iterations>

Variable

Description

Default

seconds

The interval between each refresh of the process list in seconds, range [1, 60] (default 5). For example, to refresh the process list every 5 seconds, type 5.

5

lines

The lines of the process list to display, range [1, 100] (default 20).

20

iterations

Specifies how many times to refresh and display the system information (1 to 1000). If not specified, the display runs continuously in real-time (default: unlimited).

unlimited

The first two lines of the display indicate the up time, and the processor and memory usage. Processor and memory usages on the second line have abbreviated labels shown below in bold.

Run Time: 0 days, 21 hours and 3 minutes

0U, 4S, 95I; 1035792T, 646920F

Letter

Description

U

User CPU usage (%)

S

System CPU usage (%)

I

Idle CPU usage (%)

T

Total memory (KB)

F

Free memory (KB)

The remaining lines contain the process list, which has the following columns:

Column 1 is the process name, such as SSHD.

Column 2 is the process ID (PID) number, such as 731.

Column 3 is the status:

  • S: Sleeping (idle)
  • R: Running
  • Z: Zombie (crashed)

    You might be able to restart a zombie process without rebooting. See Execute commands.

  • <: High priority
  • N: Low priority

Column 4 is CPU usage (%).

Column 5 is memory usage (%).

When the command is running, you can sort the process list. The default sort order is by CPU usage.

  • Shift + P: Sort by CPU usage.
  • Shift + M: Sort by memory usage.

Process list output displays in your CLI window until you stop it by pressing q or Ctrl + C.

Example

This example refreshes the display of the top 19 most system-intensive processes every five seconds. The output indicates that FortiNDR is mostly idle except for some processor resources used by a connection to the web UI (admin.fe) and to the CLI.

diagnose system top 5

Run Time: 0 days, 21 hours and 3 minutes

0U, 4S, 95I; 1035792T, 646920F

admin.fe 987 S 6.0 0.0

admin.fe 979 S 1.4 0.0

cli 984 R 0.2 0.0

miglogd 755 S 0.2 0.0

dbmanager 731 S 0.0 0.0

mailfilter 767 S 0.0 0.0

httpd 972 S 0.0 0.0

smtpd 793 S 0.0 0.0

smtpd 796 S 0.0 0.0

dbdaemon 766 S 0.0 0.0

smtpd 829 S 0.0 0.0

smtpd 830 S 0.0 0.0

smtpd 831 S 0.0 0.0

smtpd 828 S 0.0 0.0

smtpproxy 780 S 0.0 0.0

spamreport 790 S 0.0 0.0

fmlmonitor 799 S 0.0 0.0

cmdbsvr 745 S 0.0 0.0

netd 756 S 0.0 0.0