> [!IMPORTANT]
> This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.
# MFD Dmesg
## Usage
from mfd_connect import SSHConnection
from mfd_connect import RPyCZeroDeployConnection
from mfd_dmesg import Dmesg, DmesgLevelOptions
from mfd_connect import RPyCConnection
conn = SSHConnection(username="***", password="***", ip="***")
dmesg_obj = Dmesg(connection=conn)
print(dmesg_obj.get_messages(level=DmesgLevelOptions.NONE))
print(dmesg_obj.get_messages_additional())
print(dmesg_obj.get_os_package_info())
## Implemented methods
`check_if_available(self) -> None` - responsible to check if tool is available in system.
`get_version(self) -> str` - responsible to get version of tool.
`get_messages(self, level: DmesgLevelOptions = DmesgLevelOptions.NONE, service_name: str = None) -> str` - responsible to return dmesg output will take service name, level of the dmesg contents and name as optional parameters.
`get_buffer_size_data(self, driver_name: str, driver_interface_number: str) -> Optional[list]` - responsible to return buffer size for respective drivername and interface number.
`get_os_package_info(self) -> Union[OSPackageInfo, None]` - responsible to return os package installed which is retrived from dmesg output.
`get_messages_additional(self, service_name: str = None, lines: int = 1000, expected_return_codes: Iterable = frozenset({0}), additional_greps: Optional[List[str]] = None) -> str` - responsible to return latest dmesg output based on addtional filters as specified by the user.
`verify_messages(self) -> dict` - responsible to check if there are err level messages in dmesg output.
`clear_messages(self, errors_filter: Optional[List[str]] = [], ignore_filter: Optional[List[str]] = [],) -> Tuple[str, List[str]]` - responsible to clear the message buffer of the kernel (dmesg).
`clear_messages_after_error(self, error_msg: str) -> Union[Tuple[str, List[str]], None]` - responsible to clear the message buffer of the kernel (dmesg) after user defined error occurred.
`check_errors(self, error_list: list) -> tuple` - responsible to check for the errors as specified by the user list or user can select from predefined list declared in constant file.
`check_str_present(self, service_name: str, lookout_str: str, additional_greps: Optional[List[str]] = None) -> bool` - responsible to check for particular user defined string in dmesg output.
`check_messages_format(self, driver: str, time_format: str = "%Y-%m-%dT%H:%M:%S.%fZ") -> Union[bool, None]` - responsible to check for userdefined time format or default time format in dmesg logs.
`check_new_errors(self) -> dict` - responsible to check for new errors in dmesg output apart from last time the dmesg log collected.
**Methods**
- `verify_log(driver: str) -> str`
Checks the system log for errors.
**Parameters:**
* driver - name of driver for check
**Returns:**
* `str` - empty string if no errors found, error content otherwise
## Data Structures
Data structures returned by methods:
class OSPackageInfo:
"""Decorator for OS Package Information."""
package_name: Optional[str] = None
package_file: Optional[str] = None
package_version: Optional[str] = None
## OS supported:
Here is a place to write what OSes support your MFD module:
* LINUX
* FREEBSD
* ESXI
## Issue reporting
If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue [here](https://github.com/intel/mfd-dmesg/issues).
Raw data
{
"_id": null,
"home_page": null,
"name": "mfd-dmesg",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": null,
"download_url": null,
"platform": null,
"description": "> [!IMPORTANT] \n> This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.\n \n# MFD Dmesg\n\n## Usage\n\nfrom mfd_connect import SSHConnection\nfrom mfd_connect import RPyCZeroDeployConnection\nfrom mfd_dmesg import Dmesg, DmesgLevelOptions\nfrom mfd_connect import RPyCConnection\n\nconn = SSHConnection(username=\"***\", password=\"***\", ip=\"***\")\ndmesg_obj = Dmesg(connection=conn)\nprint(dmesg_obj.get_messages(level=DmesgLevelOptions.NONE))\nprint(dmesg_obj.get_messages_additional())\nprint(dmesg_obj.get_os_package_info())\n\n## Implemented methods\n\n`check_if_available(self) -> None` - responsible to check if tool is available in system.\n`get_version(self) -> str` - responsible to get version of tool.\n`get_messages(self, level: DmesgLevelOptions = DmesgLevelOptions.NONE, service_name: str = None) -> str` - responsible to return dmesg output will take service name, level of the dmesg contents and name as optional parameters.\n`get_buffer_size_data(self, driver_name: str, driver_interface_number: str) -> Optional[list]` - responsible to return buffer size for respective drivername and interface number.\n`get_os_package_info(self) -> Union[OSPackageInfo, None]` - responsible to return os package installed which is retrived from dmesg output.\n`get_messages_additional(self, service_name: str = None, lines: int = 1000, expected_return_codes: Iterable = frozenset({0}), additional_greps: Optional[List[str]] = None) -> str` - responsible to return latest dmesg output based on addtional filters as specified by the user.\n`verify_messages(self) -> dict` - responsible to check if there are err level messages in dmesg output.\n`clear_messages(self, errors_filter: Optional[List[str]] = [], ignore_filter: Optional[List[str]] = [],) -> Tuple[str, List[str]]` - responsible to clear the message buffer of the kernel (dmesg).\n`clear_messages_after_error(self, error_msg: str) -> Union[Tuple[str, List[str]], None]` - responsible to clear the message buffer of the kernel (dmesg) after user defined error occurred.\n`check_errors(self, error_list: list) -> tuple` - responsible to check for the errors as specified by the user list or user can select from predefined list declared in constant file.\n`check_str_present(self, service_name: str, lookout_str: str, additional_greps: Optional[List[str]] = None) -> bool` - responsible to check for particular user defined string in dmesg output.\n`check_messages_format(self, driver: str, time_format: str = \"%Y-%m-%dT%H:%M:%S.%fZ\") -> Union[bool, None]` - responsible to check for userdefined time format or default time format in dmesg logs.\n`check_new_errors(self) -> dict` - responsible to check for new errors in dmesg output apart from last time the dmesg log collected.\n\n**Methods**\n- `verify_log(driver: str) -> str` \n\n Checks the system log for errors.\n\n **Parameters:**\n * driver - name of driver for check\n \n **Returns:**\n * `str` - empty string if no errors found, error content otherwise\n\n## Data Structures\n\nData structures returned by methods:\n\nclass OSPackageInfo:\n \"\"\"Decorator for OS Package Information.\"\"\"\n\n package_name: Optional[str] = None\n package_file: Optional[str] = None\n package_version: Optional[str] = None\n\n## OS supported:\n\nHere is a place to write what OSes support your MFD module:\n* LINUX\n* FREEBSD\n* ESXI\n\n## Issue reporting\n\nIf you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue [here](https://github.com/intel/mfd-dmesg/issues).\n",
"bugtrack_url": null,
"license": null,
"summary": "Modular Framework Design (MFD) module for diagnostic messages.",
"version": "1.20.0",
"project_urls": {
"Changelog": "https://github.com/intel/mfd-dmesg/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/intel/mfd",
"Issues": "https://github.com/intel/mfd-dmesg/issues",
"Repository": "https://github.com/intel/mfd-dmesg"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9141932ddb869e0d03f5a81f27fc4affa9439ed19f7211b104a8c78af8e5a87f",
"md5": "ccf6673d6682ebf1ccfe7dbbfbfe32c9",
"sha256": "2aa6343b9971c0b38daa3bea12907c2302be42f666535c38ccddb727c7e88a2b"
},
"downloads": -1,
"filename": "mfd_dmesg-1.20.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ccf6673d6682ebf1ccfe7dbbfbfe32c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.10",
"size": 12628,
"upload_time": "2025-07-10T10:50:01",
"upload_time_iso_8601": "2025-07-10T10:50:01.163437Z",
"url": "https://files.pythonhosted.org/packages/91/41/932ddb869e0d03f5a81f27fc4affa9439ed19f7211b104a8c78af8e5a87f/mfd_dmesg-1.20.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 10:50:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "intel",
"github_project": "mfd-dmesg",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "mfd-common-libs",
"specs": [
[
"<",
"2"
],
[
">=",
"1.11.0"
]
]
},
{
"name": "mfd-base-tool",
"specs": [
[
"<",
"3"
],
[
">=",
"2.7.0"
]
]
},
{
"name": "mfd-typing",
"specs": [
[
"<",
"2"
],
[
">=",
"1.23.0"
]
]
}
],
"lcname": "mfd-dmesg"
}