WARMBOOT

Optionally boot warm

WARMBOOT

Show and control the SDK’s warm-boot state. It can tell you whether the SDK came up warm or cold, show the warm-boot store (scache) and its history, and sync state to the store. It can also mark the units as warm-booting or shut the SDK down before a warm boot.

Under SONiC, the SAI and syncd own the warm-boot state; warm-reboot drives it. Only the display forms of this command are safe on a running switch.

All keywords must be typed in full. With no argument, or an unknown word, the command prints its help. The built-in help does not list scache, which the shell accepts.

Safety on a running switch

Sub-command

Effect

show, storage, usage, history, scache

Read-only.

sync

Writes the SDK’s state to scache now. Forwarding is not affected, but the stored image is replaced outside SONiC’s control.

storage alloc

Changes a module’s scache allocation.

on, off

Change the SDK’s warm-boot flag. See the warning under WARMBOOT on.

shutdown

Shuts the SDK down underneath syncd. See the warning under WARMBOOT shutdown.

Hardware-validated — Did the SDK come up warm or cold?

drivshell> warmboot show
Unit 0: Cold Boot
WARMBOOT show

Print Unit <n>: Warm Boot or Unit <n>: Cold Boot for every attached unit. Read-only.

Hardware-validated

drivshell> warmboot show
Unit 0: Cold Boot
WARMBOOT storage

Print the scache space each SDK module needs, under the heading Warmboot storage requirements:. Each line is 0x<id> <module>(<id>): <bytes>, and the list ends with Total storage required: <n> bytes. Without a configured store it prints External storage not configured!. Read-only. On a SONiC Trident 3 switch the store is configured and the total is about 87 MB, most of it (about 78 MB) for the field module.

Hardware-validated

drivshell> warmboot storage

Warmboot storage requirements:
----------------------------------------
enum module                bytes
----------------------------------------
0x00 port                (0): 11384
0x01 l2                  (0): 16408
0x02 vlan                (0): 10776
0x03 trunk               (0): 61828
0x04 cosq                (0): 49536
0x06 linkscan            (0): 13064
0x07 stat                (0): 4612
0x07 stat                (1): 4178140
0x08 virtual             (0): 292868
0x09 common              (0): 260
0x0A mirror              (0): 2072
0x0A mirror              (1): 12
0x0B l3                  (0): 130164
0x0C stack               (0): 42324
0x0D ipmc                (0): 133136
0x0E stg                 (0): 72
0x12 rx                  (0): 208
0x13 field               (0): 77607948
0x13 field               (1): 20484
0x14 time                (0): 244
0x16 mpls                (0): 505824
0x18 mim                 (0): 458756
0x1B failover            (0): 8
0x1E qos                 (0): 984
0x1F multicast           (0): 16388
...
WARMBOOT storage alloc <module_id> <scache_part_no> <alloc_size>

Grow one module’s scache allocation. All three values must be integers. Otherwise it prints Invalid module Id., Invalid scache part no. or Invalid scache alloc size.. The module IDs are those listed by warmboot storage. This changes warm-boot state.

Unvalidated — Replace <module_id> with an ID from “warmboot storage”

drivshell> warmboot storage alloc <module_id> 0 1024
WARMBOOT usage

Print the scache space each module currently uses, under the heading Warmboot storage usage:. Each line is <module>(<id>) module: <bytes> bytes handle: <handle>, and the list ends with Total storage usage: <n> bytes. Read-only. After a cold boot, before anything has been synced, every module shows 0 bytes and the total is 0.

Hardware-validated

drivshell> warmboot usage

Warmboot storage usage:
-------------------------------
      port(0) module: 0 bytes handle: 0
        l2(0) module: 0 bytes handle: 0x10000
      vlan(0) module: 0 bytes handle: 0x20000
     trunk(0) module: 0 bytes handle: 0x30000
      cosq(0) module: 0 bytes handle: 0x40000
  linkscan(0) module: 0 bytes handle: 0x60000
      stat(0) module: 0 bytes handle: 0x70000
      stat(1) module: 0 bytes handle: 0x70001
   virtual(0) module: 0 bytes handle: 0x80000
    common(0) module: 0 bytes handle: 0x90000
    mirror(0) module: 0 bytes handle: 0xa0000
    mirror(1) module: 0 bytes handle: 0xa0001
        l3(0) module: 0 bytes handle: 0xb0000
     stack(0) module: 0 bytes handle: 0xc0000
      ipmc(0) module: 0 bytes handle: 0xd0000
       stg(0) module: 0 bytes handle: 0xe0000
        rx(0) module: 0 bytes handle: 0x120000
     field(0) module: 0 bytes handle: 0x130000
     field(1) module: 0 bytes handle: 0x130001
      time(0) module: 0 bytes handle: 0x140000
      mpls(0) module: 0 bytes handle: 0x160000
       mim(0) module: 0 bytes handle: 0x180000
  failover(0) module: 0 bytes handle: 0x1b0000
       qos(0) module: 0 bytes handle: 0x1e0000
 multicast(0) module: 0 bytes handle: 0x1f0000
  extender(0) module: 0 bytes handle: 0x280000
      fcoe(0) module: 0 bytes handle: 0x290000
       udf(0) module: 0 bytes handle: 0x2a0000
     range(0) module: 0 bytes handle: 0x2c0000
     proxy(0) module: 0 bytes handle: 0x2f0000
      flow(0) module: 0 bytes handle: 0x300000
 collector(0) module: 0 bytes handle: 0x360000
      hash(0) module: 0 bytes handle: 0x3d0000
------------------------------------
Total storage usage: 0 bytes
WARMBOOT history [max | <n>]

Show the warm-boot history. It starts with Last SDK cold boot:, which gives the version, whether the scache CRC was checked, and the up time. Then come the latest <n> warm-boot records (3 by default, all with max). Each record lists the modules whose warm-boot version changed. An invalid argument prints Invalid options for warmboot. or Invalid input for record number. Without history it prints Warmboot history is not available!. Read-only. A switch that has only cold-booted shows just the Last SDK cold boot: block ([ OK ] <sdk version> (<build date>), Scache CRC: NO, Up Time: <date>) and no records.

Hardware-validated

drivshell> warmboot history max

Last SDK cold boot:
-----------------------------------------------------
    [ OK ] sdk-6.5.35-SP1 (Wed Sep 30 11:49:47 2026)
    Scache CRC: NO
    Up Time: Mon Oct 26 11:49:49 2026
WARMBOOT scache [<handle>]

Dump the scache state or, given an integer handle, one scache handle. Read-only. The dump starts with the block checks and scache info, then a table of every handle (about 80 on a SONiC Trident 3 switch) with its offset, size, used bytes, host addresses and flags.

Hardware-validated

drivshell> warmboot scache
scache block size checks: PASS
scache block sanity checks: N/A
scache info: flags=0x0000 last_offset=0x0529ea74
scache handles:
 idx     handle     offset       size       used        cache         lock  flags
   0 0x002d0009 0x0529e9d4 0x000000a0 0x00000000 0x55975666c168 0x55975666c0e0 0x0001
   1 0x002d0005 0x0529e97c 0x00000058 0x00000000 0x55975666c028 0x55975666bfa0 0x0001
   2 0x002d0004 0x0529df4c 0x00000a30 0x00000000 0x55975666b508 0x55975666b480 0x0001
   3 0x00290000 0x0529bb34 0x00002418 0x00000000 0x5597566683c8 0x559756668340 0x0001
   4 0x00370001 0x0529bb20 0x00000014 0x00000000 0x559756667178 0x5597566670f0 0x0001
   5 0x00360000 0x0529a648 0x000014d8 0x00000000 0x559756665b38 0x559756665ab0 0x0001
   6 0x00140000 0x0529a548 0x00000100 0x00000000 0x5597566636f8 0x559756663670 0x0001
   7 0x001f0000 0x05296538 0x00004010 0x00000000 0x55975662f2f8 0x55975662f270 0x0001
   8 0x00280000 0x05149d28 0x0014c810 0x00000000 0x559756442958 0x5597564428d0 0x0001
   9 0x003d0000 0x05146918 0x00003410 0x00000000 0x55975643f458 0x55975643f3d0 0x0001
  10 0x00300000 0x050260ec 0x0012082c 0x00000000 0x55975631a4b8 0x55975631a430 0x0001
  11 0x001e0000 0x05025d08 0x000003e4 0x00000000 0x55975584e7a8 0x5597561f1a00 0x0001
  12 0x002f0000 0x05025cf8 0x00000010 0x00000000 0x5597561eec78 0x5597561eebf0 0x0001
  13 0x00180000 0x04fb5ce8 0x00070010 0x00000000 0x55975617cb78 0x55975617caf0 0x0001
  14 0x00160000 0x04f3a4fc 0x0007b7ec 0x00000000 0x5597560409c8 0x559756040940 0x0001
  15 0x000d0000 0x04f19ce0 0x0002081c 0x00000000 0x559755dd6048 0x559755dd5fc0 0x0001
  16 0x00080000 0x04ed24d0 0x00047810 0x00000000 0x559755aaf9c8 0x559755aaf940 0x0001
  17 0x000b0000 0x04eb2850 0x0001fc80 0x00000000 0x5597558c6c08 0x5597558c6b80 0x0001
  18 0x001b0000 0x04eb283c 0x00000014 0x00000000 0x5597558c6b08 0x5597558c6a80 0x0001
  19 0x00120000 0x04eb2760 0x000000dc 0x00000000 0x5597544861d8 0x5597558c3f30 0x0001
  20 0x000a0001 0x04eb2748 0x00000018 0x00000000 0x5597557de108 0x5597557d91c0 0x0001
  21 0x000a0000 0x04eb1f24 0x00000824 0x00000000 0x5597558c0098 0x5597557ce150 0x0001
  22 0x00130001 0x04eacf14 0x00005010 0x00000000 0x5597558bab78 0x5597557d1a10 0x0001
  23 0x00130000 0x004a9afc 0x04a03418 0x00000000 0x7fe8635fc018 0x5597558acd00 0x0001
  24 0x002c0000 0x004a1ad0 0x0000802c 0x00000000 0x559755792bf8 0x559755792b70 0x0001
...
WARMBOOT sync

Print syncing state to WB external storage. and write the SDK’s warm-boot state to scache now. Failure prints bcm_switch_control_set failed.. It always acts on unit 0.

Unvalidated

drivshell> warmboot sync
WARMBOOT on

Mark every unit as warm-booting.

Warning

Do not use this on a running SONiC switch. While the flag is set, the SDK treats later API calls as warm-boot recovery and skips many hardware writes. Configuration from syncd then silently stops reaching the switch.

Unvalidated

drivshell> warmboot on
WARMBOOT off

Clear the warm-boot flag on every unit, as the SDK does at the end of warm-boot recovery. This changes SDK state.

Unvalidated

drivshell> warmboot off
WARMBOOT shutdown

Shut the SDK down cleanly ahead of a warm boot. This stops linkscan, cleans up packet transmit, and shuts down the BCM and SoC layers. It prints bcm/soc shut down on unit <n>.

Warning

This removes the SDK from underneath syncd. Forwarding state and syncd’s access to the switch are lost, and syncd and the switch will need a restart. Never run it on a production switch.

Unvalidated

drivshell> warmboot shutdown

Built-in help

Parameters: [on | off | show | shutdown | storage [alloc <module_id> <scache_part_no> <alloc size>]| sync | usage | history]
Signal warm/cold boot or display current boot status
or shut down software components before a warm boot
or display the warmboot external storage requirements
or show actual current module compressed usage (XGS/XCORE only)
or allocate additional scache for given module and part no.
or display the warmboot history (XGS only)

Further reading

SDK-6.5.20 HSDK Getting Started Guide (GS-SDK6520-R), plus SDK-6.5.20/21/22 Release Notes (RN-SDK65xx-R), SDK-6.5.20..6.5.27 Resolved-Issues-Improvements.xlsx (7 files).