Skip to main content
vsharma
Staff
Staff
Dec 22, 2025 12:09 PM UTC

Technical Tip: Configuring syslog CPU affinity

Description This article describes how to configure syslog affinity and verify that the syslog process is running only on the intended CPUs.
Scope FortiGate VMs and FortiOS 7.4.8+.
Solution

syslogd is a process responsible for handling logging operations.

 

In scenarios requiring controlled CPU utilization, syslog can be restricted to specific CPUs rather than running on a broad or unrestricted CPU range.

 

config system global
    set syslog-affinity "<affinity-mask>"
end

 

Before configuring the affinity:

 

diagnose sys process pidof syslogd
2209

 

fnsysctl cat /proc/2209/status
Name: syslogd

Umask: 0022
State: S (sleeping)
Tgid: 2209
Ngid: 0
Pid: 2209

---clipped------------

Cpus_allowed: f
Cpus_allowed_list: 0-3  <----- Allowed to run on all four CPUs.
Mems_allowed: 00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 25492
nonvoluntary_ctxt_switches: 3

 

Restricting syslogd to CPUs 0 and 1.

 

config sys global

set syslog-affinity "0x0000000000000003"

end

 

fnsysctl cat /proc/2209/status
Name: syslogd
Umask: 0022
State: S (sleeping)
Tgid: 2209
Ngid: 0
Pid: 2209
PPid: 1

-----clipped---------

Speculation_Store_Bypass: thread vulnerable
Cpus_allowed: 3
Cpus_allowed_list: 0-1 <----- syslogd restricted to CPUs 0 and 1.
Mems_allowed: 00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 25596
nonvoluntary_ctxt_switches: 3

    Thought Leadership. Security Summit. Thursday, November 12th, PGA National Resort, Palm Beach Gardens, FL.
    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