Description
This article describes how to force restart internal processes and daemons without restarting the whole unit.
Scope
FortiGate, FortiMail
Solution
execute reload [<daemon_name>]
On FortiGate, the most common daemons could be restarted by using '# diagnose' command:
diagnose test application <daemon_name> 99When the above procedures do not show the process has restarted, then it could be necessary to kill the process.
diagnose sys kill <sig_term> <pid>
The process ID (pid) could be taken from the second column of the command '# diagnose sys top'.For example:diagnose sys top
In this example, the 'ipsengine' process has the pid '63'.Although the <sig_term> is mostly the same as those used on Unix/Unix-like platforms, is recommended to use only SIGSEGV (11), SIGINT (2), SIGTERM(15) or SIGKILL(9) in that order.SIGSEGV (11): is used to terminate the process and dump a crash exit into the crashlog (diag debug crashlog read). This is helpful for troubleshooting that process.SIGINT (2): is used as for example the user hits 'Ctrl-C' on keyboard to end a process.SIGTERM (15): is a 'polite' termination signal, asking the process to close connections, files, handlers, buffer, etc. For device stability is the recommended way to end a process.SIGKILL (9): This is a mandatory termination of the process. This signal could not be ignored by system (except by specific conditions where system is waiting the process to free physical I/O resources). This kind of signal could leave sessions and files opened.In the above example, to kill process 'ipsengine', it is possible to perform the following:
# diagnose sys kill 11 63
Note:Alternatively, to kill or restart all related processes at once can be done using the following "killall" command:
fnsysctl killall <process name>
fnsysctl killall httpsd <<--- it will restart all httpsd processes at once
Related Articles
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.