Skip to main content
vsharma
Staff
Staff
December 22, 2025

Technical Tip: Configuring syslog CPU affinity

  • December 22, 2025
  • 0 replies
  • 387 views
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