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.
sahmed_FTNT
Staff & Editor
Staff & Editor
Article Id 294676
Description This article describes how the 'diagnose hardware sys slab' command is usually used for memory troubleshooting, and elaborates on the meaning of the command's output.
Scope FortiGate.
Solution

The memory slabs are a collection of objects used by the kernel to store information in memory.

 

Examples of slabs:

 

Slab Usage
tcp_session TCP session
ip_session Non-TCP session
ip_dst_cache Route cache
buffer_head Read/write data from disk, flash
inode_cache Information about file and directories
dentry_cache Cache for file system directory entries
arp_cache Cache for ARP

  

The command 'diagnose hardware sys slab' is often used to determine the memory status of a device during troubleshooting:

 

slab.jpg

 

In the above:

 

active_objs        <----- Number of objects that are currently in use.

num_objs              <----- Total number of allocated objects that are in use or not in use.

objsize                <----- Size of objects in this slab (in bytes).

objperslab        <----- Number of objects stored in each slab.

pagesperslab    <----- Number of pages allocated for each slab.


It is possible to calculate how much memory it is using with the following formula:

(num_objs) x (objsize) = number of bytes of memory used.

                      <active_objs>    <num_objs>     <objsize>

tcp_session              2539            2700            1536

ip_session               3970374         3970374         1344

TCP session = 2700 (num_objs) x 1536 (objsize) = 4,147,200 bytes to Mb = 4.1Mb

IP session = 3970374 (num_objs) x 1344 (objsize) =  5,336,182,656 bytes to GB = 5.33 GB

 

The slab value can be found with the following command:

 

get ha memory
MemTotal: 2040560 kB
MemFree: 937664 kB
Slab: 92448 kB