Created on 08-12-2022 03:08 AM Edited on 08-12-2022 03:45 AM
Description | This article describes how to identify which is the CPU handling a process at a given time. |
Scope | FortiOS versions 6.2, 6.4, 7.0 and 7.2 GA releases. |
Solution |
Let's assume a user wants to identify which is physical CPU which is handling the OSPF process.
1) It is necessary to identify the process ID [PID] of OSPFd. In order to do use the command global command in case it is operated in VDOM environment:
# diagnose sys process pidof ospfd 182
From the above result, PID of ospfd is 182.
2) Then, the command fnsysctl cat /proc/<pid>/stat needs to be issued, it will replace the <pid> with the number generated on Step 1):
fnsysctl cat /proc/182/stat
182 (ospfd) S 178 178 178 0 -1 4202752 2204 0 0 0 3 0 0 0 5 -15 1 0 5928 213377024 1976 18446744073709551615 4194304 44303833 140736593983088 140736593982408 140663142887446 0 0 3676160 25216747 0 0 0 17 3 0 0 0 0 0
The sixth number to the end is the CPU which OSPFd is bound to, from the above example, the CPU is 3.
In case a user cannot remember the name of the process by heart, use this alternative global command:
fnsysctl ps PID UID GID STATE CMD 228 0 0 S /bin/acd 182 0 0 S /bin/ospfd
The particular command generates a matrix of the running processes and the PIDs which associate with it. |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.