Skip to main content
fgilloteau_FTNT
Staff
Staff
Oct 1, 2018 7:36 AM UTC

Troubleshooting Tip: General WAD troubleshooting commands and how to check the WAD process open port listeners and identify the WAD proxy ports configured for each VDOM

  • Sep 16, 2026 10:46 AM UTC
  • 0 replies
  • 52122 views
  • Translate All

Description

 

This article describes a list of useful commands to dump WAD proxy information. If the issue occurs randomly, suggest using a script to continuously collect WAD debug information and provide it to the TAC engineer when raising a ticket. Refer to this article on how to run the script: Technical Tip: TAC debug script with TeraTerm.

 

Scope

 

FortiGate & FortiProxy.

Solution

 

  1. This will display the list of currently authenticated users, the IPs, and the time since the authentication started.

 

diagnose wad user list
ID: 2, IP: 10.0.11.142, VDOM: root
  user name   : fred@DOMAIN_TEST.LOCAL
  duration    : 124
  auth_type   : 0
  auth_method : 3
  pol_id      : 12
  g_id        : 11
  user_based  : 0
  expire      : 8
  LAN:
    bytes_in=107500 bytes_out=1169255
  WAN:
    bytes_in=799170 bytes_out=40959

 

  1. This will list the session in the WAD proxy. This is different from the diagnose sys session list, which lists the sessions in the kernel.

 

diagnose wad session  list

 

Session: explicit proxy 10.0.11.142:53279(10.5.20.184:11435)->172.217.18.195:443

    id=340051785 vd=0 fw-policy=12

    state=3 app=http sub_type=0 dd_mode=0 dd_method=0

    SSL enabled

    to-client

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=2 w_blocks=0 read_blocked=0

            bytes_in=7169 bytes_out=117563 shutdown=0x0

    to-server

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=0 w_blocks=0 read_blocked=0

            bytes_in=100023 bytes_out=4169 shutdown=0x0

 

Session: explicit proxy 10.0.11.142:53281(10.5.20.184:11438)->172.217.18.195:443

    id=340051787 vd=0 fw-policy=12

    state=3 app=http sub_type=0 dd_mode=0 dd_method=0

    SSL enabled

    to-client

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=2 w_blocks=0 read_blocked=0

            bytes_in=4311 bytes_out=21699 shutdown=0x0

    to-server

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=0 w_blocks=0 read_blocked=0

            bytes_in=4478 bytes_out=1154 shutdown=0x0

 

Session: explicit proxy 10.0.11.142:53282(10.5.20.184:8918)->216.58.212.174:443

    id=340051788 vd=0 fw-policy=12

    state=3 app=http sub_type=0 dd_mode=0 dd_method=0

    SSL enabled

    to-client

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=2 w_blocks=0 read_blocked=0

            bytes_in=4301 bytes_out=18252 shutdown=0x0

    to-server

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=0 w_blocks=0 read_blocked=0

            bytes_in=1011 bytes_out=1108 shutdown=0x0

 

Session: explicit proxy 10.0.11.142:53285(10.5.20.184:22939)->158.58.176.140:443

    id=340051791 vd=0 fw-policy=12

    state=3 app=http sub_type=0 dd_mode=0 dd_method=0

    SSL enabled

    to-client

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=2 w_blocks=0 read_blocked=0

            bytes_in=3472 bytes_out=20998 shutdown=0x0

    to-server

        SSL Port:

            state=3

        TCP Port:

            state=2 r_blocks=0 w_blocks=0 read_blocked=0

            bytes_in=4070 bytes_out=279 shutdown=0x0

 

Sessions total=4

 

From FortiOS v7.0.x, it is possible to see the WAD session duration:

 

Session: explicit proxy 10.171.4.126:51685(10.109.19.105:8524)->142.250.74.205:443

id=1764692952 worker=0 vd=0:0 fw-policy=1

duration=50 expire=3562 session-ttl=3600
state=3 app=http sub_type=0 wan_opt_mode=0 dd_method=0
SSL enabled
to-client
TCP Port:
state=2 r_blocks=1 w_blocks=0 read_blocked=0
bytes_in=1592 bytes_out=101441 shutdown=0x0
to-server
TCP Port:
state=2 r_blocks=0 w_blocks=0 read_blocked=0
bytes_in=101369 bytes_out=1377 shutdown=0x0

 

To dump WAD commands, the FortiGate first needs to have debug enabled; otherwise, the FortiGate will not see any output.

diagnose debug enable

 

  1. This command will list all the WAD processes.

 

diagnose test application wad 1000

Process [0]: WAD manager type=manager(0) pid=392 diagnosis=no.

Process [1]: type=dispatcher(1) index=0 pid=394 state=running

              diagnosis=no debug=enable valgrind=unsupported/disabled

Process [2]: type=wanopt(2) index=0 pid=395 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [3]: type=worker(3) index=0 pid=396 state=running

              diagnosis=yes debug=enable valgrind=supported/disabled

Process [4]: type=worker(3) index=1 pid=397 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [5]: type=worker(3) index=2 pid=398 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [6]: type=worker(3) index=3 pid=399 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [7]: type=worker(3) index=4 pid=400 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [8]: type=worker(3) index=5 pid=401 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [9]: type=worker(3) index=6 pid=402 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [10]: type=worker(3) index=7 pid=403 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [11]: type=worker(3) index=8 pid=404 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [12]: type=worker(3) index=9 pid=405 state=running

              diagnosis=no debug=enable valgrind=supported/disabled

Process [13]: type=informer(4) index=0 pid=393 state=running

              diagnosis=no debug=enable valgrind=unsupported/disabled

 

The result will be different depending on the hardware platform.

 

The command below may be used to restart all workers or a specific worker:

 

diagnose wad worker restart <index> <----- Restarts specific worker.
diagnose wad worker restart <----- Restart all workers.

 
diagnose wad worker restart <index> <----- Restarts specific worker. diagnose wad worker restart <----- Restarts all workers.

  1. This command gives the 'Total shared user count'.

 

diagnose test application wad 110

Total shared user count:1, shared user quota:16000, form_auth_keepalive=0 active=0, user_in_list=0

    vd=root max=0 guarantee=0 used=1

 

The FortiGate can also detect that the MAX is 16,000.

The number is the count of users: authenticated users + anonymous users.

The limit is hard-coded and cannot be changed. This limit is not covered by the 'Maximum Value table'.

An authenticated user 'fred' with IP 10.0.0.1, who sends traffic to two proxy policies, one with auth and one without auth, will count as 2 in the 'shared user count'.

  

  1. This will list the session handled by the WAD worker 2300.

 

diagnose test application wad 2300

diagnose test application wad 21

 

TCP stats: active=6337 accepts=0 connects=783873 accept_err=0

           connect_err=1577 bind_fails=0 make_failure=0 connected=780015

TCP port=0x7f219a18aaf0 ses_ctx=0x7f219ab39960 sock=61/61 is_conn=0 state=2

        process=0 snfbuf=327680 rcvbuf=327680

        closed(grace/out/in/sock)=0(0/0/0/0)

        10.194.86.51:62356-->10.68.76.243:8080

TCP port=0x7f219a18b9d0 ses_ctx=0x7f219ab3ade8 sock=81/81 is_conn=0 state=2

        process=0 snfbuf=327680 rcvbuf=327680

        closed(grace/out/in/sock)=0(0/0/0/0)

        10.70.218.92:59237-->10.68.76.243:8080

..

 

  1. This provides statistics on SSL errors.

 

diagnose test application wad 2300

diagnose test application wad 23

 

SSL stats:

  ports

    type-0 total 0 active 0 max 0

    type-1 total 0 active 0 max 0

    type-2 total 0 active 0 max 0

    type-3 total 0 active 0 max 0

    type-4 total 0 active 0 max 0

    type-5 total 0 active 0 max 0

    type-6 total 0 active 0 max 0

    type-7 total 0 active 0 max 0

    type-8 total 0 active 0 max 0

    type-9 total 0 active 0 max 0

  to-client:

            handshakes: started 0 completed 0 abbreviated 0 renegotiated 0 renegotiations blocked 0 insecure-renegotiations blocked 0

            session states: active 0 total 0 max 0

            cipher-suite failures 0

            session ticket: offered 0 issued 0 regenerated 0 verified 0 accepted 0 malformed 0 cipher_mismatch 0 compressor_mismatch 0 version_mismatch 0 malformed_extension 0 ems_mismatch 0

  to-server:

            handshakes: started 0 completed 0 abbreviated 0

            session states: active 0 total 0 max 0

            cipher-suite failures 0

            session ticket: offered 0 issued 0 regenerated 0 verified 0 accepted 0 malformed 0 cipher_mismatch 0 compressor_mismatch 0 version_mismatch 0 malformed_extension 0 ems_mismatch 0

  ssl proxy:

            handshakes: started 0 completed 0 abbreviated 0 renegotiated 0 renegotiations blocked 0 insecure-renegotiations blocked 0

            cipher-suite failures 0

            session states: active 0 total 0 max 0

            session ticket: offered 0 issued 0 regenerated 0 verified 0 accepted 0 malformed 0 cipher_mismatch 0 compressor_mismatch 0 version_mismatch 0 malformed_extension 0 ems_mismatch 0

  1-way forged handshake 0

  internal error 0

  bad handshake length 0

  bad change cipher spec length 0

  decrption failure 0

  hash mismatch in finished rec 0

  invalid dh size 0

  pubkey too big 0

  cert auth error 0

 

  1. This provides statistics about DNS resolutions initiated by the WAD proxy.

 

diagnose test application wad 2300

diagnose test application wad 104

 

get test wad 104

DNS Stats: n_dns_reqs=1152 n_dns_fails=13 n_dns_timeout=0 n_dns_success=1139

           n_snd_retries=0 n_snd_fails=0 n_snd_success=1152 n_dns_overflow=0

           n_build_fails=0, n_allocated_id=0, n_dns_id_full=0

 

  1. This provides information about WAD object memory usage.

 

diagnose test application wad 2300

diagnose test application wad 803

 

Example output:

 

porsche-kvm60 # cmem_dump_stats(000, 00) ...

cmem object stats:

id allocs frees reallocs avg_sz in_str active bytes max cmem object name

0 213822 176443 0 106 0 37379 3986462 4023949 wad_m_cmem_root

1 0 0 0 0 0 0 0 0 wad_m_test

2 2778 2739 0 2056 0 39 80208 99416 wad_m_default_cmem_object

3 3532 3528 0 896 0 4 3584 7168 wad_m_ses_ctx

 

To further investigate specific CMEM objects, use the command 'diagnose test application wad 801XXX', where 'XXX' represents the ID of the CMEM object name. For example, the command for investigating wad_m_cmem_root would be diagnose test application wad 801000.

 

The following commands are debug commands to troubleshoot WAD flow output live.

 

This will display the current filter for capture:

 

diagnose wad filter list

 

This will clear the filter:

 

diagnose wad filter clear

 

This will configure a filter on the src IP for debugging:

 

diagnose wad filter src x.x.x.x

 

Or, for explicit proxy, this command will narrow down the results to the WAD worker where the traffic is being handled.

diagnose wad filter process-id-by-src <Ip_address_of_client>

 

This will capture all types of debug messages:

 

diagnose wad debug enable category all

 

This will print the highest level of debug.

 

diagnose wad debug enable level verbose

 

This will clear and terminate the debug properly.

 

diagnose wad debug clear

 

It is also useful to run this command to see if WAD is crashing with a specific code that will help TAC engineers investigate the issue further:

 

diagnose debug crashlog read

 

Related article:

Troubleshooting Tip: Reasons why WAD debugs might not show any output in the FortiGate CLI

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024