lsrmod

Crates.iolsrmod
lib.rslsrmod
version0.1.3
sourcesrc
created_at2024-07-11 11:16:17.751544
updated_at2024-07-11 15:23:41.126444
descriptionlsmod written in rust and outputs into std and json
homepagehttps://github.com/AlexsJones/lsrmod.git
repositoryhttps://github.com/AlexsJones/lsrmod.git
max_upload_size
id1299415
size22,224
Alex Jones (AlexsJones)

documentation

https://github.com/AlexsJones/lsrmod.git

README

lsrmod

Rust based implementation of lsmod

Also prints in JSON for automation and scripting usefulness.

e.g., lsrmod --number-of-lines=10
+----------------------+-----------+-----------+----------------------+-------+--------------------+
| Name                 | Memory(b) | Instances | Depends on           | State | Memory Offset      |
| ipheth               | 20480     | 0         | -                    | Live  | 0x0000000000000000 |
| apple_mfi_fastcharge | 16384     | 0         | -                    | Live  | 0x0000000000000000 |
| tls                  | 151552    | 0         | -                    | Live  | 0x0000000000000000 |
| r8153_ecm            | 12288     | 0         | -                    | Live  | 0x0000000000000000 |
| cdc_ether            | 24576     | 1         | r8153_ecm,           | Live  | 0x0000000000000000 |
| usbnet               | 61440     | 2         | r8153_ecm,cdc_ether, | Live  | 0x0000000000000000 |
| r8152                | 143360    | 1         | r8153_ecm,           | Live  | 0x0000000000000000 |
| mii                  | 20480     | 2         | usbnet,r8152,        | Live  | 0x0000000000000000 |
| snd_usb_audio        | 499712    | 0         | -                    | Live  | 0x0000000000000000 |
| snd_usbmidi_lib      | 53248     | 1         | snd_usb_audio,       | Live  | 0x0000000000000000 |
+----------------------+-----------+-----------+----------------------+-------+--------------------+

Install

cargo install lsrmod

Example

lsrmod --json | jq . | head -n25
[
  {
    "name": "tls",
    "memory": "151552",
    "instances": 0,
    "depends_on": "-",
    "state": "Live",
    "memory_offset": "0x0000000000000000"
  },
  {
    "name": "r8153_ecm",
    "memory": "12288",
    "instances": 0,
    "depends_on": "-",
    "state": "Live",
    "memory_offset": "0x0000000000000000"
  },
  {
    "name": "cdc_ether",
    "memory": "24576",
    "instances": 1,
    "depends_on": "r8153_ecm,",
    "state": "Live",
    "memory_offset": "0x0000000000000000"
  },

Commit count: 3

cargo fmt