计算机的硬件报告,包括组件、测试、基准测试、擦除和安装操作系统。

ereuse-workbench的Python项目详细描述


工作台:

Usage: erwb [OPTIONS]

Create a hardware report of your computer with components, serial numbers,
testing, benchmarking, erasing, and installing an OS.

By default Workbench only generates a report of the hardware
characteristics of the computer, so it is safe to use. Parametrize it to
make workbench perform tests, benchmarks... generating a bigger report
including the results of those actions.

You must run this software as root / sudo.

Options:
  -b, --benchmark / --no-benchmark
                                  Benchmark the components using sysbench and
                                  other tools.
  -st, --smart [Short|Extended]   Perform a SMART test to all the data storage
                                  units.
  -e, --erase [EraseBasic|EraseSectors]
                                  Erase all data storage units.
  -es, --erase-steps INTEGER RANGE
                                  Number of erasure STEPS.
  --erase-leading-zeros / --no-erase-leading-zeros
                                  Shall we perform an extra erasure step
                                  writing zeros?
  -ss, --stress INTEGER RANGE     Run stress test for the given MINUTES (0 to
                                  disable)
  -i, --install TEXT              The name of the FSA OS to install, without
                                  the ".fsa" extension. The file has to be in
                                  /media/workbench-images
  -sr, --server URL               Connect to a WorkbenchServer at the
                                  specified URI. This will activate USBSneaky
                                  module, load the settings from the server,
                                  and keep indefinitely waiting for an USB
                                  tobe plugged-in.
  --sync-time / --no-sync-time    Sync the time with the Internet before
                                  executing the Workbench. Print a warning if
                                  it cannot sync (ex. no Internet).
  -j, --json FILE                 Write the resulting report to a JSON file.
  --submit URL                    If set, submits the resulting Snapshot to a
                                  passed-in Devicehub.Provide a valid URL with
                                  scheme, username, password and host.
  --debug / --no-debug            Add extra debug information to the resulting
                                  snapshot?
  -h, --help                      Show this message and exit.

  Ex. sudo erwb --benchmark --smart Short --erase EraseSectors --json out.json

  will generate a hardware report plus benchmarks, a short SMART test of all
  data storage units, and a certified erasure of all data storage units,
  saving the resulting report as 'out.json'.

See an example JSON report

工作台可用于USB or CD, 甚至是over the network through PXE, 在删除和安装操作系统或工作时特别有用 有很多电脑。

workbench使用几个著名的linux包来执行每个 行动,避免重新发明轮子。它被使用 专业由翻新商和正规公司注册, 准备并跟踪他们的设备,并且非常重视数据 正确。Workbench是来自eReuse.org的免费软件。

下载

你可以get Workbench directly in an ISO ready to use (转到workbench live文件夹)或将其安装为python包(请参阅下一节)。

安装

只要Workbench有下面的软件包,它就可以在任何Linux中工作。 它保证在Debian9工作。

  1. 安装debian packages,如 下面是cat debian-requirements.txt | sudo xargs apt install -y
  2. sudo pip3 install ereuse-workbench--pre-U

请注意,您需要将其安装为sudo,因为软件只能 由于它使用的工具,所以使用根目录运行。

用法

通过cli或直接在python中执行workbench。

从python文件可以:

from ereuse_workbench.workbench import Workbench
erwb = Workbench() # Check the docs of this class for more info
erwb.run()

测试

  1. 克隆此存储库并转到存储库主文件夹。
  2. 将工作台安装为pip3 install-e.[test]-r requirements.txt。
  3. 使用python3 setup.py test运行测试。

注意,执行测试不需要是根用户,而且 它们可以在Mac和Windows中执行,因为它们不使用任何 系统工具,但是存根。

已知限制

  • 不支持的USB网络适配器。
  • 它不能安装windows操作系统。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java将数据从字符串数组存储到字符串数组列表   java使用OSGi和ApacheFelixIpojo与JDK11   java我有一个JTree,我想应用渲染器,以便修改JTree节点的显示名称   在Android Studio中编译cordova时,“java:package org.apache.cordova不存在”   java Mocked方法正在Mockito中抛出NullPointerException   使用Prometheus监控Java webapp   java如何将Word文档转换为PDF?   java必需类型“Loan”,给定字符串   如何在java中将字符串转换为工作日?   java如何用三项描述一个状态   java如何生成限制相似数和十次幂的随机数   java JavaFX设置组合框会导致空指针   java这个本机Mongo聚合管道的Spring等价物是什么?   java如何使用类名作为方法参数的类型   java如何使Bean验证API 1.1与GWT2.7配合使用?