sys-cmd memory free-swap
sys-cmd memory free-swap turns off the swap area in WEB-CLI and moves all the pages in it to memory, and then re-enables the swap area. It is used to take back into memory the pages that fell into swap during a past load and stayed there.
Command Summary
The command has no field or parameter. When it is run, the confirmation screen opens; when evet is written in the Turkish interface and yes in the English interface, the operation is applied. If anything else is written, the Invalid confirmation. Operation cancelled. message appears; Esc closes the confirmation screen.
The free memory is checked first
Everything in swap is moved to memory. If in the memory status output the Mem row's available value is not noticeably greater than the Swap row's used value, the command is not run; otherwise the memory runs out and services can be terminated.
How It Works
| Subject | Behavior |
|---|---|
| Context | It is not affected by the selected v-device and route table; it always runs on the device itself. |
| Duration | It depends on the amount of data in swap; while a few gigabytes of swap is being emptied it can take minutes, and during this time the device may slow down. |
| The result message | When the work finishes, Swap space cleared and re-enabled successfully. is written. This message is written without looking at the exit status of the operation; if there is a red line above it, swap may not have been turned off or re-enabled, and the state is verified with memory status. |
| Recording | Every run is written to the user logs. |
The Safe Order of Use
Things to Know
- It is not run during busy hours. While the operation continues, the disk and memory load increases.
- It is not a permanent solution. If swap fills up often, the memory of the device is not enough for the workload; the cache and swap operations only provide temporary relief.
- The swap size does not change. The command only empties the content; the size of the swap area stays the same.
