Update cheatsheets

This commit is contained in:
ivuorinen
2025-05-15 00:18:48 +00:00
parent 4cc9cba549
commit 704fdbe29d
8 changed files with 90 additions and 1 deletions

View File

@@ -15,3 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- List all partitions in a table, including current mountpoints:
`sudo blkid {{[-o|--output]}} list`
- Get the UUID of the filesystem on a partition:
`blkid {{[-s|--match-tag]}} UUID {{[-o|--output]}} value {{/dev/sdXY}}`

34
tldr/linux/chmem Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# chmem
> Modify the state of memory blocks (online or offline) in a Linux system.
> Typically used in virtualized environments to manage memory hotplug.
> More information: <https://manned.org/chmem>.
- Set a memory block offline:
`sudo chmem {{[-b|--block]}} {{[-d|--disable]}} {{block_number}}`
- Set a memory block online:
`sudo chmem {{[-b|--block]}} {{[-e|--enable]}} {{block_number}}`
- Set a memory range offline using hexadecimal addresses:
`sudo chmem {{[-d|--disable]}} 0x{{start_address}}-0x{{end_address}}`
- Set a memory range online using hexadecimal addresses:
`sudo chmem {{[-e|--enable]}} 0x{{start_address}}-0x{{end_address}}`
- Set memory online and assign it to a specific zone (e.g., Movable):
`sudo chmem {{[-e|--enable]}} 0x{{start_address}} {{[-z|--zone]}} {{Movable}}`
- Display help:
`chmem {{[-h|--help]}}`