Skip to content

Commit

Permalink
[doc] add documentation on automatic techsupport based on memory (#2411)
Browse files Browse the repository at this point in the history
- What I did
Added documentation on automatic techsupport based on memory availability

- How I did it
Update documentation

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
  • Loading branch information
stepanblyschak authored and yxieca committed Oct 3, 2022
1 parent 2cfc75a commit d77acf8
Showing 1 changed file with 51 additions and 18 deletions.
69 changes: 51 additions & 18 deletions doc/Command-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10379,7 +10379,8 @@ In SONiC, there usually exists a set of tables related/relevant to a particular
### Event Driven Techsupport Invocation
This feature/capability makes the techsupport invocation event-driven based on core dump generation. This feature is only applicable for the processes running in the containers. More detailed explanation can be found in the HLD https://github.com/Azure/SONiC/blob/master/doc/auto_techsupport_and_coredump_mgmt.md
This feature/capability makes the techsupport invocation event-driven based on system events like core dump generation or low RAM availability.
This feature is only applicable for the processes running in the containers. More detailed explanation can be found in the HLD https://github.com/Azure/SONiC/blob/master/doc/auto_techsupport_and_coredump_mgmt.md
#### config auto-techsupport global commands
Expand Down Expand Up @@ -10451,22 +10452,52 @@ This feature/capability makes the techsupport invocation event-driven based on c
config auto-techsupport global since <string>
```
**config auto-techsupport global available-mem-threshold**
Configure available memory threshold in %. System will automatically generate a techsupport dump when available memory goes below the configured threshold. Setting this field to 0 will disable techsupport invokation.
- Usage:
```
config auto-techsupport global available-mem-threshold <float up to two decimal places>
```
- Parameters:
- available-mem-threshold: Memory threshold. Configure 0 to disable techsupport invocation on memory usage threshold crossing
- Example:
```
config auto-techsupport global available-mem-threshold 20
```
**config auto-techsupport global min-available-mem**
Configure minimum available memory in MB. System will automatically generate a techsupport dump when available memory goes below the configured threshold.
- Usage:
```
config auto-techsupport global min-available-mem <uint32>
```
- Parameters:
- min-available-mem: Minimum free memory amount in MB to trigger techsupport dump
- Example:
```
config auto-techsupport global min-available-mem 200
```
#### config auto-techsupport-feature commands
**config auto-techsupport-feature add**
- Usage:
```
config auto-techsupport-feature add <feature_name> --state <enabled/disabled> --rate-limit-interval <uint16>
config auto-techsupport-feature add <feature_name> --state <enabled/disabled> --rate-limit-interval <uint16> --available-mem-threshold <float up to two decimal places>
```
- Parameters:
- state: enable/disable the capability for the specific feature/container.
- rate-limit-interval: Rate limit interval for the corresponding feature. Configure 0 to explicitly disable. For the techsupport to be generated by auto-techsupport, both the global and feature specific rate-limit-interval has to be passed
- available-mem-threshold: Memory threshold. Configure 0 to disable techsupport invocation on memory usage threshold crossing.
- Example:
```
config auto-techsupport-feature add bgp --state enabled --rate-limit-interval 200
config auto-techsupport-feature add bgp --state enabled --rate-limit-interval 200 --available-mem-threshold 50
```
Expand All @@ -10488,6 +10519,7 @@ This feature/capability makes the techsupport invocation event-driven based on c
```
config auto-techsupport-feature update <feature_name> --state <enabled/disabled>
config auto-techsupport-feature update <feature_name> --rate-limit-interval <uint16>
config auto-techsupport-feature update <feature_name> --available-mem-threshold <float up to two decimal places>
```
- Example:
Expand All @@ -10508,9 +10540,9 @@ This feature/capability makes the techsupport invocation event-driven based on c
- Example:
```
admin@sonic:~$ show auto-techsupport global
STATE RATE LIMIT INTERVAL (sec) MAX TECHSUPPORT LIMIT (%) MAX CORE LIMIT (%) SINCE
------- --------------------------- -------------------------- ------------------ ----------
enabled 180 10.0 5.0 2 days ago
STATE RATE LIMIT INTERVAL (sec) MAX TECHSUPPORT LIMIT (%) MAX CORE LIMIT (%) AVAILABLE MEM THRESHOLD (%) MIN AVAILABLE MEM (Kb) SINCE
------- --------------------------- --------------------------- -------------------- ----------------------------- ------------------------ ------------
enabled 180 10 5 10 200 2 days ago
```
**show auto-techsupport-feature**
Expand All @@ -10523,13 +10555,13 @@ This feature/capability makes the techsupport invocation event-driven based on c
- Example:
```
admin@sonic:~$ show auto-techsupport-feature
FEATURE NAME STATE RATE LIMIT INTERVAL (sec)
-------------- -------- --------------------------
bgp enabled 600
database enabled 600
dhcp_relay enabled 600
lldp enabled 600
swss disabled 800
FEATURE NAME STATE RATE LIMIT INTERVAL (sec) AVAILABLE MEM THRESHOLD (%)
-------------- -------- -------------------------- ------------------------------
bgp enabled 600 10
database enabled 600 10
dhcp_relay enabled 600 10
lldp enabled 600 10
swss disabled 800 10
```
**show auto-techsupport history**
Expand All @@ -10542,11 +10574,12 @@ This feature/capability makes the techsupport invocation event-driven based on c
- Example:
```
admin@sonic:~$ show auto-techsupport history
TECHSUPPORT DUMP TRIGGERED BY CORE DUMP
---------------------------------------- -------------- -----------------------------
sonic_dump_r-lionfish-16_20210901_221402 bgp bgpcfgd.1630534439.55.core.gz
sonic_dump_r-lionfish-16_20210901_203725 snmp python3.1630528642.23.core.gz
sonic_dump_r-lionfish-16_20210901_222408 teamd python3.1630535045.34.core.gz
TECHSUPPORT DUMP TRIGGERED BY EVENT TYPE CORE DUMP
---------------------------------------- -------------- -------------- -----------------------------
sonic_dump_r-lionfish-16_20210901_221402 bgp core bgpcfgd.1630534439.55.core.gz
sonic_dump_r-lionfish-16_20210901_203725 snmp core python3.1630528642.23.core.gz
sonic_dump_r-lionfish-16_20210901_222408 teamd core python3.1630535045.34.core.gz
sonic_dump_r-lionfish-16_20210901_222511 N/A memory N/A
```
Go Back To [Beginning of the document](#) or [Beginning of this section](#troubleshooting-commands)
Expand Down

0 comments on commit d77acf8

Please sign in to comment.