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.
Ted
Staff
Staff
Article Id 231006

 

Description

This article describes how to terminate a closed CLI session while running a ping with a large number of repeat-count.

 

When a terminal session is unexpectedly closed while running ping with a large number of repeat-count, it still sends ICMP requests to the configured server and there does not seem to be any way to stop sending the packets.

 

# execute ping-options view-settings
Ping Options:
Repeat Count: 10000000

Scope FortiGate.
Solution

Run the command '# fnsysctl ps -ef', to find PIDs of '/bin/newcli' processes related to the ping with a large number of repeat-count.


For the processes, it is possible to remove it by executing '# kill -9 <PID>' or '# killall newcli'.

 

Examples:

 

# fnsysctl ps -ef
1145 0 0 S /bin/newcli
1211 0 0 S /bin/newcli
1217 0 0 S /bin/newcli
1229 0 0 S /bin/newcli
1232 0 0 S /bin/newcli
1237 0 0 S /bin/newcli

 

# kill -9 1145
# kill -9 1211
# kill -9 1217
# kill -9 1229
# kill -9 1232
# kill -9 1237

 

It is also possible to use only one command to kill all the process instances of a specific process.

 

# fnsysctl killall <process name> 

 

For example to kill all 'newcli' kills, proceed at once:

 

# fnsysctl killall newcli