sysfs-module 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. The /sys/module tree consists of the following structure:
  2. What: /sys/module/<MODULENAME>
  3. Description:
  4. The name of the module that is in the kernel. This
  5. module name will always show up if the module is loaded as a
  6. dynamic module. If it is built directly into the kernel, it
  7. will only show up if it has a version or at least one
  8. parameter.
  9. Note: The conditions of creation in the built-in case are not
  10. by design and may be removed in the future.
  11. What: /sys/module/<MODULENAME>/parameters
  12. Description:
  13. This directory contains individual files that are each
  14. individual parameters of the module that are able to be
  15. changed at runtime. See the individual module
  16. documentation as to the contents of these parameters and
  17. what they accomplish.
  18. Note: The individual parameter names and values are not
  19. considered stable, only the fact that they will be
  20. placed in this location within sysfs. See the
  21. individual driver documentation for details as to the
  22. stability of the different parameters.
  23. What: /sys/module/<MODULENAME>/refcnt
  24. Description:
  25. If the module is able to be unloaded from the kernel, this file
  26. will contain the current reference count of the module.
  27. Note: If the module is built into the kernel, or if the
  28. CONFIG_MODULE_UNLOAD kernel configuration value is not enabled,
  29. this file will not be present.
  30. What: /sys/module/<MODULENAME>/srcversion
  31. Date: Jun 2005
  32. Description:
  33. If the module source has MODULE_VERSION, this file will contain
  34. the checksum of the source code.
  35. What: /sys/module/<MODULENAME>/version
  36. Date: Jun 2005
  37. Description:
  38. If the module source has MODULE_VERSION, this file will contain
  39. the version of the source code.
  40. What: /sys/module/MODULENAME/scmversion
  41. Date: November 2020
  42. KernelVersion: 5.12
  43. Contact: Will McVicker <[email protected]>
  44. Description: This read-only file will appear if modpost was supplied with an
  45. SCM version for the module. It can be enabled with the config
  46. MODULE_SCMVERSION. The SCM version is retrieved by
  47. scripts/setlocalversion, which means that the presence of this
  48. file depends on CONFIG_LOCALVERSION_AUTO=y. When read, the SCM
  49. version that the module was compiled with is returned. The SCM
  50. version is returned in the following format::
  51. ===
  52. Git: g[a-f0-9]\+(-dirty)\?
  53. Mercurial: hg[a-f0-9]\+(-dirty)\?
  54. Subversion: svn[0-9]\+
  55. ===