FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
cskuan
Staff
Staff
Article Id 194684
Description
This article describes how to identify the daemon/process using which CPU core.

Solution
1) Identify the Process ID(PID) of a daemon/process before it is possible to trace it.
Below is the command to get the PID of a daemon:
#diag sys top
[JRun Time:  1 days, 23 hours and 54 minutes
0U, 0N, 0S, 100I, 0WA, 0HI, 0SI, 0ST; 7996T, 5392F
       ipshelper      330      S <     0.0     1.6
       ipsengine      333      S <     0.0     1.2
       ipsengine      331      S <     0.0     1.2
       ipsengine      332      S <     0.0     1.2
         reportd      200      S       0.0     1.1
        cmdbsvr       159      S       0.0     0.4
         pyfcgid      186      S       0.0     0.4
       scanunitd      203      S <     0.0     0.3
       scanunitd      239      S <     0.0     0.3
       scanunitd      238      S <     0.0     0.3
       scanunitd      236      S <     0.0     0.3
       scanunitd      237      S <     0.0     0.3
          httpsd      185      S       0.0     0.3
         pyfcgid      233      S       0.0     0.3
         pyfcgid      234      S       0.0     0.3
         pyfcgid      235      S       0.0     0.3
          httpsd      243      S       0.0     0.3
          httpsd      284      S       0.0     0.3
          cw_acd      218      S       0.0     0.3
       forticron      192      S       0.0     0.2
-> Process ID (PID)
2) After tracing the PID of a daemon, issue the following commands:
# diag sys process dump 7091 | grep Cpus_allowed
Cpus_allowed:   f   < ------- Hex Value
Cpus_allowed_list:      0-3  < ------- list of CPU core


Convert the HEX value to binary to find out the core using the following table:
Decimal            Binary        CPU used
1                 0001            cpu-0
2                 0010            cpu-1
3                 0011            cpu-0 and cpu-1
4                 0100            cpu-2
.......
15                 1111            cpu-0, cpu-1, cpu-2 and cpu-3
16                   10110            cpu-1, cpu-2, and cpu-4
.......

HEX to Binary converter: https://www.rapidtables.com/convert/number/hex-to-binary.html


Contributors