{"id":18875355,"url":"https://github.com/opencomputeproject/ocp-diag-memtester","last_synced_at":"2026-02-28T17:31:03.800Z","repository":{"id":82174061,"uuid":"596769701","full_name":"opencomputeproject/ocp-diag-memtester","owner":"opencomputeproject","description":"Python scripts that turn memtester into an OCP-compliant diagnostic","archived":false,"fork":false,"pushed_at":"2023-12-20T02:25:34.000Z","size":12,"stargazers_count":5,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-02T22:52:19.868Z","etag":null,"topics":["lex","lexer","memtester","ocp-diag","parser","sly","yacc"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencomputeproject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-02-02T22:15:46.000Z","updated_at":"2025-11-16T21:45:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"aafd587c-df59-47ae-9b7e-33290c6c228a","html_url":"https://github.com/opencomputeproject/ocp-diag-memtester","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/opencomputeproject/ocp-diag-memtester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-memtester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-memtester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-memtester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-memtester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencomputeproject","download_url":"https://codeload.github.com/opencomputeproject/ocp-diag-memtester/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencomputeproject%2Focp-diag-memtester/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29944765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:49:17.081Z","status":"ssl_error","status_checked_at":"2026-02-28T13:48:50.396Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lex","lexer","memtester","ocp-diag","parser","sly","yacc"],"created_at":"2024-11-08T06:07:07.727Z","updated_at":"2026-02-28T17:31:03.774Z","avatar_url":"https://github.com/opencomputeproject.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memtester diagnostic\n\n[Memtester](https://linux.die.net/man/8/memtester) is a Linux utility that tests RAM.\nThis repo contains Python scripts that turn `memtester` into an OCP-compliant diagnostic by parsing its output using [SLY](https://sly.readthedocs.io/en/latest/), a Python implementation of [Lex](https://en.wikipedia.org/wiki/Lex_(software)) and [Yacc](https://en.wikipedia.org/wiki/Yacc).\nThe parsing process happens in runtime, allowing the diag to report partial results while the memory test is still running.\n\nCurrently, Python \u003e=3.11 is required to run this diag.\n\n## Basic usage\nTo run the diag do the following:\n1. Install `memtester` on your DUT. Make sure the version you have is [supported](#supported-versions).\n2. Install all the dependencies specified in `requirements.txt`.\n3. Run the diag with parameters required for your use case.\n\nFor Debian-based operating systems the procedure above may look as follows:\n```\napt install memtester\ngit clone https://github.com/opencomputeproject/ocp-diag-memtester.git\ncd ocp-diag-memtester\npython -m venv .\nsource bin/activate\npip install -r requirements.txt\npython3 src/main.py --mt_args=\"100M 3\"\n```\n\nIn the last command, `mt_args` specifies arguments that the diag will pass to `memtester`.\nThe value above will make `memtester` reserve 100 megabytes of RAM and test it three times.\nFor more info on the parameters you can pass to `memtester` run `man memtester`.\n\n## Supported versions\nThe output `memtester` produces may vary significantly across different versions.\nThis means that it is hard to write a parser that works properly with all of them.\nThus, only a few versions are currently supported:\n\n| Version of memtester | Status |\n|-|-|\n| 4.6.0 | Full support. No known issues. |\n| 4.5.0 | Full support. No known issues. |\n| 4.5.1 | Full support. No known issues. |\n| 4.4.0 | Memtester reports memory errors for a normally working system. Error messages appear in unexpected places. No plans to support this version. |\n| 4.3.0 and earlier | Source code does not compile. No plans to support this version(s). |\n\n## Running custom `memtester`\nIt is possible to run this diag with a custom version of `memtester`. To do that, install your custom version in the location\nof your choice and pass this location to the diag as follows (the path must include the name of the executable):\n\n```\npython3 main.py --mt_args=\"100M 3\" --mt_path=\"/my/favorite/location/memtester\"\n```\n\nIn order for this diag to work properly, the output format of your `memtester` must comply with\none of the supported versions.\n\n## Running unit tests\nExecute the following command in the repo's root directory to run the diag's unit tests:\n```\npython -m unittest\n```\n\n## Testing older memtester versions using Docker\nIf you need to test this diag with an older memtester version, you can use `Dockerfile` from the root directory of this repo.\nThis `Dockerfile` takes care of all necessary dependencies for the diag. In addition to that, it downloads `memtester` of the required version from its author's website and builds it.\nYou can use the following command to build and run the container:\n\n```\ndocker build -t ocp_memtester --build-arg=\"MT_VERSION=\u003cversion\u003e\" . \u0026\u0026 docker run --rm -t ocp_memtester\n```\n\nIn the command above, replace `\u003cversion\u003e` with the version of `memtester` you want to test. For example:\n\n```\n docker build -t ocp_memtester --build-arg=\"MT_VERSION=4.5.1\" . \u0026\u0026 docker run --rm -t ocp_memtester\n```\n\nNote: if you face any permission issues when running docker, please refer to [this article](https://docs.docker.com/engine/install/linux-postinstall).\n\nThe list of available `memtester` versions can be found on [this page](https://pyropus.ca./software/memtester/old-versions).\n\nSince there is no Python parser for OCP-compliant output yet, the container does not do automatic diag validation, so you have to manually confirm whether the version you chose works correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Focp-diag-memtester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencomputeproject%2Focp-diag-memtester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencomputeproject%2Focp-diag-memtester/lists"}