diff --git a/ereuse_devicehub/api/__init__.py b/ereuse_devicehub/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/ereuse_devicehub/api/views.py b/ereuse_devicehub/api/views.py new file mode 100644 index 00000000..7a894394 --- /dev/null +++ b/ereuse_devicehub/api/views.py @@ -0,0 +1,84 @@ +import json +from binascii import Error as asciiError + +from flask import Blueprint +from flask import current_app as app +from flask import g, jsonify, request +from flask.views import View +from marshmallow import ValidationError +from werkzeug.exceptions import Unauthorized + +from ereuse_devicehub.auth import Auth +from ereuse_devicehub.db import db +from ereuse_devicehub.parser.models import SnapshotErrors +from ereuse_devicehub.parser.parser import ParseSnapshotLsHw +from ereuse_devicehub.parser.schemas import Snapshot_lite +from ereuse_devicehub.resources.action.views.snapshot import ( + SnapshotMix, + move_json, + save_json, +) +from ereuse_devicehub.resources.enums import Severity + +api = Blueprint('api', __name__, url_prefix='/api') + + +class LoginMix(View): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.authenticate() + + def authenticate(self): + unauthorized = Unauthorized('Provide a suitable token.') + basic_token = request.headers.get('Authorization', " ").split(" ") + if not len(basic_token) == 2: + raise unauthorized + + token = basic_token[1] + try: + token = Auth.decode(token) + except asciiError: + raise unauthorized + self.user = Auth().authenticate(token) + g.user = self.user + + +class InventoryView(LoginMix, SnapshotMix): + methods = ['POST'] + + def dispatch_request(self): + snapshot_json = json.loads(request.data) + self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] + self.path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) + snapshot_json = self.validate(snapshot_json) + try: + self.snapshot_json = ParseSnapshotLsHw(snapshot_json).get_snapshot() + except ValidationError: + self.response = jsonify('') + self.response.status_code = 201 + return self.response + + snapshot = self.build() + db.session.add(snapshot) + db.session().final_flush() + db.session.commit() + self.response = self.schema.jsonify(snapshot) + self.response.status_code = 201 + move_json(self.tmp_snapshots, self.path_snapshot, g.user.email) + return self.response + + def validate(self, snapshot_json): + self.schema = Snapshot_lite() + try: + return self.schema.load(snapshot_json) + except ValidationError as err: + txt = "{}".format(err) + uuid = snapshot_json.get('uuid') + error = SnapshotErrors( + description=txt, snapshot_uuid=uuid, severity=Severity.Error + ) + error.save(commit=True) + raise err + + +api.add_url_rule('/inventory/', view_func=InventoryView.as_view('inventory')) diff --git a/ereuse_devicehub/config.py b/ereuse_devicehub/config.py index d1f89896..c9c47b1b 100644 --- a/ereuse_devicehub/config.py +++ b/ereuse_devicehub/config.py @@ -1,39 +1,49 @@ from distutils.version import StrictVersion from itertools import chain from typing import Set -from decouple import config +from decouple import config from teal.auth import TokenAuth from teal.config import Config from teal.enums import Currency from teal.utils import import_resource -from ereuse_devicehub.resources import action, agent, deliverynote, inventory, \ - lot, tag, user +from ereuse_devicehub.resources import ( + action, + agent, + deliverynote, + inventory, + lot, + tag, + user, +) from ereuse_devicehub.resources.device import definitions from ereuse_devicehub.resources.documents import documents -from ereuse_devicehub.resources.tradedocument import definitions as tradedocument from ereuse_devicehub.resources.enums import PriceSoftware -from ereuse_devicehub.resources.versions import versions from ereuse_devicehub.resources.licences import licences from ereuse_devicehub.resources.metric import definitions as metric_def +from ereuse_devicehub.resources.tradedocument import definitions as tradedocument +from ereuse_devicehub.resources.versions import versions class DevicehubConfig(Config): - RESOURCE_DEFINITIONS = set(chain(import_resource(definitions), - import_resource(action), - import_resource(user), - import_resource(tag), - import_resource(agent), - import_resource(lot), - import_resource(deliverynote), - import_resource(documents), - import_resource(tradedocument), - import_resource(inventory), - import_resource(versions), - import_resource(licences), - import_resource(metric_def), - ),) + RESOURCE_DEFINITIONS = set( + chain( + import_resource(definitions), + import_resource(action), + import_resource(user), + import_resource(tag), + import_resource(agent), + import_resource(lot), + import_resource(deliverynote), + import_resource(documents), + import_resource(tradedocument), + import_resource(inventory), + import_resource(versions), + import_resource(licences), + import_resource(metric_def), + ), + ) PASSWORD_SCHEMES = {'pbkdf2_sha256'} # type: Set[str] SECRET_KEY = config('SECRET_KEY') DB_USER = config('DB_USER', 'dhub') @@ -48,11 +58,12 @@ class DevicehubConfig(Config): db=DB_DATABASE, ) # type: str SCHEMA = config('SCHEMA', 'dbtest') - HOST = config('HOST', 'localhost') + HOST = config('HOST', 'localhost') MIN_WORKBENCH = StrictVersion('11.0a1') # type: StrictVersion """The minimum version of ereuse.org workbench that this devicehub accepts. we recommend not changing this value. """ + WORKBENCH_LITE = ["1.0.0"] TMP_SNAPSHOTS = config('TMP_SNAPSHOTS', '/tmp/snapshots') TMP_LIVES = config('TMP_LIVES', '/tmp/lives') @@ -60,11 +71,7 @@ class DevicehubConfig(Config): """This var is for save a snapshots in json format when fail something""" API_DOC_CONFIG_TITLE = 'Devicehub' API_DOC_CONFIG_VERSION = '0.2' - API_DOC_CONFIG_COMPONENTS = { - 'securitySchemes': { - 'bearerAuth': TokenAuth.API_DOCS - } - } + API_DOC_CONFIG_COMPONENTS = {'securitySchemes': {'bearerAuth': TokenAuth.API_DOCS}} API_DOC_CLASS_DISCRIMINATOR = 'type' PRICE_SOFTWARE = PriceSoftware.Ereuse diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 72f033f8..58940460 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -3,8 +3,10 @@ import json from json.decoder import JSONDecodeError from boltons.urlutils import URL +from flask import current_app as app from flask import g, request from flask_wtf import FlaskForm +from marshmallow import ValidationError from sqlalchemy import or_ from sqlalchemy.util import OrderedSet from wtforms import ( @@ -25,14 +27,19 @@ from wtforms import ( from wtforms.fields import FormField from ereuse_devicehub.db import db -from ereuse_devicehub.resources.action.models import RateComputer, Snapshot, Trade -from ereuse_devicehub.resources.action.rate.v1_0 import CannotRate +from ereuse_devicehub.parser.models import SnapshotErrors +from ereuse_devicehub.parser.parser import ParseSnapshotLsHw +from ereuse_devicehub.parser.schemas import Snapshot_lite +from ereuse_devicehub.resources.action.models import Snapshot, Trade from ereuse_devicehub.resources.action.schemas import Snapshot as SnapshotSchema -from ereuse_devicehub.resources.action.views.snapshot import move_json, save_json +from ereuse_devicehub.resources.action.views.snapshot import ( + SnapshotMix, + move_json, + save_json, +) from ereuse_devicehub.resources.device.models import ( SAI, Cellphone, - Computer, Device, Keyboard, MemoryCardReader, @@ -43,12 +50,11 @@ from ereuse_devicehub.resources.device.models import ( ) from ereuse_devicehub.resources.device.sync import Sync from ereuse_devicehub.resources.documents.models import DataWipeDocument -from ereuse_devicehub.resources.enums import Severity, SnapshotSoftware +from ereuse_devicehub.resources.enums import Severity from ereuse_devicehub.resources.hash_reports import insert_hash from ereuse_devicehub.resources.lot.models import Lot from ereuse_devicehub.resources.tag.model import Tag from ereuse_devicehub.resources.tradedocument.models import TradeDocument -from ereuse_devicehub.resources.user.exceptions import InsufficientPermission from ereuse_devicehub.resources.user.models import User DEVICES = { @@ -135,7 +141,7 @@ class LotForm(FlaskForm): return self.instance -class UploadSnapshotForm(FlaskForm): +class UploadSnapshotForm(FlaskForm, SnapshotMix): snapshot = MultipleFileField('Select a Snapshot File', [validators.DataRequired()]) def validate(self, extra_validators=None): @@ -175,20 +181,47 @@ class UploadSnapshotForm(FlaskForm): return True + def is_wb_lite_snapshot(self, version: str) -> bool: + is_lite = False + if version in app.config['WORKBENCH_LITE']: + is_lite = True + + return is_lite + def save(self, commit=True): if any([x == 'Error' for x in self.result.values()]): return - # result = [] - self.sync = Sync() schema = SnapshotSchema() - # self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] - # TODO @cayop get correct var config - self.tmp_snapshots = '/tmp/' + schema_lite = Snapshot_lite() + devices = [] + self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] for filename, snapshot_json in self.snapshots: path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) snapshot_json.pop('debug', None) - snapshot_json = schema.load(snapshot_json) + version = snapshot_json.get('schema_api') + if self.is_wb_lite_snapshot(version): + self.snapshot_json = schema_lite.load(snapshot_json) + snapshot_json = ParseSnapshotLsHw(self.snapshot_json).snapshot_json + + try: + snapshot_json = schema.load(snapshot_json) + except ValidationError as err: + txt = "{}".format(err) + uuid = snapshot_json.get('uuid') + wbid = snapshot_json.get('wbid') + error = SnapshotErrors( + description=txt, + snapshot_uuid=uuid, + severity=Severity.Error, + wbid=wbid, + ) + error.save(commit=True) + self.result[filename] = 'Error' + continue + response = self.build(snapshot_json) + db.session.add(response) + devices.append(response.device) if hasattr(response, 'type'): self.result[filename] = 'Ok' @@ -199,69 +232,7 @@ class UploadSnapshotForm(FlaskForm): if commit: db.session.commit() - return response - - def build(self, snapshot_json): # noqa: C901 - # this is a copy adaptated from ereuse_devicehub.resources.action.views.snapshot - device = snapshot_json.pop('device') # type: Computer - components = None - if snapshot_json['software'] == ( - SnapshotSoftware.Workbench or SnapshotSoftware.WorkbenchAndroid - ): - components = snapshot_json.pop('components', None) - if isinstance(device, Computer) and device.hid: - device.add_mac_to_hid(components_snap=components) - snapshot = Snapshot(**snapshot_json) - - # Remove new actions from devices so they don't interfere with sync - actions_device = set(e for e in device.actions_one) - device.actions_one.clear() - if components: - actions_components = tuple( - set(e for e in c.actions_one) for c in components - ) - for component in components: - component.actions_one.clear() - - assert not device.actions_one - assert all(not c.actions_one for c in components) if components else True - db_device, remove_actions = self.sync.run(device, components) - - del device # Do not use device anymore - snapshot.device = db_device - snapshot.actions |= remove_actions | actions_device # Set actions to snapshot - # commit will change the order of the components by what - # the DB wants. Let's get a copy of the list so we preserve order - ordered_components = OrderedSet(x for x in snapshot.components) - - # Add the new actions to the db-existing devices and components - db_device.actions_one |= actions_device - if components: - for component, actions in zip(ordered_components, actions_components): - component.actions_one |= actions - snapshot.actions |= actions - - if snapshot.software == SnapshotSoftware.Workbench: - # Check ownership of (non-component) device to from current.user - if db_device.owner_id != g.user.id: - raise InsufficientPermission() - # Compute ratings - try: - rate_computer, price = RateComputer.compute(db_device) - except CannotRate: - pass - else: - snapshot.actions.add(rate_computer) - if price: - snapshot.actions.add(price) - elif snapshot.software == SnapshotSoftware.WorkbenchAndroid: - pass # TODO try except to compute RateMobile - # Check if HID is null and add Severity:Warning to Snapshot - if snapshot.device.hid is None: - snapshot.severity = Severity.Warning - - db.session.add(snapshot) - return snapshot + return self.result, devices class NewDeviceForm(FlaskForm): diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index 38ff4bc6..ac91ac44 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -231,10 +231,11 @@ class UploadSnapshotView(GenericMixView): 'version': __version__, } if form.validate_on_submit(): - snapshot = form.save(commit=False) + snapshot, devices = form.save(commit=False) if lot_id: lot = lots.filter(Lot.id == lot_id).one() - lot.devices.add(snapshot.device) + for dev in devices: + lot.devices.add(dev) db.session.add(lot) db.session.commit() diff --git a/ereuse_devicehub/migrations/versions/17288b2a7440_add_uuid.py b/ereuse_devicehub/migrations/versions/17288b2a7440_add_uuid.py new file mode 100644 index 00000000..3b71c4fc --- /dev/null +++ b/ereuse_devicehub/migrations/versions/17288b2a7440_add_uuid.py @@ -0,0 +1,42 @@ +"""change firewire + +Revision ID: 17288b2a7440 +Revises: 8571fb32c912 +Create Date: 2022-03-29 11:49:39.270791 + +""" +import citext +import sqlalchemy as sa +from alembic import context, op +from sqlalchemy.dialects import postgresql + +# revision identifiers, used by Alembic. +revision = '17288b2a7440' +down_revision = '8571fb32c912' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def upgrade(): + op.add_column( + 'computer', + sa.Column('uuid', postgresql.UUID(as_uuid=True), nullable=True), + schema=f'{get_inv()}', + ) + op.add_column( + 'snapshot', + sa.Column('wbid', citext.CIText(), nullable=True), + schema=f'{get_inv()}', + ) + + +def downgrade(): + op.drop_column('computer', 'uuid', schema=f'{get_inv()}') + op.drop_column('snapshot', 'wbid', schema=f'{get_inv()}') diff --git a/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py b/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py new file mode 100644 index 00000000..308f6a86 --- /dev/null +++ b/ereuse_devicehub/migrations/versions/23d9e7ebbd7d_add_snapshot_errors.py @@ -0,0 +1,56 @@ +"""add snapshot errors + +Revision ID: 23d9e7ebbd7d +Revises: 17288b2a7440 +Create Date: 2022-04-04 19:27:48.675387 + +""" +import citext +import sqlalchemy as sa +from alembic import context, op +from sqlalchemy.dialects import postgresql + +# revision identifiers, used by Alembic. +revision = '23d9e7ebbd7d' +down_revision = '17288b2a7440' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def upgrade(): + op.create_table( + 'snapshot_errors', + sa.Column( + 'updated', + sa.TIMESTAMP(timezone=True), + server_default=sa.text('CURRENT_TIMESTAMP'), + nullable=False, + comment='The last time Devicehub recorded a change for \n this thing.\n ', + ), + sa.Column( + 'created', + sa.TIMESTAMP(timezone=True), + server_default=sa.text('CURRENT_TIMESTAMP'), + nullable=False, + comment='When Devicehub created this.', + ), + sa.Column('id', sa.BigInteger(), nullable=False), + sa.Column('description', citext.CIText(), nullable=False), + sa.Column('snapshot_uuid', postgresql.UUID(as_uuid=True), nullable=False), + sa.Column('severity', sa.SmallInteger(), nullable=False), + sa.PrimaryKeyConstraint('id'), + schema=f'{get_inv()}', + ) + op.execute(f"CREATE SEQUENCE {get_inv()}.snapshot_errors_seq START 1;") + + +def downgrade(): + op.drop_table('snapshot_errors', schema=f'{get_inv()}') + op.execute(f"DROP SEQUENCE {get_inv()}.snapshot_errors_seq;") diff --git a/ereuse_devicehub/migrations/versions/97bef94f7982_add_wbid_user_in_snapshoterrors.py b/ereuse_devicehub/migrations/versions/97bef94f7982_add_wbid_user_in_snapshoterrors.py new file mode 100644 index 00000000..d65a6b86 --- /dev/null +++ b/ereuse_devicehub/migrations/versions/97bef94f7982_add_wbid_user_in_snapshoterrors.py @@ -0,0 +1,57 @@ +"""add wbid user in snapshotErrors + +Revision ID: 97bef94f7982 +Revises: 23d9e7ebbd7d +Create Date: 2022-04-12 09:27:59.670911 + +""" +import citext +import sqlalchemy as sa +from alembic import context, op +from sqlalchemy.dialects import postgresql + +# revision identifiers, used by Alembic. +revision = '97bef94f7982' +down_revision = '23d9e7ebbd7d' +branch_labels = None +depends_on = None + + +def get_inv(): + INV = context.get_x_argument(as_dictionary=True).get('inventory') + if not INV: + raise ValueError("Inventory value is not specified") + return INV + + +def upgrade(): + op.add_column( + 'snapshot_errors', + sa.Column('wbid', citext.CIText(), nullable=True), + schema=f'{get_inv()}', + ) + op.add_column( + 'snapshot_errors', + sa.Column('owner_id', postgresql.UUID(), nullable=True), + schema=f'{get_inv()}', + ) + op.create_foreign_key( + "fk_snapshot_errors_owner_id_user_id", + "snapshot_errors", + "user", + ["owner_id"], + ["id"], + ondelete="SET NULL", + source_schema=f'{get_inv()}', + referent_schema='common', + ) + + +def downgrade(): + op.drop_constraint( + "fk_snapshot_errors_owner_id_user_id", + "snapshot_errors", + type_="foreignkey", + schema=f'{get_inv()}', + ) + op.drop_column('snapshot_errors', 'owner_id', schema=f'{get_inv()}') diff --git a/ereuse_devicehub/parser/__init__.py b/ereuse_devicehub/parser/__init__.py new file mode 100644 index 00000000..b76b6a9d --- /dev/null +++ b/ereuse_devicehub/parser/__init__.py @@ -0,0 +1,25 @@ +from pathlib import Path + +from pint import UnitRegistry + +# Sets up the unit handling +unit_registry = Path(__file__).parent / 'unit_registry' + +unit = UnitRegistry() +unit.load_definitions(str(unit_registry / 'quantities.txt')) +TB = unit.TB +GB = unit.GB +MB = unit.MB +Mbs = unit.Mbit / unit.s +MBs = unit.MB / unit.s +Hz = unit.Hz +GHz = unit.GHz +MHz = unit.MHz +Inch = unit.inch +mAh = unit.hour * unit.mA +mV = unit.mV + +base2 = UnitRegistry() +base2.load_definitions(str(unit_registry / 'base2.quantities.txt')) + +GiB = base2.GiB diff --git a/ereuse_devicehub/parser/computer.py b/ereuse_devicehub/parser/computer.py new file mode 100644 index 00000000..cdfe7a8b --- /dev/null +++ b/ereuse_devicehub/parser/computer.py @@ -0,0 +1,444 @@ +import re +from contextlib import suppress +from datetime import datetime +from fractions import Fraction +from math import hypot +from typing import Iterator, List, Optional, Type, TypeVar + +import dateutil.parser +from ereuse_utils import getter, text +from ereuse_utils.nested_lookup import ( + get_nested_dicts_with_key_containing_value, + get_nested_dicts_with_key_value, +) + +from ereuse_devicehub.parser import base2, unit, utils +from ereuse_devicehub.parser.utils import Dumpeable + + +class Device(Dumpeable): + """ + Base class for a computer and each component, containing + its physical characteristics (like serial number) and Devicehub + actions. For Devicehub actions, this class has an interface to execute + :meth:`.benchmarks`. + """ + + def __init__(self, *sources) -> None: + """Gets the device information.""" + self.actions = set() + self.type = self.__class__.__name__ + super().__init__() + + def from_lshw(self, lshw_node: dict): + self.manufacturer = getter.dict(lshw_node, 'vendor', default=None, type=str) + self.model = getter.dict( + lshw_node, + 'product', + remove={self.manufacturer} if self.manufacturer else set(), + default=None, + type=str, + ) + self.serial_number = getter.dict(lshw_node, 'serial', default=None, type=str) + + def __str__(self) -> str: + return ' '.join(x for x in (self.model, self.serial_number) if x) + + +C = TypeVar('C', bound='Component') + + +class Component(Device): + @classmethod + def new(cls, lshw, hwinfo, **kwargs) -> Iterator[C]: + raise NotImplementedError() + + +class Processor(Component): + @classmethod + def new(cls, lshw: dict, **kwargs) -> Iterator[C]: + nodes = get_nested_dicts_with_key_value(lshw, 'class', 'processor') + # We want only the physical cpu's, not the logic ones + # In some cases we may get empty cpu nodes, we can detect them because + # all regular cpus have at least a description (Intel Core i5...) + return ( + cls(node) + for node in nodes + if 'logical' not in node['id'] + and node.get('description', '').lower() != 'co-processor' + and not node.get('disabled') + and 'co-processor' not in node.get('model', '').lower() + and 'co-processor' not in node.get('description', '').lower() + and 'width' in node + ) + + def __init__(self, node: dict) -> None: + super().__init__(node) + self.from_lshw(node) + self.speed = unit.Quantity(node['size'], node['units']).to('gigahertz').m + self.address = node['width'] + try: + self.cores = int(node['configuration']['cores']) + self.threads = int(node['configuration']['threads']) + except KeyError: + self.threads = 1 + self.cores = 1 + self.serial_number = None # Processors don't have valid SN :-( + self.brand, self.generation = self.processor_brand_generation(self.model) + + assert not hasattr(self, 'cores') or 1 <= self.cores <= 16 + + @staticmethod # noqa: C901 + def processor_brand_generation(model: str): + """Generates the ``brand`` and ``generation`` fields for the given model. + + This returns a tuple with: + + - The brand as a string or None. + - The generation as an int or None. + Intel desktop processor numbers: + https://www.intel.com/content/www/us/en/processors/processor-numbers.html + Intel server processor numbers: + https://www.intel.com/content/www/us/en/processors/processor-numbers-data-center.html + """ + if 'Duo' in model: + return 'Core2 Duo', None + if 'Quad' in model: + return 'Core2 Quad', None + if 'Atom' in model: + return 'Atom', None + if 'Celeron' in model: + return 'Celeron', None + if 'Pentium' in model: + return 'Pentium', None + if 'Xeon Platinum' in model: + generation = int(re.findall(r'\bPlatinum \d{4}\w', model)[0][10]) + return 'Xeon Platinum', generation + if 'Xeon Gold' in model: + generation = int(re.findall(r'\bGold \d{4}\w', model)[0][6]) + return 'Xeon Gold', generation + if 'Xeon' in model: # Xeon E5... + generation = 1 + results = re.findall(r'\bV\d\b', model) # find V1, V2... + if results: + generation = int(results[0][1]) + return 'Xeon', generation + results = re.findall(r'\bi\d-\w+', model) # i3-XXX..., i5-XXX... + if results: # i3, i5... + return 'Core i{}'.format(results[0][1]), int(results[0][3]) + results = re.findall(r'\bi\d CPU \w+', model) + if results: # i3 CPU XXX + return 'Core i{}'.format(results[0][1]), 1 + results = re.findall(r'\bm\d-\w+', model) # m3-XXXX... + if results: + return 'Core m{}'.format(results[0][1]), None + return None, None + + def __str__(self) -> str: + return super().__str__() + ( + ' ({} generation)'.format(self.generation) if self.generation else '' + ) + + +class RamModule(Component): + @classmethod + def new(cls, lshw, **kwargs) -> Iterator[C]: + # We can get flash memory (BIOS?), system memory and unknown types of memory + memories = get_nested_dicts_with_key_value(lshw, 'class', 'memory') + TYPES = {'ddr', 'sdram', 'sodimm'} + for memory in memories: + physical_ram = any( + t in memory.get('description', '').lower() for t in TYPES + ) + not_empty = 'size' in memory + if physical_ram and not_empty: + yield cls(memory) + + def __init__(self, node: dict) -> None: + # Node with no size == empty ram slot + super().__init__(node) + self.from_lshw(node) + description = node['description'].upper() + self.format = 'SODIMM' if 'SODIMM' in description else 'DIMM' + self.size = base2.Quantity(node['size'], node['units']).to('MiB').m + # self.size = int(utils.convert_capacity(node['size'], node['units'], 'MB')) + for w in description.split(): + if w.startswith('DDR'): # We assume all DDR are SDRAM + self.interface = w + break + elif w.startswith('SDRAM'): + # Fallback. SDRAM is generic denomination for DDR types. + self.interface = w + if 'clock' in node: + self.speed = unit.Quantity(node['clock'], 'Hz').to('MHz').m + assert not hasattr(self, 'speed') or 100.0 <= self.speed <= 1000000000000.0 + + def __str__(self) -> str: + return '{} {} {}'.format(super().__str__(), self.format, self.size) + + +class GraphicCard(Component): + @classmethod + def new(cls, lshw, hwinfo, **kwargs) -> Iterator[C]: + nodes = get_nested_dicts_with_key_value(lshw, 'class', 'display') + return (cls(n) for n in nodes if n['configuration'].get('driver', None)) + + def __init__(self, node: dict) -> None: + super().__init__(node) + self.from_lshw(node) + self.memory = self._memory(node['businfo'].split('@')[1]) + + @staticmethod + def _memory(bus_info): + """The size of the memory of the gpu.""" + return None + + def __str__(self) -> str: + return '{} with {}'.format(super().__str__(), self.memory) + + +class Motherboard(Component): + INTERFACES = 'usb', 'firewire', 'serial', 'pcmcia' + + @classmethod + def new(cls, lshw, hwinfo, **kwargs) -> C: + node = next(get_nested_dicts_with_key_value(lshw, 'description', 'Motherboard')) + bios_node = next(get_nested_dicts_with_key_value(lshw, 'id', 'firmware')) + # bios_node = '1' + memory_array = next( + getter.indents(hwinfo, 'Physical Memory Array', indent=' '), None + ) + return cls(node, bios_node, memory_array) + + def __init__( + self, node: dict, bios_node: dict, memory_array: Optional[List[str]] + ) -> None: + super().__init__(node) + self.from_lshw(node) + self.usb = self.num_interfaces(node, 'usb') + self.firewire = self.num_interfaces(node, 'firewire') + self.serial = self.num_interfaces(node, 'serial') + self.pcmcia = self.num_interfaces(node, 'pcmcia') + self.slots = int(2) + # run( + # 'dmidecode -t 17 | ' 'grep -o BANK | ' 'wc -l', + # check=True, + # universal_newlines=True, + # shell=True, + # stdout=PIPE, + # ).stdout + + self.bios_date = dateutil.parser.parse(bios_node['date']).isoformat() + self.version = bios_node['version'] + self.ram_slots = self.ram_max_size = None + if memory_array: + self.ram_slots = getter.kv(memory_array, 'Slots', default=None) + self.ram_max_size = getter.kv(memory_array, 'Max. Size', default=None) + if self.ram_max_size: + self.ram_max_size = next(text.numbers(self.ram_max_size)) + + @staticmethod + def num_interfaces(node: dict, interface: str) -> int: + interfaces = get_nested_dicts_with_key_containing_value(node, 'id', interface) + if interface == 'usb': + interfaces = ( + c + for c in interfaces + if 'usbhost' not in c['id'] and 'usb' not in c['businfo'] + ) + return len(tuple(interfaces)) + + def __str__(self) -> str: + return super().__str__() + + +class NetworkAdapter(Component): + @classmethod + def new(cls, lshw, hwinfo, **kwargs) -> Iterator[C]: + nodes = get_nested_dicts_with_key_value(lshw, 'class', 'network') + return (cls(node) for node in nodes) + + def __init__(self, node: dict) -> None: + super().__init__(node) + self.from_lshw(node) + self.speed = None + if 'capacity' in node: + self.speed = unit.Quantity(node['capacity'], 'bit/s').to('Mbit/s').m + if 'logicalname' in node: # todo this was taken from 'self'? + # If we don't have logicalname it means we don't have the + # (proprietary) drivers fot that NetworkAdaptor + # which means we can't access at the MAC address + # (note that S/N == MAC) "sudo /sbin/lspci -vv" could bring + # the MAC even if no drivers are installed however more work + # has to be done in ensuring it is reliable, really needed, + # and to parse it + # https://www.redhat.com/archives/redhat-list/2010-October/msg00066.html + # workbench-live includes proprietary firmwares + self.serial_number = self.serial_number or utils.get_hw_addr( + node['logicalname'] + ) + + self.variant = node.get('version', None) + self.wireless = bool(node.get('configuration', {}).get('wireless', False)) + + def __str__(self) -> str: + return '{} {} {}'.format( + super().__str__(), self.speed, 'wireless' if self.wireless else 'ethernet' + ) + + +class SoundCard(Component): + @classmethod + def new(cls, lshw, hwinfo, **kwargs) -> Iterator[C]: + nodes = get_nested_dicts_with_key_value(lshw, 'class', 'multimedia') + return (cls(node) for node in nodes) + + def __init__(self, node) -> None: + super().__init__(node) + self.from_lshw(node) + + +class Display(Component): + TECHS = 'CRT', 'TFT', 'LED', 'PDP', 'LCD', 'OLED', 'AMOLED' + """Display technologies""" + + @classmethod + def new(cls, lshw, hwinfo, **kwargs) -> Iterator[C]: + for node in getter.indents(hwinfo, 'Monitor'): + yield cls(node) + + def __init__(self, node: dict) -> None: + super().__init__(node) + self.model = getter.kv(node, 'Model') + self.manufacturer = getter.kv(node, 'Vendor') + self.serial_number = getter.kv(node, 'Serial ID', default=None, type=str) + self.resolution_width, self.resolution_height, refresh_rate = text.numbers( + getter.kv(node, 'Resolution') + ) + self.refresh_rate = unit.Quantity(refresh_rate, 'Hz').m + with suppress(StopIteration): + # some monitors can have several resolutions, and the one + # in "Detailed Timings" seems the highest one + timings = next(getter.indents(node, 'Detailed Timings', indent=' ')) + self.resolution_width, self.resolution_height = text.numbers( + getter.kv(timings, 'Resolution') + ) + x, y = ( + unit.convert(v, 'millimeter', 'inch') + for v in text.numbers(getter.kv(node, 'Size')) + ) + self.size = hypot(x, y) + self.technology = next((t for t in self.TECHS if t in node[0]), None) + d = '{} {} 0'.format( + getter.kv(node, 'Year of Manufacture'), + getter.kv(node, 'Week of Manufacture'), + ) + # We assume it has been produced the first day of such week + self.production_date = datetime.strptime(d, '%Y %W %w').isoformat() + self._aspect_ratio = Fraction(self.resolution_width, self.resolution_height) + + def __str__(self) -> str: + return ( + '{0} {1.resolution_width}x{1.resolution_height} {1.size} inches {2}'.format( + super().__str__(), self, self._aspect_ratio + ) + ) + + +class Computer(Device): + CHASSIS_TYPE = { + 'Desktop': { + 'desktop', + 'low-profile', + 'tower', + 'docking', + 'all-in-one', + 'pizzabox', + 'mini-tower', + 'space-saving', + 'lunchbox', + 'mini', + 'stick', + }, + 'Laptop': { + 'portable', + 'laptop', + 'convertible', + 'tablet', + 'detachable', + 'notebook', + 'handheld', + 'sub-notebook', + }, + 'Server': {'server'}, + 'Computer': {'_virtual'}, + } + """ + A translation dictionary whose keys are Devicehub types and values + are possible chassis values that `dmi `_ can offer. + """ + CHASSIS_DH = { + 'Tower': {'desktop', 'low-profile', 'tower', 'server'}, + 'Docking': {'docking'}, + 'AllInOne': {'all-in-one'}, + 'Microtower': {'mini-tower', 'space-saving', 'mini'}, + 'PizzaBox': {'pizzabox'}, + 'Lunchbox': {'lunchbox'}, + 'Stick': {'stick'}, + 'Netbook': {'notebook', 'sub-notebook'}, + 'Handheld': {'handheld'}, + 'Laptop': {'portable', 'laptop'}, + 'Convertible': {'convertible'}, + 'Detachable': {'detachable'}, + 'Tablet': {'tablet'}, + 'Virtual': {'_virtual'}, + } + """ + A conversion table from DMI's chassis type value Devicehub + chassis value. + """ + + COMPONENTS = list(Component.__subclasses__()) # type: List[Type[Component]] + COMPONENTS.remove(Motherboard) + + def __init__(self, node: dict) -> None: + super().__init__(node) + self.from_lshw(node) + chassis = node.get('configuration', {}).get('chassis', '_virtual') + self.type = next( + t for t, values in self.CHASSIS_TYPE.items() if chassis in values + ) + self.chassis = next( + t for t, values in self.CHASSIS_DH.items() if chassis in values + ) + self.sku = getter.dict(node, ('configuration', 'sku'), default=None, type=str) + self.version = getter.dict(node, 'version', default=None, type=str) + self._ram = None + + @classmethod + def run(cls, lshw, hwinfo_raw): + """ + Gets hardware information from the computer and its components, + like serial numbers or model names, and benchmarks them. + + This function uses ``LSHW`` as the main source of hardware information, + which is obtained once when it is instantiated. + """ + hwinfo = hwinfo_raw.splitlines() + computer = cls(lshw) + components = [] + for Component in cls.COMPONENTS: + if Component == Display and computer.type != 'Laptop': + continue # Only get display info when computer is laptop + components.extend(Component.new(lshw=lshw, hwinfo=hwinfo)) + components.append(Motherboard.new(lshw, hwinfo)) + + computer._ram = sum( + ram.size for ram in components if isinstance(ram, RamModule) + ) + return computer, components + + def __str__(self) -> str: + specs = super().__str__() + return '{} with {} MB of RAM.'.format(specs, self._ram) diff --git a/ereuse_devicehub/parser/models.py b/ereuse_devicehub/parser/models.py new file mode 100644 index 00000000..edec89af --- /dev/null +++ b/ereuse_devicehub/parser/models.py @@ -0,0 +1,32 @@ +from citext import CIText +from flask import g +from sqlalchemy import BigInteger, Column, Sequence, SmallInteger +from sqlalchemy.dialects.postgresql import UUID + +from ereuse_devicehub.db import db +from ereuse_devicehub.resources.enums import Severity +from ereuse_devicehub.resources.models import Thing +from ereuse_devicehub.resources.user.models import User + + +class SnapshotErrors(Thing): + """A Snapshot errors.""" + + id = Column(BigInteger, Sequence('snapshot_errors_seq'), primary_key=True) + description = Column(CIText(), default='', nullable=False) + wbid = Column(CIText(), nullable=True) + severity = Column(SmallInteger, default=Severity.Info, nullable=False) + snapshot_uuid = Column(UUID(as_uuid=True), nullable=False) + owner_id = db.Column( + UUID(as_uuid=True), + db.ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) + owner = db.relationship(User, primaryjoin=owner_id == User.id) + + def save(self, commit=False): + db.session.add(self) + + if commit: + db.session.commit() diff --git a/ereuse_devicehub/parser/parser.py b/ereuse_devicehub/parser/parser.py new file mode 100644 index 00000000..fc46d351 --- /dev/null +++ b/ereuse_devicehub/parser/parser.py @@ -0,0 +1,548 @@ +import json +import logging +import uuid + +from dmidecode import DMIParse +from marshmallow import ValidationError + +from ereuse_devicehub.parser import base2 +from ereuse_devicehub.parser.computer import Computer +from ereuse_devicehub.parser.models import SnapshotErrors +from ereuse_devicehub.resources.action.schemas import Snapshot +from ereuse_devicehub.resources.enums import DataStorageInterface, Severity + +logger = logging.getLogger(__name__) + + +class ParseSnapshot: + def __init__(self, snapshot, default="n/a"): + self.default = default + self.dmidecode_raw = snapshot["data"]["dmidecode"] + self.smart_raw = snapshot["data"]["smart"] + self.hwinfo_raw = snapshot["data"]["hwinfo"] + self.device = {"actions": []} + self.components = [] + + self.dmi = DMIParse(self.dmidecode_raw) + self.smart = self.loads(self.smart_raw) + self.hwinfo = self.parse_hwinfo() + + self.set_basic_datas() + self.set_components() + self.snapshot_json = { + "device": self.device, + "software": "Workbench", + "components": self.components, + "uuid": snapshot['uuid'], + "type": snapshot['type'], + "version": "14.0.0", + "endTime": snapshot["timestamp"], + "elapsed": 1, + "wbid": snapshot["wbid"], + } + + def get_snapshot(self): + return Snapshot().load(self.snapshot_json) + + def set_basic_datas(self): + self.device['manufacturer'] = self.dmi.manufacturer() + self.device['model'] = self.dmi.model() + self.device['serialNumber'] = self.dmi.serial_number() + self.device['type'] = self.get_type() + self.device['sku'] = self.get_sku() + self.device['version'] = self.get_version() + self.device['uuid'] = self.get_uuid() + + def set_components(self): + self.get_cpu() + self.get_ram() + self.get_mother_board() + self.get_data_storage() + self.get_networks() + + def get_cpu(self): + # TODO @cayop generation, brand and address not exist in dmidecode + for cpu in self.dmi.get('Processor'): + self.components.append( + { + "actions": [], + "type": "Processor", + "speed": self.get_cpu_speed(cpu), + "cores": int(cpu.get('Core Count', 1)), + "model": cpu.get('Version'), + "threads": int(cpu.get('Thread Count', 1)), + "manufacturer": cpu.get('Manufacturer'), + "serialNumber": cpu.get('Serial Number'), + "generation": cpu.get('Generation'), + "brand": cpu.get('Brand'), + "address": cpu.get('Address'), + } + ) + + def get_ram(self): + # TODO @cayop format and model not exist in dmidecode + for ram in self.dmi.get("Memory Device"): + self.components.append( + { + "actions": [], + "type": "RamModule", + "size": self.get_ram_size(ram), + "speed": self.get_ram_speed(ram), + "manufacturer": ram.get("Manufacturer", self.default), + "serialNumber": ram.get("Serial Number", self.default), + "interface": self.get_ram_type(ram), + "format": self.get_ram_format(ram), + "model": ram.get("Part Number", self.default), + } + ) + + def get_mother_board(self): + # TODO @cayop model, not exist in dmidecode + for moder_board in self.dmi.get("Baseboard"): + self.components.append( + { + "actions": [], + "type": "Motherboard", + "version": moder_board.get("Version"), + "serialNumber": moder_board.get("Serial Number"), + "manufacturer": moder_board.get("Manufacturer"), + "biosDate": self.get_bios_date(), + # "firewire": self.get_firmware(), + "ramMaxSize": self.get_max_ram_size(), + "ramSlots": len(self.dmi.get("Memory Device")), + "slots": self.get_ram_slots(), + "model": moder_board.get("Product Name"), # ?? + "pcmcia": self.get_pcmcia_num(), # ?? + "serial": self.get_serial_num(), # ?? + "usb": self.get_usb_num(), + } + ) + + def get_usb_num(self): + return len( + [u for u in self.dmi.get("Port Connector") if u.get("Port Type") == "USB"] + ) + + def get_serial_num(self): + return len( + [ + u + for u in self.dmi.get("Port Connector") + if u.get("Port Type") == "SERIAL" + ] + ) + + def get_pcmcia_num(self): + return len( + [ + u + for u in self.dmi.get("Port Connector") + if u.get("Port Type") == "PCMCIA" + ] + ) + + def get_bios_date(self): + return self.dmi.get("BIOS")[0].get("Release Date", self.default) + + def get_firmware(self): + return self.dmi.get("BIOS")[0].get("Firmware Revision", '1') + + def get_max_ram_size(self): + size = 0 + for slot in self.dmi.get("Physical Memory Array"): + capacity = slot.get("Maximum Capacity", '0').split(" ")[0] + size += int(capacity) + + return size + + def get_ram_slots(self): + slots = 0 + for x in self.dmi.get("Physical Memory Array"): + slots += int(x.get("Number Of Devices", 0)) + return slots + + def get_ram_size(self, ram): + size = ram.get("Size", "0") + return int(size.split(" ")[0]) + + def get_ram_speed(self, ram): + size = ram.get("Speed", "0") + return int(size.split(" ")[0]) + + def get_ram_type(self, ram): + TYPES = {'ddr', 'sdram', 'sodimm'} + for t in TYPES: + if t in ram.get("Type", "DDR"): + return t + + def get_ram_format(self, ram): + channel = ram.get("Locator", "DIMM") + return 'SODIMM' if 'SODIMM' in channel else 'DIMM' + + def get_cpu_speed(self, cpu): + speed = cpu.get('Max Speed', "0") + return float(speed.split(" ")[0]) / 1024 + + def get_sku(self): + return self.dmi.get("System")[0].get("SKU Number", self.default) + + def get_version(self): + return self.dmi.get("System")[0].get("Version", self.default) + + def get_uuid(self): + return self.dmi.get("System")[0].get("UUID", self.default) + + def get_chassis(self): + return self.dmi.get("Chassis")[0].get("Type", self.default) + + def get_type(self): + chassis_type = self.get_chassis() + return self.translation_to_devicehub(chassis_type) + + def translation_to_devicehub(self, original_type): + lower_type = original_type.lower() + CHASSIS_TYPE = { + 'Desktop': [ + 'desktop', + 'low-profile', + 'tower', + 'docking', + 'all-in-one', + 'pizzabox', + 'mini-tower', + 'space-saving', + 'lunchbox', + 'mini', + 'stick', + ], + 'Laptop': [ + 'portable', + 'laptop', + 'convertible', + 'tablet', + 'detachable', + 'notebook', + 'handheld', + 'sub-notebook', + ], + 'Server': ['server'], + 'Computer': ['_virtual'], + } + for k, v in CHASSIS_TYPE.items(): + if lower_type in v: + return k + return self.default + + def get_data_storage(self): + + for sm in self.smart: + model = sm.get('model_name') + manufacturer = None + if len(model.split(" ")) == 2: + manufacturer, model = model.split(" ") + + self.components.append( + { + "actions": [], + "type": self.get_data_storage_type(sm), + "model": model, + "manufacturer": manufacturer, + "serialNumber": sm.get('serial_number'), + "size": self.get_data_storage_size(sm), + "variant": sm.get("firmware_version"), + "interface": self.get_data_storage_interface(sm), + } + ) + + def get_data_storage_type(self, x): + # TODO @cayop add more SSDS types + SSDS = ["nvme"] + SSD = 'SolidStateDrive' + HDD = 'HardDrive' + type_dev = x.get('device', {}).get('type') + return SSD if type_dev in SSDS else HDD + + def get_data_storage_interface(self, x): + return x.get('device', {}).get('protocol', 'ATA') + + def get_data_storage_size(self, x): + type_dev = x.get('device', {}).get('type') + total_capacity = "{type}_total_capacity".format(type=type_dev) + # convert bytes to Mb + return x.get(total_capacity) / 1024**2 + + def get_networks(self): + hw_class = " Hardware Class: " + mac = " Permanent HW Address: " + model = " Model: " + wireless = "wireless" + + for line in self.hwinfo: + iface = { + "variant": "1", + "actions": [], + "speed": 100.0, + "type": "NetworkAdapter", + "wireless": False, + "manufacturer": "Ethernet", + } + for y in line: + if hw_class in y and not y.split(hw_class)[1] == 'network': + break + + if mac in y: + iface["serialNumber"] = y.split(mac)[1] + if model in y: + iface["model"] = y.split(model)[1] + if wireless in y: + iface["wireless"] = True + + if iface.get("serialNumber"): + self.components.append(iface) + + def parse_hwinfo(self): + hw_blocks = self.hwinfo_raw.split("\n\n") + return [x.split("\n") for x in hw_blocks] + + def loads(self, x): + if isinstance(x, str): + return json.loads(x) + return x + + +class ParseSnapshotLsHw: + def __init__(self, snapshot, default="n/a"): + self.default = default + self.uuid = snapshot.get("uuid") + self.wbid = snapshot.get("wbid") + self.dmidecode_raw = snapshot["data"]["dmidecode"] + self.smart = snapshot["data"]["smart"] + self.hwinfo_raw = snapshot["data"]["hwinfo"] + self.lshw = snapshot["data"]["lshw"] + self.device = {"actions": []} + self.components = [] + self.components_obj = [] + self._errors = [] + + self.dmi = DMIParse(self.dmidecode_raw) + self.hwinfo = self.parse_hwinfo() + + self.set_basic_datas() + self.set_components() + + self.snapshot_json = { + "type": "Snapshot", + "device": self.device, + "software": "Workbench", + "components": self.components, + "uuid": snapshot['uuid'], + "version": "14.0.0", + "endTime": snapshot["timestamp"], + "elapsed": 1, + "wbid": snapshot["wbid"], + } + + def get_snapshot(self): + try: + return Snapshot().load(self.snapshot_json) + except ValidationError as err: + txt = "{}".format(err) + uuid = self.snapshot_json.get('uuid') + wbid = self.snapshot_json.get('wbid') + error = SnapshotErrors( + description=txt, snapshot_uuid=uuid, severity=Severity.Error, wbid=wbid + ) + error.save(commit=True) + raise err + + def parse_hwinfo(self): + hw_blocks = self.hwinfo_raw.split("\n\n") + return [x.split("\n") for x in hw_blocks] + + def loads(self, x): + if isinstance(x, str): + return json.loads(x) + return x + + def set_basic_datas(self): + pc, self.components_obj = Computer.run(self.lshw, self.hwinfo_raw) + self.device = pc.dump() + self.device['uuid'] = self.get_uuid() + + def set_components(self): + memory = None + + for x in self.components_obj: + if x.type == 'RamModule': + memory = 1 + + if x.type == 'Motherboard': + x.slots = self.get_ram_slots() + + self.components.append(x.dump()) + + if not memory: + self.get_ram() + + self.get_data_storage() + + def get_ram(self): + for ram in self.dmi.get("Memory Device"): + self.components.append( + { + "actions": [], + "type": "RamModule", + "size": self.get_ram_size(ram), + "speed": self.get_ram_speed(ram), + "manufacturer": ram.get("Manufacturer", self.default), + "serialNumber": ram.get("Serial Number", self.default), + "interface": self.get_ram_type(ram), + "format": self.get_ram_format(ram), + "model": ram.get("Part Number", self.default), + } + ) + + def get_ram_size(self, ram): + size = ram.get("Size") + if not len(size.split(" ")) == 2: + txt = "Error: Snapshot: {uuid}, tag: {wbid} have this ram Size: {size}".format( + uuid=self.uuid, size=size, wbid=self.wbid + ) + self.errors(txt) + return 128 + size, units = size.split(" ") + return base2.Quantity(float(size), units).to('MiB').m + + def get_ram_speed(self, ram): + speed = ram.get("Speed", "100") + if not len(speed.split(" ")) == 2: + txt = "Error: Snapshot: {uuid}, tag: {wbid} have this ram Speed: {speed}".format( + uuid=self.uuid, speed=speed, wbid=self.wbid + ) + self.errors(txt) + return 100 + speed, units = speed.split(" ") + return float(speed) + # TODO @cayop is neccesary change models for accept sizes more high of speed or change to string + # return base2.Quantity(float(speed), units).to('MHz').m + + def get_ram_slots(self): + slots = 0 + for x in self.dmi.get("Physical Memory Array"): + slots += int(x.get("Number Of Devices", 0)) + return slots + + def get_ram_type(self, ram): + TYPES = {'ddr', 'sdram', 'sodimm'} + for t in TYPES: + if t in ram.get("Type", "DDR"): + return t + + def get_ram_format(self, ram): + channel = ram.get("Locator", "DIMM") + return 'SODIMM' if 'SODIMM' in channel else 'DIMM' + + def get_uuid(self): + dmi_uuid = 'undefined' + if self.dmi.get("System"): + dmi_uuid = self.dmi.get("System")[0].get("UUID") + + try: + uuid.UUID(dmi_uuid) + except (ValueError, AttributeError) as err: + self.errors("{}".format(err)) + txt = "Error: Snapshot: {uuid} tag: {wbid} have this uuid: {device}".format( + uuid=self.uuid, device=dmi_uuid, wbid=self.wbid + ) + self.errors(txt) + dmi_uuid = None + return dmi_uuid + + def get_data_storage(self): + + for sm in self.smart: + model = sm.get('model_name') + manufacturer = None + if model and len(model.split(" ")) > 1: + mm = model.split(" ") + model = mm[-1] + manufacturer = " ".join(mm[:-1]) + + self.components.append( + { + "actions": [self.get_test_data_storage(sm)], + "type": self.get_data_storage_type(sm), + "model": model, + "manufacturer": manufacturer, + "serialNumber": sm.get('serial_number'), + "size": self.get_data_storage_size(sm), + "variant": sm.get("firmware_version"), + "interface": self.get_data_storage_interface(sm), + } + ) + + def get_data_storage_type(self, x): + # TODO @cayop add more SSDS types + SSDS = ["nvme"] + SSD = 'SolidStateDrive' + HDD = 'HardDrive' + type_dev = x.get('device', {}).get('type') + trim = x.get("trim", {}).get("supported") == "true" + return SSD if type_dev in SSDS or trim else HDD + + def get_data_storage_interface(self, x): + interface = x.get('device', {}).get('protocol', 'ATA') + try: + DataStorageInterface(interface.upper()) + except ValueError as err: + txt = "tag: {}, interface {} is not in DataStorageInterface Enum".format( + interface, self.wbid + ) + self.errors("{}".format(err)) + self.errors(txt) + return "ATA" + + def get_data_storage_size(self, x): + type_dev = x.get('device', {}).get('protocol', '').lower() + total_capacity = "{type}_total_capacity".format(type=type_dev) + if not x.get(total_capacity): + return 1 + # convert bytes to Mb + return x.get(total_capacity) / 1024**2 + + def get_test_data_storage(self, smart): + log = "smart_health_information_log" + action = { + "status": "Completed without error", + "reallocatedSectorCount": smart.get("reallocated_sector_count", 0), + "currentPendingSectorCount": smart.get("current_pending_sector_count", 0), + "assessment": True, + "severity": "Info", + "offlineUncorrectable": smart.get("offline_uncorrectable", 0), + "lifetime": 0, + "type": "TestDataStorage", + "length": "Short", + "elapsed": 0, + "reportedUncorrectableErrors": smart.get( + "reported_uncorrectable_errors", 0 + ), + "powerCycleCount": smart.get("power_cycle_count", 0), + } + + for k in smart.keys(): + if log in k: + action['lifetime'] = smart[k].get("power_on_hours", 0) + action['powerOnHours'] = smart[k].get("power_on_hours", 0) + + return action + + def errors(self, txt=None, severity=Severity.Info): + if not txt: + return self._errors + + logger.error(txt) + self._errors.append(txt) + error = SnapshotErrors( + description=txt, snapshot_uuid=self.uuid, severity=severity, wbid=self.wbid + ) + error.save() diff --git a/ereuse_devicehub/parser/schemas.py b/ereuse_devicehub/parser/schemas.py new file mode 100644 index 00000000..f65f9090 --- /dev/null +++ b/ereuse_devicehub/parser/schemas.py @@ -0,0 +1,36 @@ +from flask import current_app as app +from marshmallow import Schema as MarshmallowSchema +from marshmallow import ValidationError, validates_schema +from marshmallow.fields import Dict, List, Nested, String + +from ereuse_devicehub.resources.schemas import Thing + + +class Snapshot_lite_data(MarshmallowSchema): + dmidecode = String(required=False) + hwinfo = String(required=False) + smart = List(Dict(), required=False) + lshw = Dict(required=False) + lspci = String(required=False) + + +class Snapshot_lite(Thing): + uuid = String(required=True) + version = String(required=True) + schema_api = String(required=True) + software = String(required=True) + wbid = String(required=True) + type = String(required=True) + timestamp = String(required=True) + data = Nested(Snapshot_lite_data) + + @validates_schema + def validate_workbench_version(self, data: dict): + if data['schema_api'] not in app.config['WORKBENCH_LITE']: + raise ValidationError( + 'Min. supported Workbench version is ' + '{} but yours is {}.'.format( + app.config['WORKBENCH_LITE'][0], data['version'] + ), + field_names=['version'], + ) diff --git a/ereuse_devicehub/parser/snapshot.py b/ereuse_devicehub/parser/snapshot.py new file mode 100644 index 00000000..559a7f48 --- /dev/null +++ b/ereuse_devicehub/parser/snapshot.py @@ -0,0 +1,38 @@ +from datetime import datetime, timezone +from typing import List + +from ereuse_workbench.computer import Component, Computer, DataStorage +from ereuse_workbench.utils import Dumpeable + + +class Snapshot(Dumpeable): + """ + Generates the Snapshot report for Devicehub by obtaining the + data from the computer, performing benchmarks and tests... + + After instantiating the class, run :meth:`.computer` before any + other method. + """ + + def __init__(self, uuid, software, version, lshw, hwinfo): + self.type = 'Snapshot' + self.uuid = uuid + self.software = software + self.version = version + self.lshw = lshw + self.hwinfo = hwinfo + self.endTime = datetime.now(timezone.utc) + self.closed = False + self.elapsed = None + self.device = None # type: Computer + self.components = None # type: List[Component] + self._storages = None + + def computer(self): + """Retrieves information about the computer and components.""" + self.device, self.components = Computer.run(self.lshw, self.hwinfo) + self._storages = tuple(c for c in self.components if isinstance(c, DataStorage)) + + def close(self): + """Closes the Snapshot""" + self.closed = True diff --git a/ereuse_devicehub/parser/unit_registry/base2.quantities.txt b/ereuse_devicehub/parser/unit_registry/base2.quantities.txt new file mode 100644 index 00000000..2c724a2d --- /dev/null +++ b/ereuse_devicehub/parser/unit_registry/base2.quantities.txt @@ -0,0 +1,4 @@ +K = KiB = k = kb = KB +M = MiB = m = mb = MB +G = GiB = g = gb = GB +T = TiB = t = tb = TB diff --git a/ereuse_devicehub/parser/unit_registry/quantities.txt b/ereuse_devicehub/parser/unit_registry/quantities.txt new file mode 100644 index 00000000..d658ab26 --- /dev/null +++ b/ereuse_devicehub/parser/unit_registry/quantities.txt @@ -0,0 +1,9 @@ +HZ = hertz = hz +KHZ = kilohertz = khz +MHZ = megahertz = mhz +GHZ = gigahertz = ghz +B = byte = b = UNIT = unit +KB = kilobyte = kb = K = k +MB = megabyte = mb = M = m +GB = gigabyte = gb = G = g +T = terabyte = tb = T = t diff --git a/ereuse_devicehub/parser/utils.py b/ereuse_devicehub/parser/utils.py new file mode 100644 index 00000000..e36990fe --- /dev/null +++ b/ereuse_devicehub/parser/utils.py @@ -0,0 +1,38 @@ +import datetime +import fcntl +import socket +import struct +from contextlib import contextmanager +from enum import Enum + +from ereuse_utils import Dumpeable + + +class Severity(Enum): + Info = 'Info' + Error = 'Error' + + +def get_hw_addr(ifname): + # http://stackoverflow.com/a/4789267/1538221 + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) + return ':'.join('%02x' % ord(char) for char in info[18:24]) + + +class Measurable(Dumpeable): + """A base class that allows measuring execution times.""" + + def __init__(self) -> None: + super().__init__() + self.elapsed = None + + @contextmanager + def measure(self): + init = datetime.datetime.now(datetime.timezone.utc) + yield + self.elapsed = datetime.datetime.now(datetime.timezone.utc) - init + try: + assert self.elapsed.total_seconds() > 0 + except AssertionError: + self.elapsed = datetime.timedelta(seconds=0) diff --git a/ereuse_devicehub/resources/action/models.py b/ereuse_devicehub/resources/action/models.py index f9c7a4b0..92805ab5 100644 --- a/ereuse_devicehub/resources/action/models.py +++ b/ereuse_devicehub/resources/action/models.py @@ -14,42 +14,83 @@ import copy from collections import Iterable from contextlib import suppress from datetime import datetime, timedelta, timezone -from decimal import Decimal, ROUND_HALF_EVEN, ROUND_UP +from decimal import ROUND_HALF_EVEN, ROUND_UP, Decimal from typing import Optional, Set, Union from uuid import uuid4 +from dateutil.tz import tzutc import inflection import teal.db from boltons import urlutils from citext import CIText -from flask import current_app as app, g +from flask import current_app as app +from flask import g from sortedcontainers import SortedSet -from sqlalchemy import BigInteger, Boolean, CheckConstraint, Column, Enum as DBEnum, \ - Float, ForeignKey, Integer, Interval, JSON, Numeric, SmallInteger, Unicode, event, orm +from sqlalchemy import JSON, BigInteger, Boolean, CheckConstraint, Column +from sqlalchemy import Enum as DBEnum +from sqlalchemy import ( + Float, + ForeignKey, + Integer, + Interval, + Numeric, + SmallInteger, + Unicode, + event, + orm, +) from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.ext.declarative import declared_attr from sqlalchemy.ext.orderinglist import ordering_list from sqlalchemy.orm import backref, relationship, validates from sqlalchemy.orm.events import AttributeEvents as Events from sqlalchemy.util import OrderedSet -from teal.db import (CASCADE_OWN, INHERIT_COND, IP, POLYMORPHIC_ID, - POLYMORPHIC_ON, StrictVersionType, URL, check_lower, check_range, ResourceNotFound) +from teal.db import ( + CASCADE_OWN, + INHERIT_COND, + IP, + POLYMORPHIC_ID, + POLYMORPHIC_ON, + URL, + ResourceNotFound, + StrictVersionType, + check_lower, + check_range, +) from teal.enums import Country, Currency, Subdivision from teal.marshmallow import ValidationError from teal.resource import url_for_resource from ereuse_devicehub.db import db from ereuse_devicehub.resources.agent.models import Agent -from ereuse_devicehub.resources.device.models import Component, Computer, DataStorage, Desktop, \ - Device, Laptop, Server -from ereuse_devicehub.resources.enums import AppearanceRange, BatteryHealth, BiosAccessRange, \ - ErasureStandards, FunctionalityRange, PhysicalErasureMethod, PriceSoftware, \ - R_NEGATIVE, R_POSITIVE, RatingRange, Severity, SnapshotSoftware, \ - TestDataStorageLength -from ereuse_devicehub.resources.models import STR_SM_SIZE, Thing -from ereuse_devicehub.resources.user.models import User -from ereuse_devicehub.resources.tradedocument.models import TradeDocument from ereuse_devicehub.resources.device.metrics import TradeMetrics +from ereuse_devicehub.resources.device.models import ( + Component, + Computer, + DataStorage, + Desktop, + Device, + Laptop, + Server, +) +from ereuse_devicehub.resources.enums import ( + R_NEGATIVE, + R_POSITIVE, + AppearanceRange, + BatteryHealth, + BiosAccessRange, + ErasureStandards, + FunctionalityRange, + PhysicalErasureMethod, + PriceSoftware, + RatingRange, + Severity, + SnapshotSoftware, + TestDataStorageLength, +) +from ereuse_devicehub.resources.models import STR_SM_SIZE, Thing +from ereuse_devicehub.resources.tradedocument.models import TradeDocument +from ereuse_devicehub.resources.user.models import User class JoinedTableMixin: @@ -59,17 +100,11 @@ class JoinedTableMixin: return Column(UUID(as_uuid=True), ForeignKey(Action.id), primary_key=True) -_sorted_actions = { - 'order_by': lambda: Action.end_time, - 'collection_class': SortedSet -} +_sorted_actions = {'order_by': lambda: Action.end_time, 'collection_class': SortedSet} def sorted_actions_by(data): - return { - 'order_by': lambda: data, - 'collection_class': SortedSet - } + return {'order_by': lambda: data, 'collection_class': SortedSet} """For db.backref, return the actions sorted by end_time.""" @@ -80,6 +115,7 @@ class Action(Thing): This class extends `Schema's Action `_. """ + id = Column(UUID(as_uuid=True), primary_key=True, default=uuid4) type = Column(Unicode, nullable=False) name = Column(CIText(), default='', nullable=False) @@ -108,24 +144,28 @@ class Action(Thing): created is the where the system received the action. """ - snapshot_id = Column(UUID(as_uuid=True), ForeignKey('snapshot.id', - use_alter=True, - name='snapshot_actions')) - snapshot = relationship('Snapshot', - backref=backref('actions', - lazy=True, - cascade=CASCADE_OWN, - **_sorted_actions), - primaryjoin='Action.snapshot_id == Snapshot.id') + snapshot_id = Column( + UUID(as_uuid=True), + ForeignKey('snapshot.id', use_alter=True, name='snapshot_actions'), + ) + snapshot = relationship( + 'Snapshot', + backref=backref('actions', lazy=True, cascade=CASCADE_OWN, **_sorted_actions), + primaryjoin='Action.snapshot_id == Snapshot.id', + ) - author_id = Column(UUID(as_uuid=True), - ForeignKey(User.id), - nullable=False, - default=lambda: g.user.id) + author_id = Column( + UUID(as_uuid=True), + ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) # todo compute the org - author = relationship(User, - backref=backref('authored_actions', lazy=True, collection_class=set), - primaryjoin=author_id == User.id) + author = relationship( + User, + backref=backref('authored_actions', lazy=True, collection_class=set), + primaryjoin=author_id == User.id, + ) author_id.comment = """The user that recorded this action in the system. This does not necessarily has to be the person that produced @@ -133,25 +173,31 @@ class Action(Thing): ``agent``. """ - agent_id = Column(UUID(as_uuid=True), - ForeignKey(Agent.id), - nullable=False, - default=lambda: g.user.individual.id) + agent_id = Column( + UUID(as_uuid=True), + ForeignKey(Agent.id), + nullable=False, + default=lambda: g.user.individual.id, + ) # todo compute the org - agent = relationship(Agent, - backref=backref('actions_agent', lazy=True, **_sorted_actions), - primaryjoin=agent_id == Agent.id) + agent = relationship( + Agent, + backref=backref('actions_agent', lazy=True, **_sorted_actions), + primaryjoin=agent_id == Agent.id, + ) agent_id.comment = """The direct performer or driver of the action. e.g. John wrote a book. It can differ with the user that registered the action in the system, which can be in their behalf. """ - components = relationship(Component, - backref=backref('actions_components', lazy=True, **_sorted_actions), - secondary=lambda: ActionComponent.__table__, - order_by=lambda: Component.id, - collection_class=OrderedSet) + components = relationship( + Component, + backref=backref('actions_components', lazy=True, **_sorted_actions), + secondary=lambda: ActionComponent.__table__, + order_by=lambda: Component.id, + collection_class=OrderedSet, + ) components.comment = """The components that are affected by the action. When performing actions to parent devices their components are @@ -165,9 +211,11 @@ class Action(Thing): that are added or removed. """ parent_id = Column(BigInteger, ForeignKey(Computer.id)) - parent = relationship(Computer, - backref=backref('actions_parent', lazy=True, **_sorted_actions), - primaryjoin=parent_id == Computer.id) + parent = relationship( + Computer, + backref=backref('actions_parent', lazy=True, **_sorted_actions), + primaryjoin=parent_id == Computer.id, + ) parent_id.comment = """For actions that are performed to components, the device parent at that time. @@ -178,7 +226,7 @@ class Action(Thing): __table_args__ = ( db.Index('ix_id', id, postgresql_using='hash'), db.Index('ix_type', type, postgresql_using='hash'), - db.Index('ix_parent_id', parent_id, postgresql_using='hash') + db.Index('ix_parent_id', parent_id, postgresql_using='hash'), ) @property @@ -226,7 +274,7 @@ class Action(Thing): super().__init__(**kwargs) def __lt__(self, other): - return self.end_time < other.end_time + return self.end_time.replace(tzinfo=tzutc()) < other.end_time.replace(tzinfo=tzutc()) def __str__(self) -> str: return '{}'.format(self.severity) @@ -244,17 +292,20 @@ class JoinedWithOneDeviceMixin: # noinspection PyMethodParameters @declared_attr def id(cls): - return Column(UUID(as_uuid=True), ForeignKey(ActionWithOneDevice.id), primary_key=True) + return Column( + UUID(as_uuid=True), ForeignKey(ActionWithOneDevice.id), primary_key=True + ) class ActionWithOneDevice(JoinedTableMixin, Action): device_id = Column(BigInteger, ForeignKey(Device.id), nullable=False) - device = relationship(Device, - backref=backref('actions_one', - lazy=True, - cascade=CASCADE_OWN, - **_sorted_actions), - primaryjoin=Device.id == device_id) + device = relationship( + Device, + backref=backref( + 'actions_one', lazy=True, cascade=CASCADE_OWN, **_sorted_actions + ), + primaryjoin=Device.id == device_id, + ) __table_args__ = ( db.Index('action_one_device_id_index', device_id, postgresql_using='hash'), @@ -278,11 +329,13 @@ class ActionWithOneDevice(JoinedTableMixin, Action): class ActionWithMultipleDevices(Action): - devices = relationship(Device, - backref=backref('actions_multiple', lazy=True, **_sorted_actions), - secondary=lambda: ActionDevice.__table__, - order_by=lambda: Device.id, - collection_class=OrderedSet) + devices = relationship( + Device, + backref=backref('actions_multiple', lazy=True, **_sorted_actions), + secondary=lambda: ActionDevice.__table__, + order_by=lambda: Device.id, + collection_class=OrderedSet, + ) def __repr__(self) -> str: return '<{0.t} {0.id} {0.severity} devices={0.devices!r}>'.format(self) @@ -290,29 +343,38 @@ class ActionWithMultipleDevices(Action): class ActionDevice(db.Model): device_id = Column(BigInteger, ForeignKey(Device.id), primary_key=True) - action_id = Column(UUID(as_uuid=True), ForeignKey(ActionWithMultipleDevices.id), - primary_key=True) - device = relationship(Device, - backref=backref('actions_device', - lazy=True), - primaryjoin=Device.id == device_id) - action = relationship(Action, - backref=backref('actions_device', - lazy=True), - primaryjoin=Action.id == action_id) - created = db.Column(db.TIMESTAMP(timezone=True), - nullable=False, - index=True, - server_default=db.text('CURRENT_TIMESTAMP')) + action_id = Column( + UUID(as_uuid=True), ForeignKey(ActionWithMultipleDevices.id), primary_key=True + ) + device = relationship( + Device, + backref=backref('actions_device', lazy=True), + primaryjoin=Device.id == device_id, + ) + action = relationship( + Action, + backref=backref('actions_device', lazy=True), + primaryjoin=Action.id == action_id, + ) + created = db.Column( + db.TIMESTAMP(timezone=True), + nullable=False, + index=True, + server_default=db.text('CURRENT_TIMESTAMP'), + ) created.comment = """When Devicehub created this.""" - author_id = Column(UUID(as_uuid=True), - ForeignKey(User.id), - nullable=False, - default=lambda: g.user.id) + author_id = Column( + UUID(as_uuid=True), + ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) # todo compute the org - author = relationship(User, - backref=backref('authored_actions_device', lazy=True, collection_class=set), - primaryjoin=author_id == User.id) + author = relationship( + User, + backref=backref('authored_actions_device', lazy=True, collection_class=set), + primaryjoin=author_id == User.id, + ) def __init__(self, **kwargs) -> None: self.created = kwargs.get('created', datetime.now(timezone.utc)) @@ -320,17 +382,22 @@ class ActionDevice(db.Model): class ActionWithMultipleTradeDocuments(ActionWithMultipleDevices): - documents = relationship(TradeDocument, - backref=backref('actions_docs', lazy=True, **_sorted_actions), - secondary=lambda: ActionTradeDocument.__table__, - order_by=lambda: TradeDocument.id, - collection_class=OrderedSet) + documents = relationship( + TradeDocument, + backref=backref('actions_docs', lazy=True, **_sorted_actions), + secondary=lambda: ActionTradeDocument.__table__, + order_by=lambda: TradeDocument.id, + collection_class=OrderedSet, + ) class ActionTradeDocument(db.Model): document_id = Column(BigInteger, ForeignKey(TradeDocument.id), primary_key=True) - action_id = Column(UUID(as_uuid=True), ForeignKey(ActionWithMultipleTradeDocuments.id), - primary_key=True) + action_id = Column( + UUID(as_uuid=True), + ForeignKey(ActionWithMultipleTradeDocuments.id), + primary_key=True, + ) class Add(ActionWithOneDevice): @@ -350,21 +417,25 @@ class Remove(ActionWithOneDevice): class Allocate(JoinedTableMixin, ActionWithMultipleDevices): - """The act of allocate one list of devices to one person - """ + """The act of allocate one list of devices to one person""" + final_user_code = Column(CIText(), default='', nullable=True) final_user_code.comment = """This is a internal code for mainteing the secrets of the personal datas of the new holder""" transaction = Column(CIText(), default='', nullable=True) - transaction.comment = "The code used from the owner for relation with external tool." + transaction.comment = ( + "The code used from the owner for relation with external tool." + ) end_users = Column(Numeric(precision=4), check_range('end_users', 0), nullable=True) class Deallocate(JoinedTableMixin, ActionWithMultipleDevices): - """The act of deallocate one list of devices to one person of the system or not - """ - transaction= Column(CIText(), default='', nullable=True) - transaction.comment = "The code used from the owner for relation with external tool." + """The act of deallocate one list of devices to one person of the system or not""" + + transaction = Column(CIText(), default='', nullable=True) + transaction.comment = ( + "The code used from the owner for relation with external tool." + ) class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice): @@ -387,6 +458,7 @@ class EraseBasic(JoinedWithOneDeviceMixin, ActionWithOneDevice): Devicehub automatically shows the standards that each erasure follows. """ + method = 'Shred' """The method or software used to destroy the data.""" @@ -427,32 +499,43 @@ class EraseSectors(EraseBasic): """A secured-way of erasing data storages, checking sector-by-sector the erasure, using `badblocks `_. """ + method = 'Badblocks' class ErasePhysical(EraseBasic): """The act of physically destroying a data storage unit.""" + method = Column(DBEnum(PhysicalErasureMethod)) class Step(db.Model): - erasure_id = Column(UUID(as_uuid=True), - ForeignKey(EraseBasic.id, ondelete='CASCADE'), - primary_key=True) + erasure_id = Column( + UUID(as_uuid=True), + ForeignKey(EraseBasic.id, ondelete='CASCADE'), + primary_key=True, + ) type = Column(Unicode(STR_SM_SIZE), nullable=False) num = Column(SmallInteger, primary_key=True) severity = Column(teal.db.IntEnum(Severity), default=Severity.Info, nullable=False) start_time = Column(db.TIMESTAMP(timezone=True), nullable=False) start_time.comment = Action.start_time.comment - end_time = Column(db.TIMESTAMP(timezone=True), CheckConstraint('end_time > start_time'), - nullable=False) + end_time = Column( + db.TIMESTAMP(timezone=True), + CheckConstraint('end_time > start_time'), + nullable=False, + ) end_time.comment = Action.end_time.comment - erasure = relationship(EraseBasic, - backref=backref('steps', - cascade=CASCADE_OWN, - order_by=num, - collection_class=ordering_list('num'))) + erasure = relationship( + EraseBasic, + backref=backref( + 'steps', + cascade=CASCADE_OWN, + order_by=num, + collection_class=ordering_list('num'), + ), + ) @property def elapsed(self): @@ -573,6 +656,7 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice): the actions in an ``actions`` property inside each affected ``component`` or ``device``. """ + uuid = Column(UUID(as_uuid=True), unique=True) version = Column(StrictVersionType(STR_SM_SIZE), nullable=False) software = Column(DBEnum(SnapshotSoftware), nullable=False) @@ -580,6 +664,7 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice): elapsed.comment = """For Snapshots made with Workbench, the total amount of time it took to complete. """ + wbid = Column(CIText(), nullable=True) def get_last_lifetimes(self): """We get the lifetime and serial_number of the first disk""" @@ -597,7 +682,7 @@ class Snapshot(JoinedWithOneDeviceMixin, ActionWithOneDevice): continue if not act.lifetime: continue - data['lifetime'] = act.lifetime.total_seconds()/3600 + data['lifetime'] = act.lifetime.total_seconds() / 3600 break hdds.append(data) @@ -611,6 +696,7 @@ class Install(JoinedWithOneDeviceMixin, ActionWithOneDevice): """The action of installing an Operative System to a data storage unit. """ + elapsed = Column(Interval, nullable=False) address = Column(SmallInteger, check_range('address', 8, 256)) @@ -618,15 +704,15 @@ class Install(JoinedWithOneDeviceMixin, ActionWithOneDevice): class SnapshotRequest(db.Model): id = Column(UUID(as_uuid=True), ForeignKey(Snapshot.id), primary_key=True) request = Column(JSON, nullable=False) - snapshot = relationship(Snapshot, - backref=backref('request', - lazy=True, - uselist=False, - cascade=CASCADE_OWN)) + snapshot = relationship( + Snapshot, + backref=backref('request', lazy=True, uselist=False, cascade=CASCADE_OWN), + ) class Benchmark(JoinedWithOneDeviceMixin, ActionWithOneDevice): """The act of gauging the performance of a device.""" + elapsed = Column(Interval) @declared_attr @@ -652,17 +738,20 @@ class BenchmarkMixin: class BenchmarkDataStorage(Benchmark): """Benchmarks the data storage unit reading and writing speeds.""" + id = Column(UUID(as_uuid=True), ForeignKey(Benchmark.id), primary_key=True) read_speed = Column(Float(decimal_return_scale=2), nullable=False) write_speed = Column(Float(decimal_return_scale=2), nullable=False) def __str__(self) -> str: return 'Read: {0:.2f} MB/s, write: {0:.2f} MB/s'.format( - self.read_speed, self.write_speed) + self.read_speed, self.write_speed + ) class BenchmarkWithRate(Benchmark): """The act of benchmarking a device with a single rate.""" + id = Column(UUID(as_uuid=True), ForeignKey(Benchmark.id), primary_key=True) rate = Column(Float, nullable=False) @@ -676,6 +765,7 @@ class BenchmarkProcessor(BenchmarkWithRate): a reliable way of rating processors and we keep it for compatibility purposes. """ + pass @@ -683,6 +773,7 @@ class BenchmarkProcessorSysbench(BenchmarkProcessor): """Benchmarks a processor by using the processor benchmarking utility of `sysbench `_. """ + pass @@ -690,6 +781,7 @@ class BenchmarkRamSysbench(BenchmarkWithRate): """Benchmarks a RAM by using the ram benchmarking utility of `sysbench `_. """ + pass @@ -742,6 +834,7 @@ class MeasureBattery(TestMixin, Test): * :attr:`Severity.Error`: whether the health are Dead, Overheat or OverVoltage. * :attr:`Severity.Warning`: whether the health are UnspecifiedValue or Cold. """ + size = db.Column(db.Integer, nullable=False) size.comment = """Maximum battery capacity, in mAh.""" voltage = db.Column(db.Integer, nullable=False) @@ -773,6 +866,7 @@ class TestDataStorage(TestMixin, Test): * :attr:`Severity.Warning`: if there is a significant chance for the data storage to fail in the following year. """ + length = Column(DBEnum(TestDataStorageLength), nullable=False) # todo from type status = Column(Unicode(), check_lower('status'), nullable=False) lifetime = Column(Interval) @@ -797,8 +891,12 @@ class TestDataStorage(TestMixin, Test): # Test finished successfully if not self.assessment: self.severity = Severity.Error - elif self.current_pending_sector_count and self.current_pending_sector_count > 40 \ - or self.reallocated_sector_count and self.reallocated_sector_count > 10: + elif ( + self.current_pending_sector_count + and self.current_pending_sector_count > 40 + or self.reallocated_sector_count + and self.reallocated_sector_count > 10 + ): self.severity = Severity.Warning def __str__(self) -> str: @@ -816,7 +914,7 @@ class TestDataStorage(TestMixin, Test): def power_on_hours(self): if not self.lifetime: return 0 - return int(self.lifetime.total_seconds()/3600) + return int(self.lifetime.total_seconds() / 3600) @reported_uncorrectable_errors.setter def reported_uncorrectable_errors(self, value): @@ -834,6 +932,7 @@ class StressTest(TestMixin, Test): * :attr:`Severity.Error`: whether failed StressTest. * :attr:`Severity.Warning`: if stress test are less than 5 minutes. """ + elapsed = Column(Interval, nullable=False) @validates('elapsed') @@ -855,6 +954,7 @@ class TestAudio(TestMixin, Test): * :attr:`Severity.Error`: whether speaker or microphone variables fail. * :attr:`Severity.Warning`: . """ + _speaker = Column('speaker', Boolean) _speaker.comment = """Whether the speaker works as expected.""" _microphone = Column('microphone', Boolean) @@ -953,6 +1053,7 @@ class TestBios(TestMixin, Test): * :attr:`Severity.Error`: whether Bios beeps or access range is D or E. * :attr:`Severity.Warning`: whether access range is B or C. """ + beeps_power_on = Column(Boolean) beeps_power_on.comment = """Whether there are no beeps or error codes when booting up. @@ -985,6 +1086,7 @@ class VisualTest(TestMixin, Test): * :attr:`Severity.Info`: whether appearance range is B or A and functionality range is A. """ + appearance_range = Column(DBEnum(AppearanceRange), nullable=True) appearance_range.comment = AppearanceRange.__doc__ functionality_range = Column(DBEnum(FunctionalityRange), nullable=True) @@ -994,8 +1096,7 @@ class VisualTest(TestMixin, Test): def __str__(self) -> str: return super().__str__() + '. Appearance {} and functionality {}'.format( - self.appearance_range, - self.functionality_range + self.appearance_range, self.functionality_range ) @@ -1006,22 +1107,29 @@ class Rate(JoinedWithOneDeviceMixin, ActionWithOneDevice): * Appearance (A). Visual evaluation, surface deterioration. * Performance (Q). Components characteristics and components benchmarks. """ + N = 2 """The number of significant digits for rates. Values are rounded and stored to it. """ - _rating = Column('rating', Float(decimal_return_scale=N), check_range('rating', *R_POSITIVE)) + _rating = Column( + 'rating', Float(decimal_return_scale=N), check_range('rating', *R_POSITIVE) + ) _rating.comment = """The rating for the content.""" version = Column(StrictVersionType) version.comment = """The version of the software.""" - _appearance = Column('appearance', - Float(decimal_return_scale=N), - check_range('appearance', *R_NEGATIVE)) + _appearance = Column( + 'appearance', + Float(decimal_return_scale=N), + check_range('appearance', *R_NEGATIVE), + ) _appearance.comment = """Subjective value representing aesthetic aspects.""" - _functionality = Column('functionality', - Float(decimal_return_scale=N), - check_range('functionality', *R_NEGATIVE)) + _functionality = Column( + 'functionality', + Float(decimal_return_scale=N), + check_range('functionality', *R_NEGATIVE), + ) _functionality.comment = """Subjective value representing usage aspects.""" @property @@ -1088,19 +1196,28 @@ class RateComputer(RateMixin, Rate): It's the starting point for calculating the rate. Algorithm explained in v1.0 file. """ - _processor = Column('processor', - Float(decimal_return_scale=Rate.N), - check_range('processor', *R_POSITIVE)) + + _processor = Column( + 'processor', + Float(decimal_return_scale=Rate.N), + check_range('processor', *R_POSITIVE), + ) _processor.comment = """The rate of the Processor.""" - _ram = Column('ram', Float(decimal_return_scale=Rate.N), check_range('ram', *R_POSITIVE)) + _ram = Column( + 'ram', Float(decimal_return_scale=Rate.N), check_range('ram', *R_POSITIVE) + ) _ram.comment = """The rate of the RAM.""" - _data_storage = Column('data_storage', - Float(decimal_return_scale=Rate.N), - check_range('data_storage', *R_POSITIVE)) + _data_storage = Column( + 'data_storage', + Float(decimal_return_scale=Rate.N), + check_range('data_storage', *R_POSITIVE), + ) _data_storage.comment = """'Data storage rate, like HHD, SSD.'""" - _graphic_card = Column('graphic_card', - Float(decimal_return_scale=Rate.N), - check_range('graphic_card', *R_POSITIVE)) + _graphic_card = Column( + 'graphic_card', + Float(decimal_return_scale=Rate.N), + check_range('graphic_card', *R_POSITIVE), + ) _graphic_card.comment = 'Graphic card rate.' @property @@ -1155,9 +1272,12 @@ class RateComputer(RateMixin, Rate): def compute(cls, device): """The act of compute general computer rate.""" from ereuse_devicehub.resources.action.rate.v1_0 import rate_algorithm + rate = rate_algorithm.compute(device) price = None - with suppress(InvalidRangeForPrice): # We will have exception if range == VERY_LOW + with suppress( + InvalidRangeForPrice + ): # We will have exception if range == VERY_LOW price = EreusePrice(rate) return rate, price @@ -1179,7 +1299,9 @@ class Price(JoinedWithOneDeviceMixin, ActionWithOneDevice): ROUND = ROUND_HALF_EVEN currency = Column(DBEnum(Currency), nullable=False) currency.comment = """The currency of this price as for ISO 4217.""" - price = Column(Numeric(precision=19, scale=SCALE), check_range('price', 0), nullable=False) + price = Column( + Numeric(precision=19, scale=SCALE), check_range('price', 0), nullable=False + ) price.comment = """The value.""" software = Column(DBEnum(PriceSoftware)) software.comment = """The software used to compute this price, @@ -1192,18 +1314,20 @@ class Price(JoinedWithOneDeviceMixin, ActionWithOneDevice): rating_id.comment = """The Rate used to auto-compute this price, if it has not been set manually. """ - rating = relationship(Rate, - backref=backref('price', - lazy=True, - cascade=CASCADE_OWN, - uselist=False), - primaryjoin=Rate.id == rating_id) + rating = relationship( + Rate, + backref=backref('price', lazy=True, cascade=CASCADE_OWN, uselist=False), + primaryjoin=Rate.id == rating_id, + ) def __init__(self, *args, **kwargs) -> None: if 'price' in kwargs: assert isinstance(kwargs['price'], Decimal), 'Price must be a Decimal' - super().__init__(currency=kwargs.pop('currency', app.config['PRICE_CURRENCY']), *args, - **kwargs) + super().__init__( + currency=kwargs.pop('currency', app.config['PRICE_CURRENCY']), + *args, + **kwargs, + ) @classmethod def to_price(cls, value: Union[Decimal, float], rounding=ROUND) -> Decimal: @@ -1238,12 +1362,8 @@ class EreusePrice(Price): (represented by its last :class:`.Rate`) multiplied by a constants value agreed by a circuit or platform. """ - MULTIPLIER = { - Computer: 20, - Desktop: 20, - Laptop: 30, - Server: 40 - } + + MULTIPLIER = {Computer: 20, Desktop: 20, Laptop: 30, Server: 40} class Type: def __init__(self, percentage: float, price: Decimal) -> None: @@ -1259,11 +1379,11 @@ class EreusePrice(Price): Desktop: { RatingRange.HIGH: { STANDARD: (0.35125, 0.204375, 0.444375), - WARRANTY2: (0.47425, 0.275875, 0.599875) + WARRANTY2: (0.47425, 0.275875, 0.599875), }, RatingRange.MEDIUM: { STANDARD: (0.385, 0.2558333333, 0.3591666667), - WARRANTY2: (0.539, 0.3581666667, 0.5028333333) + WARRANTY2: (0.539, 0.3581666667, 0.5028333333), }, RatingRange.LOW: { STANDARD: (0.5025, 0.30875, 0.18875), @@ -1272,16 +1392,16 @@ class EreusePrice(Price): Laptop: { RatingRange.HIGH: { STANDARD: (0.3469230769, 0.195, 0.4580769231), - WARRANTY2: (0.4522307692, 0.2632307692, 0.6345384615) + WARRANTY2: (0.4522307692, 0.2632307692, 0.6345384615), }, RatingRange.MEDIUM: { STANDARD: (0.382, 0.1735, 0.4445), - WARRANTY2: (0.5108, 0.2429, 0.6463) + WARRANTY2: (0.5108, 0.2429, 0.6463), }, RatingRange.LOW: { STANDARD: (0.4528571429, 0.2264285714, 0.3207142857), - } - } + }, + }, } SCHEMA[Server] = SCHEMA[Computer] = SCHEMA[Desktop] @@ -1296,13 +1416,17 @@ class EreusePrice(Price): if not rating.rating_range or rating.rating_range == RatingRange.VERY_LOW: raise InvalidRangeForPrice() # We pass ROUND_UP strategy so price is always greater than what refurbisher... amounts - price = self.to_price(rating.rating * self.MULTIPLIER[rating.device.__class__], ROUND_UP) - super().__init__(rating=rating, - device=rating.device, - price=price, - software=kwargs.pop('software', app.config['PRICE_SOFTWARE']), - version=kwargs.pop('version', app.config['PRICE_VERSION']), - **kwargs) + price = self.to_price( + rating.rating * self.MULTIPLIER[rating.device.__class__], ROUND_UP + ) + super().__init__( + rating=rating, + device=rating.device, + price=price, + software=kwargs.pop('software', app.config['PRICE_SOFTWARE']), + version=kwargs.pop('version', app.config['PRICE_VERSION']), + **kwargs, + ) self._compute() @orm.reconstructor @@ -1314,9 +1438,12 @@ class EreusePrice(Price): self.retailer = self._service(self.Service.RETAILER) self.platform = self._service(self.Service.PLATFORM) if hasattr(self.refurbisher, 'warranty2'): - self.warranty2 = round(self.refurbisher.warranty2.amount - + self.retailer.warranty2.amount - + self.platform.warranty2.amount, 2) + self.warranty2 = round( + self.refurbisher.warranty2.amount + + self.retailer.warranty2.amount + + self.platform.warranty2.amount, + 2, + ) def _service(self, role): return self.Service(self.device, self.rating.rating_range, role, self.price) @@ -1353,42 +1480,47 @@ class ToPrepare(ActionWithMultipleDevices): Usually **ToPrepare** is the next action done after registering the device. """ + pass class DataWipe(JoinedTableMixin, ActionWithMultipleDevices): - """The device has been selected for insert one proof of erease disk. - """ + """The device has been selected for insert one proof of erease disk.""" + document_comment = """The user that gets the device due this deal.""" - document_id = db.Column(BigInteger, - db.ForeignKey('data_wipe_document.id'), - nullable=False) - document = db.relationship('DataWipeDocument', - backref=backref('actions', - lazy=True, - cascade=CASCADE_OWN), - primaryjoin='DataWipe.document_id == DataWipeDocument.id') + document_id = db.Column( + BigInteger, db.ForeignKey('data_wipe_document.id'), nullable=False + ) + document = db.relationship( + 'DataWipeDocument', + backref=backref('actions', lazy=True, cascade=CASCADE_OWN), + primaryjoin='DataWipe.document_id == DataWipeDocument.id', + ) class ActionStatus(JoinedTableMixin, ActionWithMultipleTradeDocuments): """This is a meta-action than mark the status of the devices""" - rol_user_id = db.Column(UUID(as_uuid=True), - db.ForeignKey(User.id), - nullable=False, - default=lambda: g.user.id) + rol_user_id = db.Column( + UUID(as_uuid=True), + db.ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) rol_user = db.relationship(User, primaryjoin=rol_user_id == User.id) rol_user_comment = """The user that .""" - trade_id = db.Column(UUID(as_uuid=True), - db.ForeignKey('trade.id'), - nullable=True) - trade = db.relationship('Trade', - backref=backref('status_changes', - uselist=True, - lazy=True, - order_by=lambda: Action.end_time, - collection_class=list), - primaryjoin='ActionStatus.trade_id == Trade.id') + trade_id = db.Column(UUID(as_uuid=True), db.ForeignKey('trade.id'), nullable=True) + trade = db.relationship( + 'Trade', + backref=backref( + 'status_changes', + uselist=True, + lazy=True, + order_by=lambda: Action.end_time, + collection_class=list, + ), + primaryjoin='ActionStatus.trade_id == Trade.id', + ) class Recycling(ActionStatus): @@ -1422,6 +1554,7 @@ class Live(JoinedWithOneDeviceMixin, ActionWithOneDevice): information about its state (in the form of a ``Snapshot`` action) and usage statistics. """ + serial_number = Column(Unicode(), check_lower('serial_number')) serial_number.comment = """The serial number of the Hard Disk in lower case.""" usage_time_hdd = Column(Interval, nullable=True) @@ -1432,7 +1565,7 @@ class Live(JoinedWithOneDeviceMixin, ActionWithOneDevice): @property def final_user_code(self): - """ show the final_user_code of the last action Allocate.""" + """show the final_user_code of the last action Allocate.""" actions = self.device.actions actions.sort(key=lambda x: x.created) for e in reversed(actions): @@ -1463,7 +1596,7 @@ class Live(JoinedWithOneDeviceMixin, ActionWithOneDevice): def last_usage_time_allocate(self): """If we don't have self.usage_time_hdd then we need search the last - action Live with usage_time_allocate valid""" + action Live with usage_time_allocate valid""" for e in self.actions: if isinstance(e, Live) and e.created < self.created: if not e.usage_time_allocate: @@ -1504,7 +1637,10 @@ class Live(JoinedWithOneDeviceMixin, ActionWithOneDevice): def get_last_lifetime(self, snapshot): for a in snapshot.actions: - if a.type == 'TestDataStorage' and a.device.serial_number == self.serial_number: + if ( + a.type == 'TestDataStorage' + and a.device.serial_number == self.serial_number + ): return a.lifetime return None @@ -1530,10 +1666,13 @@ class CancelReservation(Organize): class ActionStatusDocuments(JoinedTableMixin, ActionWithMultipleTradeDocuments): """This is a meta-action that marks the state of the devices.""" - rol_user_id = db.Column(UUID(as_uuid=True), - db.ForeignKey(User.id), - nullable=False, - default=lambda: g.user.id) + + rol_user_id = db.Column( + UUID(as_uuid=True), + db.ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) rol_user = db.relationship(User, primaryjoin=rol_user_id == User.id) rol_user_comment = """The user that .""" @@ -1544,31 +1683,40 @@ class RecyclingDocument(ActionStatusDocuments): class ConfirmDocument(JoinedTableMixin, ActionWithMultipleTradeDocuments): """Users confirm the one action trade this confirmation it's link to trade - and the document that confirm + and the document that confirm """ - user_id = db.Column(UUID(as_uuid=True), - db.ForeignKey(User.id), - nullable=False, - default=lambda: g.user.id) + + user_id = db.Column( + UUID(as_uuid=True), + db.ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) user = db.relationship(User, primaryjoin=user_id == User.id) user_comment = """The user that accept the offer.""" - action_id = db.Column(UUID(as_uuid=True), - db.ForeignKey('action.id'), - nullable=False) - action = db.relationship('Action', - backref=backref('acceptances_document', - uselist=True, - lazy=True, - order_by=lambda: Action.end_time, - collection_class=list), - primaryjoin='ConfirmDocument.action_id == Action.id') + action_id = db.Column( + UUID(as_uuid=True), db.ForeignKey('action.id'), nullable=False + ) + action = db.relationship( + 'Action', + backref=backref( + 'acceptances_document', + uselist=True, + lazy=True, + order_by=lambda: Action.end_time, + collection_class=list, + ), + primaryjoin='ConfirmDocument.action_id == Action.id', + ) def __repr__(self) -> str: if self.action.t in ['Trade']: origin = 'To' if self.user == self.action.user_from: origin = 'From' - return '<{0.t}app/views/inventory/ {0.id} accepted by {1}>'.format(self, origin) + return '<{0.t}app/views/inventory/ {0.id} accepted by {1}>'.format( + self, origin + ) class RevokeDocument(ConfirmDocument): @@ -1581,24 +1729,31 @@ class ConfirmRevokeDocument(ConfirmDocument): class Confirm(JoinedTableMixin, ActionWithMultipleDevices): """Users confirm the one action trade this confirmation it's link to trade - and the devices that confirm + and the devices that confirm """ - user_id = db.Column(UUID(as_uuid=True), - db.ForeignKey(User.id), - nullable=False, - default=lambda: g.user.id) + + user_id = db.Column( + UUID(as_uuid=True), + db.ForeignKey(User.id), + nullable=False, + default=lambda: g.user.id, + ) user = db.relationship(User, primaryjoin=user_id == User.id) user_comment = """The user that accept the offer.""" - action_id = db.Column(UUID(as_uuid=True), - db.ForeignKey('action.id'), - nullable=False) - action = db.relationship('Action', - backref=backref('acceptances', - uselist=True, - lazy=True, - order_by=lambda: Action.end_time, - collection_class=list), - primaryjoin='Confirm.action_id == Action.id') + action_id = db.Column( + UUID(as_uuid=True), db.ForeignKey('action.id'), nullable=False + ) + action = db.relationship( + 'Action', + backref=backref( + 'acceptances', + uselist=True, + lazy=True, + order_by=lambda: Action.end_time, + collection_class=list, + ), + primaryjoin='Confirm.action_id == Action.id', + ) def __repr__(self) -> str: if self.action.t in ['Trade']: @@ -1631,15 +1786,12 @@ class Trade(JoinedTableMixin, ActionWithMultipleTradeDocuments): This class and its inheritors extend `Schema's Trade `_. - """ - user_from_id = db.Column(UUID(as_uuid=True), - db.ForeignKey(User.id), - nullable=False) + """ + + user_from_id = db.Column(UUID(as_uuid=True), db.ForeignKey(User.id), nullable=False) user_from = db.relationship(User, primaryjoin=user_from_id == User.id) user_from_comment = """The user that offers the device due this deal.""" - user_to_id = db.Column(UUID(as_uuid=True), - db.ForeignKey(User.id), - nullable=False) + user_to_id = db.Column(UUID(as_uuid=True), db.ForeignKey(User.id), nullable=False) user_to = db.relationship(User, primaryjoin=user_to_id == User.id) user_to_comment = """The user that gets the device due this deal.""" price = Column(Float(decimal_return_scale=2), nullable=True) @@ -1647,20 +1799,23 @@ class Trade(JoinedTableMixin, ActionWithMultipleTradeDocuments): currency.comment = """The currency of this price as for ISO 4217.""" date = Column(db.TIMESTAMP(timezone=True)) confirm = Column(Boolean, default=False, nullable=False) - confirm.comment = """If you need confirmation of the user, you need actevate this field""" + confirm.comment = ( + """If you need confirmation of the user, you need actevate this field""" + ) code = Column(CIText(), nullable=True) - code.comment = """If the user not exist, you need a code to be able to do the traceability""" - lot_id = db.Column(UUID(as_uuid=True), - db.ForeignKey('lot.id', - use_alter=True, - name='lot_trade'), - nullable=True) - lot = relationship('Lot', - backref=backref('trade', - lazy=True, - uselist=False, - cascade=CASCADE_OWN), - primaryjoin='Trade.lot_id == Lot.id') + code.comment = ( + """If the user not exist, you need a code to be able to do the traceability""" + ) + lot_id = db.Column( + UUID(as_uuid=True), + db.ForeignKey('lot.id', use_alter=True, name='lot_trade'), + nullable=True, + ) + lot = relationship( + 'Lot', + backref=backref('trade', lazy=True, uselist=False, cascade=CASCADE_OWN), + primaryjoin='Trade.lot_id == Lot.id', + ) def get_metrics(self): """ @@ -1696,6 +1851,7 @@ class Rent(Trade): class CancelTrade(Trade): """The act of cancelling a `Sell`_, `Donate`_ or `Rent`_.""" + # todo cancelTrade does not do anything @@ -1704,6 +1860,7 @@ class ToDisposeProduct(Trade): See :class:`.DisposeProduct`. """ + # todo test this @@ -1717,6 +1874,7 @@ class DisposeProduct(Trade): and :class:`.Recover` for disposing in-house, this is, without trading the device. """ + # todo For usability purposes, users might not directly perform # *DisposeProduct*, but this could automatically be done when # performing :class:`.ToDispose` + :class:`.Receive` to a @@ -1724,11 +1882,12 @@ class DisposeProduct(Trade): class TransferOwnershipBlockchain(Trade): - """ The act of change owenership of devices between two users (ethereum address)""" + """The act of change owenership of devices between two users (ethereum address)""" class MakeAvailable(ActionWithMultipleDevices): """The act of setting willingness for trading.""" + pass @@ -1739,32 +1898,28 @@ class MoveOnDocument(JoinedTableMixin, ActionWithMultipleTradeDocuments): weight = db.Column(db.Float()) weight.comment = """Weight than go to recycling""" container_from_id = db.Column( - db.BigInteger, - db.ForeignKey('trade_document.id'), - nullable=False + db.BigInteger, db.ForeignKey('trade_document.id'), nullable=False ) container_from = db.relationship( 'TradeDocument', - backref=backref('containers_from', - lazy=True, - cascade=CASCADE_OWN), - primaryjoin='MoveOnDocument.container_from_id == TradeDocument.id' + backref=backref('containers_from', lazy=True, cascade=CASCADE_OWN), + primaryjoin='MoveOnDocument.container_from_id == TradeDocument.id', + ) + container_from_id.comment = ( + """This is the trade document used as container in a incoming lot""" ) - container_from_id.comment = """This is the trade document used as container in a incoming lot""" container_to_id = db.Column( - db.BigInteger, - db.ForeignKey('trade_document.id'), - nullable=False + db.BigInteger, db.ForeignKey('trade_document.id'), nullable=False ) container_to = db.relationship( 'TradeDocument', - backref=backref('containers_to', - lazy=True, - cascade=CASCADE_OWN), + backref=backref('containers_to', lazy=True, cascade=CASCADE_OWN), primaryjoin='MoveOnDocument.container_to_id == TradeDocument.id', ) - container_to_id.comment = """This is the trade document used as container in a outgoing lot""" + container_to_id.comment = ( + """This is the trade document used as container in a outgoing lot""" + ) class Delete(ActionWithMultipleDevices): @@ -1779,6 +1934,7 @@ class Migrate(JoinedTableMixin, ActionWithMultipleDevices): """Moves the devices to a new database/inventory. Devices cannot be modified anymore at the previous database. """ + other = Column(URL(), nullable=False) other.comment = """ The URL of the Migrate in the other end. @@ -1799,20 +1955,27 @@ class MigrateFrom(Migrate): # The following listeners avoids setting values to actions that # do not make sense. For example, EraseBasic to a graphic card. + @event.listens_for(TestDataStorage.device, Events.set.__name__, propagate=True) @event.listens_for(Install.device, Events.set.__name__, propagate=True) @event.listens_for(EraseBasic.device, Events.set.__name__, propagate=True) -def validate_device_is_data_storage(target: Action, value: DataStorage, old_value, initiator): +def validate_device_is_data_storage( + target: Action, value: DataStorage, old_value, initiator +): """Validates that the device for data-storage actions is effectively a data storage.""" if value and not isinstance(value, DataStorage): - raise TypeError('{} must be a DataStorage but you passed {}'.format(initiator.impl, value)) + raise TypeError( + '{} must be a DataStorage but you passed {}'.format(initiator.impl, value) + ) @event.listens_for(BenchmarkRamSysbench.device, Events.set.__name__, propagate=True) def actions_not_for_components(target: Action, value: Device, old_value, initiator): """Validates actions that cannot be performed to components.""" if isinstance(value, Component): - raise TypeError('{!r} cannot be performed to a component ({!r}).'.format(target, value)) + raise TypeError( + '{!r} cannot be performed to a component ({!r}).'.format(target, value) + ) # The following listeners keep relationships with device <-> components synced with the action @@ -1820,6 +1983,7 @@ def actions_not_for_components(target: Action, value: Device, old_value, initiat # automatically add/remove the ``components`` and ``parent`` of such actions # See the tests for examples + @event.listens_for(ActionWithOneDevice.device, Events.set.__name__, propagate=True) def update_components_action_one(target: ActionWithOneDevice, device: Device, __, ___): """Syncs the :attr:`.Action.components` with the components in @@ -1832,15 +1996,21 @@ def update_components_action_one(target: ActionWithOneDevice, device: Device, __ if isinstance(device, Computer): target.components |= device.components elif isinstance(device, Computer): - device.add_mac_to_hid() + device.add_mac_to_hid() -@event.listens_for(ActionWithMultipleDevices.devices, Events.init_collection.__name__, - propagate=True) -@event.listens_for(ActionWithMultipleDevices.devices, Events.bulk_replace.__name__, propagate=True) -@event.listens_for(ActionWithMultipleDevices.devices, Events.append.__name__, propagate=True) -def update_components_action_multiple(target: ActionWithMultipleDevices, - value: Union[Set[Device], Device], _): +@event.listens_for( + ActionWithMultipleDevices.devices, Events.init_collection.__name__, propagate=True +) +@event.listens_for( + ActionWithMultipleDevices.devices, Events.bulk_replace.__name__, propagate=True +) +@event.listens_for( + ActionWithMultipleDevices.devices, Events.append.__name__, propagate=True +) +def update_components_action_multiple( + target: ActionWithMultipleDevices, value: Union[Set[Device], Device], _ +): """Syncs the :attr:`.Action.components` with the components in :attr:`ereuse_devicehub.resources.device.models.Computer.components`. """ @@ -1851,8 +2021,12 @@ def update_components_action_multiple(target: ActionWithMultipleDevices, target.components |= device.components -@event.listens_for(ActionWithMultipleDevices.devices, Events.remove.__name__, propagate=True) -def remove_components_action_multiple(target: ActionWithMultipleDevices, device: Device, __): +@event.listens_for( + ActionWithMultipleDevices.devices, Events.remove.__name__, propagate=True +) +def remove_components_action_multiple( + target: ActionWithMultipleDevices, device: Device, __ +): """Syncs the :attr:`.Action.components` with the components in :attr:`ereuse_devicehub.resources.device.models.Computer.components`. """ diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index df93b107..5c8f2d5f 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -1,14 +1,28 @@ import copy from datetime import datetime, timedelta + from dateutil.tz import tzutc -from flask import current_app as app, g -from marshmallow import Schema as MarshmallowSchema, ValidationError, fields as f, validates_schema, pre_load, post_load -from marshmallow.fields import Boolean, DateTime, Decimal, Float, Integer, Nested, String, \ - TimeDelta, UUID +from flask import current_app as app +from flask import g +from marshmallow import Schema as MarshmallowSchema +from marshmallow import ValidationError +from marshmallow import fields as f +from marshmallow import post_load, pre_load, validates_schema +from marshmallow.fields import ( + UUID, + Boolean, + DateTime, + Decimal, + Float, + Integer, + Nested, + String, + TimeDelta, +) from marshmallow.validate import Length, OneOf, Range from sqlalchemy.util import OrderedSet from teal.enums import Country, Currency, Subdivision -from teal.marshmallow import EnumField, IP, SanitizedStr, URL, Version +from teal.marshmallow import IP, URL, EnumField, SanitizedStr, Version from teal.resource import Schema from ereuse_devicehub.marshmallow import NestedOn @@ -16,24 +30,32 @@ from ereuse_devicehub.resources import enums from ereuse_devicehub.resources.action import models as m from ereuse_devicehub.resources.agent import schemas as s_agent from ereuse_devicehub.resources.device import schemas as s_device -from ereuse_devicehub.resources.tradedocument import schemas as s_document from ereuse_devicehub.resources.documents import schemas as s_generic_document -from ereuse_devicehub.resources.enums import AppearanceRange, BiosAccessRange, FunctionalityRange, \ - PhysicalErasureMethod, R_POSITIVE, RatingRange, \ - Severity, SnapshotSoftware, TestDataStorageLength +from ereuse_devicehub.resources.enums import ( + R_POSITIVE, + AppearanceRange, + BiosAccessRange, + FunctionalityRange, + PhysicalErasureMethod, + RatingRange, + Severity, + SnapshotSoftware, + TestDataStorageLength, +) from ereuse_devicehub.resources.models import STR_BIG_SIZE, STR_SIZE from ereuse_devicehub.resources.schemas import Thing +from ereuse_devicehub.resources.tradedocument import schemas as s_document +from ereuse_devicehub.resources.tradedocument.models import TradeDocument from ereuse_devicehub.resources.user import schemas as s_user from ereuse_devicehub.resources.user.models import User -from ereuse_devicehub.resources.tradedocument.models import TradeDocument class Action(Thing): __doc__ = m.Action.__doc__ id = UUID(dump_only=True) - name = SanitizedStr(default='', - validate=Length(max=STR_BIG_SIZE), - description=m.Action.name.comment) + name = SanitizedStr( + default='', validate=Length(max=STR_BIG_SIZE), description=m.Action.name.comment + ) closed = Boolean(missing=True, description=m.Action.closed.comment) severity = EnumField(Severity, description=m.Action.severity.comment) description = SanitizedStr(default='', description=m.Action.description.comment) @@ -43,16 +65,18 @@ class Action(Thing): agent = NestedOn(s_agent.Agent, description=m.Action.agent_id.comment) author = NestedOn(s_user.User, dump_only=True, exclude=('token',)) components = NestedOn(s_device.Component, dump_only=True, many=True) - parent = NestedOn(s_device.Computer, dump_only=True, description=m.Action.parent_id.comment) + parent = NestedOn( + s_device.Computer, dump_only=True, description=m.Action.parent_id.comment + ) url = URL(dump_only=True, description=m.Action.url.__doc__) @validates_schema def validate_times(self, data: dict): unix_time = datetime.fromisoformat("1970-01-02 00:00:00+00:00") - if 'end_time' in data and data['end_time'] < unix_time: + if 'end_time' in data and data['end_time'].replace(tzinfo=tzutc()) < unix_time: data['end_time'] = unix_time - if 'start_time' in data and data['start_time'] < unix_time: + if 'start_time' in data and data['start_time'].replace(tzinfo=tzutc()) < unix_time: data['start_time'] = unix_time if data.get('end_time') and data.get('start_time'): @@ -67,24 +91,27 @@ class ActionWithOneDevice(Action): class ActionWithMultipleDocuments(Action): __doc__ = m.ActionWithMultipleTradeDocuments.__doc__ - documents = NestedOn(s_document.TradeDocument, - many=True, - required=True, # todo test ensuring len(devices) >= 1 - only_query='id', - collection_class=OrderedSet) + documents = NestedOn( + s_document.TradeDocument, + many=True, + required=True, # todo test ensuring len(devices) >= 1 + only_query='id', + collection_class=OrderedSet, + ) class ActionWithMultipleDevices(Action): __doc__ = m.ActionWithMultipleDevices.__doc__ - devices = NestedOn(s_device.Device, - many=True, - required=True, # todo test ensuring len(devices) >= 1 - only_query='id', - collection_class=OrderedSet) + devices = NestedOn( + s_device.Device, + many=True, + required=True, # todo test ensuring len(devices) >= 1 + only_query='id', + collection_class=OrderedSet, + ) class ActionWithMultipleDevicesCheckingOwner(ActionWithMultipleDevices): - @post_load def check_owner_of_device(self, data): for dev in data['devices']: @@ -102,20 +129,29 @@ class Remove(ActionWithOneDevice): class Allocate(ActionWithMultipleDevicesCheckingOwner): __doc__ = m.Allocate.__doc__ - start_time = DateTime(data_key='startTime', required=True, - description=m.Action.start_time.comment) - end_time = DateTime(data_key='endTime', required=False, - description=m.Action.end_time.comment) - final_user_code = SanitizedStr(data_key="finalUserCode", - validate=Length(min=1, max=STR_BIG_SIZE), - required=False, - description='This is a internal code for mainteing the secrets of the \ - personal datas of the new holder') - transaction = SanitizedStr(validate=Length(min=1, max=STR_BIG_SIZE), - required=False, - description='The code used from the owner for \ - relation with external tool.') - end_users = Integer(data_key='endUsers', validate=[Range(min=1, error="Value must be greater than 0")]) + start_time = DateTime( + data_key='startTime', required=True, description=m.Action.start_time.comment + ) + end_time = DateTime( + data_key='endTime', required=False, description=m.Action.end_time.comment + ) + final_user_code = SanitizedStr( + data_key="finalUserCode", + validate=Length(min=1, max=STR_BIG_SIZE), + required=False, + description='This is a internal code for mainteing the secrets of the \ + personal datas of the new holder', + ) + transaction = SanitizedStr( + validate=Length(min=1, max=STR_BIG_SIZE), + required=False, + description='The code used from the owner for \ + relation with external tool.', + ) + end_users = Integer( + data_key='endUsers', + validate=[Range(min=1, error="Value must be greater than 0")], + ) @validates_schema def validate_allocate(self, data: dict): @@ -136,12 +172,15 @@ class Allocate(ActionWithMultipleDevicesCheckingOwner): class Deallocate(ActionWithMultipleDevicesCheckingOwner): __doc__ = m.Deallocate.__doc__ - start_time = DateTime(data_key='startTime', required=True, - description=m.Action.start_time.comment) - transaction = SanitizedStr(validate=Length(min=1, max=STR_BIG_SIZE), - required=False, - description='The code used from the owner for \ - relation with external tool.') + start_time = DateTime( + data_key='startTime', required=True, description=m.Action.start_time.comment + ) + transaction = SanitizedStr( + validate=Length(min=1, max=STR_BIG_SIZE), + required=False, + description='The code used from the owner for \ + relation with external tool.', + ) @validates_schema def validate_deallocate(self, data: dict): @@ -232,7 +271,9 @@ class MeasureBattery(Test): __doc__ = m.MeasureBattery.__doc__ size = Integer(required=True, description=m.MeasureBattery.size.comment) voltage = Integer(required=True, description=m.MeasureBattery.voltage.comment) - cycle_count = Integer(data_key='cycleCount', description=m.MeasureBattery.cycle_count.comment) + cycle_count = Integer( + data_key='cycleCount', description=m.MeasureBattery.cycle_count.comment + ) health = EnumField(enums.BatteryHealth, description=m.MeasureBattery.health.comment) @@ -289,28 +330,32 @@ class TestBios(Test): class VisualTest(Test): __doc__ = m.VisualTest.__doc__ appearance_range = EnumField(AppearanceRange, data_key='appearanceRange') - functionality_range = EnumField(FunctionalityRange, - data_key='functionalityRange') + functionality_range = EnumField(FunctionalityRange, data_key='functionalityRange') labelling = Boolean() class Rate(ActionWithOneDevice): __doc__ = m.Rate.__doc__ - rating = Integer(validate=Range(*R_POSITIVE), - dump_only=True, - description=m.Rate._rating.comment) - version = Version(dump_only=True, - description=m.Rate.version.comment) - appearance = Integer(validate=Range(enums.R_NEGATIVE), - dump_only=True, - description=m.Rate._appearance.comment) - functionality = Integer(validate=Range(enums.R_NEGATIVE), - dump_only=True, - description=m.Rate._functionality.comment) - rating_range = EnumField(RatingRange, - dump_only=True, - data_key='ratingRange', - description=m.Rate.rating_range.__doc__) + rating = Integer( + validate=Range(*R_POSITIVE), dump_only=True, description=m.Rate._rating.comment + ) + version = Version(dump_only=True, description=m.Rate.version.comment) + appearance = Integer( + validate=Range(enums.R_NEGATIVE), + dump_only=True, + description=m.Rate._appearance.comment, + ) + functionality = Integer( + validate=Range(enums.R_NEGATIVE), + dump_only=True, + description=m.Rate._functionality.comment, + ) + rating_range = EnumField( + RatingRange, + dump_only=True, + data_key='ratingRange', + description=m.Rate.rating_range.__doc__, + ) class RateComputer(Rate): @@ -320,19 +365,25 @@ class RateComputer(Rate): data_storage = Float(dump_only=True, data_key='dataStorage') graphic_card = Float(dump_only=True, data_key='graphicCard') - data_storage_range = EnumField(RatingRange, dump_only=True, data_key='dataStorageRange') + data_storage_range = EnumField( + RatingRange, dump_only=True, data_key='dataStorageRange' + ) ram_range = EnumField(RatingRange, dump_only=True, data_key='ramRange') processor_range = EnumField(RatingRange, dump_only=True, data_key='processorRange') - graphic_card_range = EnumField(RatingRange, dump_only=True, data_key='graphicCardRange') + graphic_card_range = EnumField( + RatingRange, dump_only=True, data_key='graphicCardRange' + ) class Price(ActionWithOneDevice): __doc__ = m.Price.__doc__ currency = EnumField(Currency, required=True, description=m.Price.currency.comment) - price = Decimal(places=m.Price.SCALE, - rounding=m.Price.ROUND, - required=True, - description=m.Price.price.comment) + price = Decimal( + places=m.Price.SCALE, + rounding=m.Price.ROUND, + required=True, + description=m.Price.price.comment, + ) version = Version(dump_only=True, description=m.Price.version.comment) rating = NestedOn(Rate, dump_only=True, description=m.Price.rating_id.comment) @@ -356,9 +407,11 @@ class EreusePrice(Price): class Install(ActionWithOneDevice): __doc__ = m.Install.__doc__ - name = SanitizedStr(validate=Length(min=4, max=STR_BIG_SIZE), - required=True, - description='The name of the OS installed.') + name = SanitizedStr( + validate=Length(min=4, max=STR_BIG_SIZE), + required=True, + description='The name of the OS installed.', + ) elapsed = TimeDelta(precision=TimeDelta.SECONDS, required=True) address = Integer(validate=OneOf({8, 16, 32, 64, 128, 256})) @@ -372,18 +425,23 @@ class Snapshot(ActionWithOneDevice): See docs for more info. """ uuid = UUID() - software = EnumField(SnapshotSoftware, - required=True, - description='The software that generated this Snapshot.') + wbid = String(required=False) + software = EnumField( + SnapshotSoftware, + required=True, + description='The software that generated this Snapshot.', + ) version = Version(required=True, description='The version of the software.') actions = NestedOn(Action, many=True, dump_only=True) elapsed = TimeDelta(precision=TimeDelta.SECONDS) - components = NestedOn(s_device.Component, - many=True, - description='A list of components that are inside of the device' - 'at the moment of this Snapshot.' - 'Order is preserved, so the component num 0 when' - 'submitting is the component num 0 when returning it back.') + components = NestedOn( + s_device.Component, + many=True, + description='A list of components that are inside of the device' + 'at the moment of this Snapshot.' + 'Order is preserved, so the component num 0 when' + 'submitting is the component num 0 when returning it back.', + ) @validates_schema def validate_workbench_version(self, data: dict): @@ -391,16 +449,21 @@ class Snapshot(ActionWithOneDevice): if data['version'] < app.config['MIN_WORKBENCH']: raise ValidationError( 'Min. supported Workbench version is ' - '{} but yours is {}.'.format(app.config['MIN_WORKBENCH'], data['version']), - field_names=['version'] + '{} but yours is {}.'.format( + app.config['MIN_WORKBENCH'], data['version'] + ), + field_names=['version'], ) @validates_schema def validate_components_only_workbench(self, data: dict): - if (data['software'] != SnapshotSoftware.Workbench) and (data['software'] != SnapshotSoftware.WorkbenchAndroid): + if (data['software'] != SnapshotSoftware.Workbench) and ( + data['software'] != SnapshotSoftware.WorkbenchAndroid + ): if data.get('components', None) is not None: - raise ValidationError('Only Workbench can add component info', - field_names=['components']) + raise ValidationError( + 'Only Workbench can add component info', field_names=['components'] + ) @validates_schema def validate_only_workbench_fields(self, data: dict): @@ -408,22 +471,32 @@ class Snapshot(ActionWithOneDevice): # todo test if data['software'] == SnapshotSoftware.Workbench: if not data.get('uuid', None): - raise ValidationError('Snapshots from Workbench and WorkbenchAndroid must have uuid', - field_names=['uuid']) + raise ValidationError( + 'Snapshots from Workbench and WorkbenchAndroid must have uuid', + field_names=['uuid'], + ) if data.get('elapsed', None) is None: - raise ValidationError('Snapshots from Workbench must have elapsed', - field_names=['elapsed']) + raise ValidationError( + 'Snapshots from Workbench must have elapsed', + field_names=['elapsed'], + ) elif data['software'] == SnapshotSoftware.WorkbenchAndroid: if not data.get('uuid', None): - raise ValidationError('Snapshots from Workbench and WorkbenchAndroid must have uuid', - field_names=['uuid']) + raise ValidationError( + 'Snapshots from Workbench and WorkbenchAndroid must have uuid', + field_names=['uuid'], + ) else: if data.get('uuid', None): - raise ValidationError('Only Snapshots from Workbench or WorkbenchAndroid can have uuid', - field_names=['uuid']) + raise ValidationError( + 'Only Snapshots from Workbench or WorkbenchAndroid can have uuid', + field_names=['uuid'], + ) if data.get('elapsed', None): - raise ValidationError('Only Snapshots from Workbench can have elapsed', - field_names=['elapsed']) + raise ValidationError( + 'Only Snapshots from Workbench can have elapsed', + field_names=['elapsed'], + ) class ToRepair(ActionWithMultipleDevicesCheckingOwner): @@ -440,16 +513,20 @@ class Ready(ActionWithMultipleDevicesCheckingOwner): class ActionStatus(Action): rol_user = NestedOn(s_user.User, dump_only=True, exclude=('token',)) - devices = NestedOn(s_device.Device, - many=True, - required=False, # todo test ensuring len(devices) >= 1 - only_query='id', - collection_class=OrderedSet) - documents = NestedOn(s_document.TradeDocument, - many=True, - required=False, # todo test ensuring len(devices) >= 1 - only_query='id', - collection_class=OrderedSet) + devices = NestedOn( + s_device.Device, + many=True, + required=False, # todo test ensuring len(devices) >= 1 + only_query='id', + collection_class=OrderedSet, + ) + documents = NestedOn( + s_document.TradeDocument, + many=True, + required=False, # todo test ensuring len(devices) >= 1 + only_query='id', + collection_class=OrderedSet, + ) @pre_load def put_devices(self, data: dict): @@ -508,20 +585,28 @@ class Live(ActionWithOneDevice): See docs for more info. """ uuid = UUID() - software = EnumField(SnapshotSoftware, - required=True, - description='The software that generated this Snapshot.') + software = EnumField( + SnapshotSoftware, + required=True, + description='The software that generated this Snapshot.', + ) version = Version(required=True, description='The version of the software.') final_user_code = SanitizedStr(data_key="finalUserCode", dump_only=True) licence_version = Version(required=True, description='The version of the software.') - components = NestedOn(s_device.Component, - many=True, - description='A list of components that are inside of the device' - 'at the moment of this Snapshot.' - 'Order is preserved, so the component num 0 when' - 'submitting is the component num 0 when returning it back.') - usage_time_allocate = TimeDelta(data_key='usageTimeAllocate', required=False, - precision=TimeDelta.HOURS, dump_only=True) + components = NestedOn( + s_device.Component, + many=True, + description='A list of components that are inside of the device' + 'at the moment of this Snapshot.' + 'Order is preserved, so the component num 0 when' + 'submitting is the component num 0 when returning it back.', + ) + usage_time_allocate = TimeDelta( + data_key='usageTimeAllocate', + required=False, + precision=TimeDelta.HOURS, + dump_only=True, + ) class Organize(ActionWithMultipleDevices): @@ -570,7 +655,7 @@ class Revoke(ActionWithMultipleDevices): @validates_schema def validate_documents(self, data): """Check if there are or no one before confirmation, - This is not checked in the view becouse the list of documents is inmutable + This is not checked in the view becouse the list of documents is inmutable """ if not data['devices'] == OrderedSet(): @@ -610,7 +695,7 @@ class ConfirmDocument(ActionWithMultipleDocuments): @validates_schema def validate_documents(self, data): """If there are one device than have one confirmation, - then remove the list this device of the list of devices of this action + then remove the list this device of the list of devices of this action """ if data['documents'] == OrderedSet(): return @@ -636,7 +721,7 @@ class RevokeDocument(ActionWithMultipleDocuments): @validates_schema def validate_documents(self, data): """Check if there are or no one before confirmation, - This is not checked in the view becouse the list of documents is inmutable + This is not checked in the view becouse the list of documents is inmutable """ if data['documents'] == OrderedSet(): @@ -663,7 +748,7 @@ class ConfirmRevokeDocument(ActionWithMultipleDocuments): @validates_schema def validate_documents(self, data): """Check if there are or no one before confirmation, - This is not checked in the view becouse the list of documents is inmutable + This is not checked in the view becouse the list of documents is inmutable """ if data['documents'] == OrderedSet(): @@ -691,26 +776,23 @@ class Trade(ActionWithMultipleDevices): validate=Length(max=STR_SIZE), data_key='userToEmail', missing='', - required=False + required=False, ) user_to = NestedOn(s_user.User, dump_only=True, data_key='userTo') user_from_email = SanitizedStr( validate=Length(max=STR_SIZE), data_key='userFromEmail', missing='', - required=False + required=False, ) user_from = NestedOn(s_user.User, dump_only=True, data_key='userFrom') code = SanitizedStr(validate=Length(max=STR_SIZE), data_key='code', required=False) confirm = Boolean( data_key='confirms', missing=True, - description="""If you need confirmation of the user you need actevate this field""" + description="""If you need confirmation of the user you need actevate this field""", ) - lot = NestedOn('Lot', - many=False, - required=True, - only_query='id') + lot = NestedOn('Lot', many=False, required=True, only_query='id') @pre_load def adding_devices(self, data: dict): diff --git a/ereuse_devicehub/resources/action/views/snapshot.py b/ereuse_devicehub/resources/action/views/snapshot.py index 556211e3..14c59e7f 100644 --- a/ereuse_devicehub/resources/action/views/snapshot.py +++ b/ereuse_devicehub/resources/action/views/snapshot.py @@ -1,18 +1,21 @@ """ This is the view for Snapshots """ -import os import json +import os import shutil from datetime import datetime -from flask import current_app as app, g +from flask import current_app as app +from flask import g +from marshmallow import ValidationError from sqlalchemy.util import OrderedSet from ereuse_devicehub.db import db -from ereuse_devicehub.resources.action.models import RateComputer, Snapshot +from ereuse_devicehub.parser.models import SnapshotErrors +from ereuse_devicehub.resources.action.models import Snapshot from ereuse_devicehub.resources.device.models import Computer -from ereuse_devicehub.resources.action.rate.v1_0 import CannotRate -from ereuse_devicehub.resources.enums import SnapshotSoftware, Severity +from ereuse_devicehub.resources.device.sync import Sync +from ereuse_devicehub.resources.enums import Severity, SnapshotSoftware from ereuse_devicehub.resources.user.exceptions import InsufficientPermission @@ -59,48 +62,35 @@ def move_json(tmp_snapshots, path_name, user, live=False): os.remove(path_name) -class SnapshotView(): - """Performs a Snapshot. +class SnapshotMix: + sync = Sync() - See `Snapshot` section in docs for more info. - """ - # Note that if we set the device / components into the snapshot - # model object, when we flush them to the db we will flush - # snapshot, and we want to wait to flush snapshot at the end - - def __init__(self, snapshot_json: dict, resource_def, schema): - self.schema = schema - self.resource_def = resource_def - self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] - self.path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) - snapshot_json.pop('debug', None) - self.snapshot_json = resource_def.schema.load(snapshot_json) - self.response = self.build() - move_json(self.tmp_snapshots, self.path_snapshot, g.user.email) - - def post(self): - return self.response - - def build(self): - device = self.snapshot_json.pop('device') # type: Computer + def build(self, snapshot_json=None): # noqa: C901 + if not snapshot_json: + snapshot_json = self.snapshot_json + device = snapshot_json.pop('device') # type: Computer components = None - if self.snapshot_json['software'] == (SnapshotSoftware.Workbench or SnapshotSoftware.WorkbenchAndroid): - components = self.snapshot_json.pop('components', None) # type: List[Component] + if snapshot_json['software'] == ( + SnapshotSoftware.Workbench or SnapshotSoftware.WorkbenchAndroid + ): + components = snapshot_json.pop('components', None) # type: List[Component] if isinstance(device, Computer) and device.hid: device.add_mac_to_hid(components_snap=components) - snapshot = Snapshot(**self.snapshot_json) + snapshot = Snapshot(**snapshot_json) # Remove new actions from devices so they don't interfere with sync actions_device = set(e for e in device.actions_one) device.actions_one.clear() if components: - actions_components = tuple(set(e for e in c.actions_one) for c in components) + actions_components = tuple( + set(e for e in c.actions_one) for c in components + ) for component in components: component.actions_one.clear() assert not device.actions_one assert all(not c.actions_one for c in components) if components else True - db_device, remove_actions = self.resource_def.sync.run(device, components) + db_device, remove_actions = self.sync.run(device, components) del device # Do not use device anymore snapshot.device = db_device @@ -120,24 +110,49 @@ class SnapshotView(): # Check ownership of (non-component) device to from current.user if db_device.owner_id != g.user.id: raise InsufficientPermission() - # Compute ratings - try: - rate_computer, price = RateComputer.compute(db_device) - except CannotRate: - pass - else: - snapshot.actions.add(rate_computer) - if price: - snapshot.actions.add(price) elif snapshot.software == SnapshotSoftware.WorkbenchAndroid: pass # TODO try except to compute RateMobile # Check if HID is null and add Severity:Warning to Snapshot if snapshot.device.hid is None: snapshot.severity = Severity.Warning + return snapshot + + +class SnapshotView(SnapshotMix): + """Performs a Snapshot. + + See `Snapshot` section in docs for more info. + """ + + # Note that if we set the device / components into the snapshot + # model object, when we flush them to the db we will flush + # snapshot, and we want to wait to flush snapshot at the end + + def __init__(self, snapshot_json: dict, resource_def, schema): + self.schema = schema + self.resource_def = resource_def + self.tmp_snapshots = app.config['TMP_SNAPSHOTS'] + self.path_snapshot = save_json(snapshot_json, self.tmp_snapshots, g.user.email) + snapshot_json.pop('debug', None) + try: + self.snapshot_json = resource_def.schema.load(snapshot_json) + except ValidationError as err: + txt = "{}".format(err) + uuid = snapshot_json.get('uuid') + error = SnapshotErrors( + description=txt, snapshot_uuid=uuid, severity=Severity.Error + ) + error.save(commit=True) + raise err + + snapshot = self.build() db.session.add(snapshot) db.session().final_flush() - ret = self.schema.jsonify(snapshot) # transform it back - ret.status_code = 201 + self.response = self.schema.jsonify(snapshot) # transform it back + self.response.status_code = 201 db.session.commit() - return ret + move_json(self.tmp_snapshots, self.path_snapshot, g.user.email) + + def post(self): + return self.response diff --git a/ereuse_devicehub/resources/action/views/views.py b/ereuse_devicehub/resources/action/views/views.py index 88c95438..afbeb665 100644 --- a/ereuse_devicehub/resources/action/views/views.py +++ b/ereuse_devicehub/resources/action/views/views.py @@ -1,35 +1,49 @@ """ This is the view for Snapshots """ -import jwt -import ereuse_utils from datetime import timedelta from distutils.version import StrictVersion from uuid import UUID -from flask import current_app as app, request, g +import ereuse_utils +import jwt +from flask import current_app as app +from flask import g, request from teal.db import ResourceNotFound from teal.marshmallow import ValidationError from teal.resource import View from ereuse_devicehub.db import db from ereuse_devicehub.query import things_response -from ereuse_devicehub.resources.action.models import (Action, Snapshot, VisualTest, - InitTransfer, Live, Allocate, Deallocate, - Trade, Confirm, Revoke) +from ereuse_devicehub.resources.action.models import ( + Action, + Allocate, + Confirm, + Deallocate, + InitTransfer, + Live, + Revoke, + Snapshot, + Trade, + VisualTest, +) from ereuse_devicehub.resources.action.views import trade as trade_view -from ereuse_devicehub.resources.action.views.snapshot import SnapshotView, save_json, move_json from ereuse_devicehub.resources.action.views.documents import ErasedView -from ereuse_devicehub.resources.device.models import Device, Computer, DataStorage +from ereuse_devicehub.resources.action.views.snapshot import ( + SnapshotView, + move_json, + save_json, +) +from ereuse_devicehub.resources.device.models import Computer, DataStorage, Device from ereuse_devicehub.resources.enums import Severity SUPPORTED_WORKBENCH = StrictVersion('11.0') -class AllocateMix(): +class AllocateMix: model = None def post(self): - """ Create one res_obj """ + """Create one res_obj""" res_json = request.get_json() res_obj = self.model(**res_json) db.session.add(res_obj) @@ -40,13 +54,18 @@ class AllocateMix(): return ret def find(self, args: dict): - res_objs = self.model.query.filter_by(author=g.user) \ - .order_by(self.model.created.desc()) \ + res_objs = ( + self.model.query.filter_by(author=g.user) + .order_by(self.model.created.desc()) .paginate(per_page=200) + ) return things_response( self.schema.dump(res_objs.items, many=True, nested=0), - res_objs.page, res_objs.per_page, res_objs.total, - res_objs.prev_num, res_objs.next_num + res_objs.page, + res_objs.per_page, + res_objs.total, + res_objs.prev_num, + res_objs.next_num, ) @@ -99,7 +118,9 @@ class LiveView(View): if not serial_number: """There aren't any disk""" - raise ResourceNotFound("There aren't any disk in this device {}".format(device)) + raise ResourceNotFound( + "There aren't any disk in this device {}".format(device) + ) return usage_time_hdd, serial_number def get_hid(self, snapshot): @@ -109,8 +130,11 @@ class LiveView(View): return None if not components: return device.hid - macs = [c.serial_number for c in components - if c.type == 'NetworkAdapter' and c.serial_number is not None] + macs = [ + c.serial_number + for c in components + if c.type == 'NetworkAdapter' and c.serial_number is not None + ] macs.sort() mac = '' hid = device.hid @@ -124,12 +148,10 @@ class LiveView(View): def live(self, snapshot): """If the device.allocated == True, then this snapshot create an action live.""" hid = self.get_hid(snapshot) - if not hid or not Device.query.filter( - Device.hid == hid).count(): + if not hid or not Device.query.filter(Device.hid == hid).count(): raise ValidationError('Device not exist.') - device = Device.query.filter( - Device.hid == hid, Device.allocated == True).one() + device = Device.query.filter(Device.hid == hid, Device.allocated == True).one() # Is not necessary if not device: raise ValidationError('Device not exist.') @@ -138,16 +160,18 @@ class LiveView(View): usage_time_hdd, serial_number = self.get_hdd_details(snapshot, device) - data_live = {'usage_time_hdd': usage_time_hdd, - 'serial_number': serial_number, - 'snapshot_uuid': snapshot['uuid'], - 'description': '', - 'software': snapshot['software'], - 'software_version': snapshot['version'], - 'licence_version': snapshot['licence_version'], - 'author_id': device.owner_id, - 'agent_id': device.owner.individual.id, - 'device': device} + data_live = { + 'usage_time_hdd': usage_time_hdd, + 'serial_number': serial_number, + 'snapshot_uuid': snapshot['uuid'], + 'description': '', + 'software': snapshot['software'], + 'software_version': snapshot['version'], + 'licence_version': snapshot['licence_version'], + 'author_id': device.owner_id, + 'agent_id': device.owner.individual.id, + 'device': device, + } live = Live(**data_live) @@ -172,7 +196,12 @@ class LiveView(View): def decode_snapshot(data): try: - return jwt.decode(data['data'], app.config['JWT_PASS'], algorithms="HS256", json_encoder=ereuse_utils.JSONEncoder) + return jwt.decode( + data['data'], + app.config['JWT_PASS'], + algorithms="HS256", + json_encoder=ereuse_utils.JSONEncoder, + ) except jwt.exceptions.InvalidSignatureError as err: txt = 'Invalid snapshot' raise ValidationError(txt) @@ -200,13 +229,13 @@ class ActionView(View): # TODO @cayop uncomment at four weeks # if not 'data' in json: - # txt = 'Invalid snapshot' - # raise ValidationError(txt) + # txt = 'Invalid snapshot' + # raise ValidationError(txt) # snapshot_data = decode_snapshot(json) snapshot_data = json - if 'data' in json: + if 'data' in json and isinstance(json['data'], str): snapshot_data = decode_snapshot(json) if not snapshot_data: @@ -248,7 +277,9 @@ class ActionView(View): return confirm.post() if json['type'] == 'ConfirmRevokeDocument': - confirm_revoke = trade_view.ConfirmRevokeDocumentView(json, resource_def, self.schema) + confirm_revoke = trade_view.ConfirmRevokeDocumentView( + json, resource_def, self.schema + ) return confirm_revoke.post() if json['type'] == 'DataWipe': diff --git a/ereuse_devicehub/resources/device/models.py b/ereuse_devicehub/resources/device/models.py index 98227c4c..9ba23029 100644 --- a/ereuse_devicehub/resources/device/models.py +++ b/ereuse_devicehub/resources/device/models.py @@ -663,6 +663,7 @@ class Computer(Device): db.ForeignKey(User.id), nullable=True) receiver = db.relationship(User, primaryjoin=receiver_id == User.id) + uuid = db.Column(UUID(as_uuid=True), nullable=True) def __init__(self, *args, **kwargs) -> None: if args: diff --git a/ereuse_devicehub/resources/device/schemas.py b/ereuse_devicehub/resources/device/schemas.py index 0c265d78..561cf40b 100644 --- a/ereuse_devicehub/resources/device/schemas.py +++ b/ereuse_devicehub/resources/device/schemas.py @@ -136,6 +136,7 @@ class Computer(Device): owner_id = UUID(data_key='ownerID') transfer_state = EnumField(enums.TransferState, description=m.Computer.transfer_state.comment) receiver_id = UUID(data_key='receiverID') + uuid = UUID(required=False) class Desktop(Computer): diff --git a/ereuse_devicehub/resources/enums.py b/ereuse_devicehub/resources/enums.py index cff77056..bbbcdc10 100644 --- a/ereuse_devicehub/resources/enums.py +++ b/ereuse_devicehub/resources/enums.py @@ -8,6 +8,7 @@ import inflection @unique class SnapshotSoftware(Enum): """The software used to perform the Snapshot.""" + Workbench = 'Workbench' WorkbenchAndroid = 'WorkbenchAndroid' AndroidApp = 'AndroidApp' @@ -36,6 +37,7 @@ class RatingRange(IntEnum): 3. Medium. 4. High. """ + VERY_LOW = 1 LOW = 2 MEDIUM = 3 @@ -69,6 +71,7 @@ class PriceSoftware(Enum): @unique class AppearanceRange(Enum): """Grades the imperfections that aesthetically affect the device, but not its usage.""" + Z = 'Z. The device is new' A = 'A. Is like new; without visual damage' B = 'B. Is in really good condition; small visual damage in difficult places to spot' @@ -83,6 +86,7 @@ class AppearanceRange(Enum): @unique class FunctionalityRange(Enum): """Grades the defects of a device that affect its usage.""" + A = 'A. All the buttons works perfectly, no screen/camera defects and chassis without usage issues' B = 'B. There is a button difficult to press or unstable it, a screen/camera defect or chassis problem' C = 'C. Chassis defects or multiple buttons don\'t work; broken or unusable it, some screen/camera defect' @@ -95,6 +99,7 @@ class FunctionalityRange(Enum): @unique class BatteryHealthRange(Enum): """Grade the battery health status, depending on self report Android system""" + A = 'A. The battery health is very good' B = 'B. Battery health is good' C = 'C. Battery health is overheat / over voltage status but can stand the minimum duration' @@ -109,6 +114,7 @@ class BatteryHealthRange(Enum): @unique class BiosAccessRange(Enum): """How difficult it has been to set the bios to boot from the network.""" + A = 'A. If by pressing a key you could access a boot menu with the network boot' B = 'B. You had to get into the BIOS, and in less than 5 steps you could set the network boot' C = 'C. Like B, but with more than 5 steps' @@ -139,6 +145,7 @@ class ImageSoftware(Enum): @unique class ImageMimeTypes(Enum): """Supported image Mimetypes for Devicehub.""" + jpg = 'image/jpeg' png = 'image/png' @@ -149,6 +156,7 @@ BOX_RATE_3 = 1, 3 # After looking at own databases + @unique class RamInterface(Enum): """ @@ -163,6 +171,7 @@ class RamInterface(Enum): here for those cases where there is no more specific information. Please, try to always use DDRø-6 denominations. """ + SDRAM = 'SDRAM' DDR = 'DDR SDRAM' DDR2 = 'DDR2 SDRAM' @@ -170,6 +179,7 @@ class RamInterface(Enum): DDR4 = 'DDR4 SDRAM' DDR5 = 'DDR5 SDRAM' DDR6 = 'DDR6 SDRAM' + LPDDR3 = 'LPDDR3' def __str__(self): return self.value @@ -189,6 +199,7 @@ class DataStorageInterface(Enum): ATA = 'ATA' USB = 'USB' PCI = 'PCI' + NVME = 'NVME' def __str__(self): return self.value @@ -211,6 +222,7 @@ class DisplayTech(Enum): @unique class ComputerChassis(Enum): """The chassis of a computer.""" + Tower = 'Tower' Docking = 'Docking' AllInOne = 'All in one' @@ -235,6 +247,7 @@ class ReceiverRole(Enum): The role that the receiver takes in the reception; the meaning of the reception. """ + Intermediary = 'Generic user in the workflow of the device.' FinalUser = 'The user that will use the device.' CollectionPoint = 'A collection point.' @@ -244,6 +257,7 @@ class ReceiverRole(Enum): class PrinterTechnology(Enum): """Technology of the printer.""" + Toner = 'Toner / Laser' Inkjet = 'Liquid inkjet' SolidInk = 'Solid ink' @@ -260,6 +274,7 @@ class CameraFacing(Enum): @unique class BatteryHealth(Enum): """The battery health status as in Android.""" + Cold = 'Cold' Dead = 'Dead' Good = 'Good' @@ -274,6 +289,7 @@ class BatteryTechnology(Enum): https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power adding ``Alkaline``. """ + LiIon = 'Lithium-ion' NiCd = 'Nickel-Cadmium' NiMH = 'Nickel-metal hydride' @@ -329,10 +345,11 @@ class PhysicalErasureMethod(Enum): and non able to be re-built. """ - Shred = 'Reduction of the data-storage to the required certified ' \ - 'standard sizes.' - Disintegration = 'Reduction of the data-storage to smaller sizes ' \ - 'than the certified standard ones.' + Shred = 'Reduction of the data-storage to the required certified ' 'standard sizes.' + Disintegration = ( + 'Reduction of the data-storage to smaller sizes ' + 'than the certified standard ones.' + ) def __str__(self): return self.name @@ -362,20 +379,21 @@ class ErasureStandards(Enum): def from_data_storage(cls, erasure) -> Set['ErasureStandards']: """Returns a set of erasure standards.""" from ereuse_devicehub.resources.action import models as actions + standards = set() if isinstance(erasure, actions.EraseSectors): with suppress(ValueError): first_step, *other_steps = erasure.steps - if isinstance(first_step, actions.StepZero) \ - and all(isinstance(step, actions.StepRandom) for step in other_steps): + if isinstance(first_step, actions.StepZero) and all( + isinstance(step, actions.StepRandom) for step in other_steps + ): standards.add(cls.HMG_IS5) return standards @unique class TransferState(IntEnum): - """State of transfer for a given Lot of devices. - """ + """State of transfer for a given Lot of devices.""" """ * Initial: No transfer action in place. @@ -393,7 +411,7 @@ class TransferState(IntEnum): def __str__(self): return self.name - + @unique class SessionType(IntEnum): diff --git a/examples/app.py b/examples/app.py index 415d86ce..af45cb1a 100644 --- a/examples/app.py +++ b/examples/app.py @@ -5,6 +5,7 @@ Use this as a starting point. """ from flask_wtf.csrf import CSRFProtect +from ereuse_devicehub.api.views import api from ereuse_devicehub.config import DevicehubConfig from ereuse_devicehub.devicehub import Devicehub from ereuse_devicehub.inventory.views import devices @@ -15,6 +16,7 @@ app = Devicehub(inventory=DevicehubConfig.DB_SCHEMA) app.register_blueprint(core) app.register_blueprint(devices) app.register_blueprint(labels) +app.register_blueprint(api) # configure & enable CSRF of Flask-WTF # NOTE: enable by blueprint to exclude API views diff --git a/requirements.txt b/requirements.txt index 56dbf2be..a6a2e138 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ SQLAlchemy==1.3.24 SQLAlchemy-Utils==0.33.11 teal==0.2.0a38 webargs==5.5.3 -Werkzeug==0.15.3 +Werkzeug==0.15.5 sqlalchemy-citext==1.3.post0 flask-weasyprint==0.5 weasyprint==44 @@ -43,3 +43,5 @@ tqdm==4.32.2 python-decouple==3.3 python-dotenv==0.14.0 pyjwt==2.0.0a1 +pint==0.9 +py-dmidecode==0.1.0 diff --git a/tests/conftest.py b/tests/conftest.py index 991374ba..536bbfb8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ import io +import json import uuid import jwt import ereuse_utils @@ -22,6 +23,7 @@ from ereuse_devicehub.resources.tag import Tag from ereuse_devicehub.resources.user.models import User from ereuse_devicehub.resources.user.models import Session from ereuse_devicehub.resources.enums import SessionType +from ereuse_devicehub.api.views import api STARTT = datetime(year=2000, month=1, day=1, hour=1) """A dummy starting time to use in tests.""" @@ -68,6 +70,7 @@ def app(request, _app: Devicehub) -> Devicehub: tag_token=uuid.UUID('52dacef0-6bcb-4919-bfed-f10d2c96ecee'), erase=False, common=True) + _app.register_blueprint(api) with _app.app_context(): try: @@ -166,6 +169,11 @@ def file(name: str) -> dict: return json_encode(yaml2json(name)) +def file_json(name): + with Path(__file__).parent.joinpath('files').joinpath(name).open() as f: + return json.loads(f.read()) + + def file_workbench(name: str) -> dict: """Opens and parses a YAML file from the ``files`` subdir.""" with Path(__file__).parent.joinpath('workbench_files').joinpath(name + '.json').open() as f: diff --git a/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json b/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json new file mode 100644 index 00000000..45065b64 --- /dev/null +++ b/tests/files/2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json @@ -0,0 +1,2431 @@ +{ + "timestamp": "2022-03-31T19:09:57.167164", + "type": "Snapshot", + "uuid": "cdecaf47-6e32-4ccb-b689-95c064d8c514", + "wbid": "MLKO1Y0R55XZM051WQ5KJM01RY44Q", + "software": "Workbench", + "version": "2022.03.00", + "schema_api": "1.0.0", + "data": { + "lspci": "", + "lshw": { + "id": "__", + "class": "system", + "claimed": true, + "handle": "DMI:000C", + "description": "Notebook", + "product": "20HRCTO1WW (LENOVO_MT_20HR_BU_Think_FM_ThinkPad X1 Carbon 5th)", + "vendor": "LENOVO", + "version": "ThinkPad X1 Carbon 5th", + "serial": "PF0QMY5N", + "width": 64, + "configuration": { + "administrator_password": "disabled", + "chassis": "notebook", + "family": "ThinkPad X1 Carbon 5th", + "power-on_password": "disabled", + "sku": "LENOVO_MT_20HR_BU_Think_FM_ThinkPad X1 Carbon 5th", + "uuid": "305f33cc-33ca-11b2-a85c-aad0993c0c99" + }, + "capabilities": { + "smbios-3.0.0": "SMBIOS version 3.0.0", + "dmi-3.0.0": "DMI version 3.0.0", + "smp": "Symmetric Multi-Processing", + "vsyscall32": "32-bit processes" + }, + "children": [ + { + "id": "core", + "class": "bus", + "claimed": true, + "handle": "DMI:000D", + "description": "Motherboard", + "product": "20HRCTO1WW", + "vendor": "LENOVO", + "physid": "0", + "version": "SDK0J40709 WIN", + "serial": "L3HF74S00AZ", + "slot": "Not Available", + "children": [ + { + "id": "memory", + "class": "memory", + "claimed": true, + "handle": "DMI:0003", + "description": "System Memory", + "physid": "3", + "slot": "System board or motherboard", + "units": "bytes", + "size": 17045651456, + "children": [ + { + "id": "bank:0", + "class": "memory", + "claimed": true, + "handle": "DMI:0004", + "description": "Row of chips LPDDR3 Synchronous Unbuffered (Unregistered) 1867 MHz (0,5 ns) [empty]", + "product": "K4EBE304EB-EGCF", + "vendor": "Samsung", + "physid": "0", + "serial": "00000000", + "slot": "ChannelA-DIMM0", + "width": 64, + "clock": 1867000000 + }, + { + "id": "bank:1", + "class": "memory", + "claimed": true, + "handle": "DMI:0005", + "description": "Row of chips LPDDR3 Synchronous Unbuffered (Unregistered) 1867 MHz (0,5 ns) [empty]", + "product": "K4EBE304EB-EGCF", + "vendor": "Samsung", + "physid": "1", + "serial": "00000000", + "slot": "ChannelB-DIMM0", + "width": 64, + "clock": 1867000000 + } + ] + }, + { + "id": "cache:0", + "class": "memory", + "claimed": true, + "handle": "DMI:0007", + "description": "L1 cache", + "physid": "7", + "slot": "L1 Cache", + "units": "bytes", + "size": 131072, + "capacity": 131072, + "configuration": { + "level": "1" + }, + "capabilities": { + "synchronous": "Synchronous", + "internal": "Internal", + "write-back": "Write-back", + "unified": "Unified cache" + } + }, + { + "id": "cache:1", + "class": "memory", + "claimed": true, + "handle": "DMI:0008", + "description": "L2 cache", + "physid": "8", + "slot": "L2 Cache", + "units": "bytes", + "size": 524288, + "capacity": 524288, + "configuration": { + "level": "2" + }, + "capabilities": { + "synchronous": "Synchronous", + "internal": "Internal", + "write-back": "Write-back", + "unified": "Unified cache" + } + }, + { + "id": "cache:2", + "class": "memory", + "claimed": true, + "handle": "DMI:0009", + "description": "L3 cache", + "physid": "9", + "slot": "L3 Cache", + "units": "bytes", + "size": 4194304, + "capacity": 4194304, + "configuration": { + "level": "3" + }, + "capabilities": { + "synchronous": "Synchronous", + "internal": "Internal", + "write-back": "Write-back", + "unified": "Unified cache" + } + }, + { + "id": "cpu", + "class": "processor", + "claimed": true, + "handle": "DMI:000A", + "description": "CPU", + "product": "Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz", + "vendor": "Intel Corp.", + "physid": "a", + "businfo": "cpu@0", + "version": "6.142.9", + "serial": "None", + "slot": "U3E1", + "units": "Hz", + "size": 3447431000, + "capacity": 3500000000, + "width": 64, + "clock": 100000000, + "configuration": { + "cores": "2", + "enabledcores": "2", + "microcode": "78", + "threads": "4" + }, + "capabilities": { + "lm": "64bits extensions (x86-64)", + "fpu": "mathematical co-processor", + "fpu_exception": "FPU exceptions reporting", + "wp": true, + "vme": "virtual mode extensions", + "de": "debugging extensions", + "pse": "page size extensions", + "tsc": "time stamp counter", + "msr": "model-specific registers", + "pae": "4GB+ memory addressing (Physical Address Extension)", + "mce": "machine check exceptions", + "cx8": "compare and exchange 8-byte", + "apic": "on-chip advanced programmable interrupt controller (APIC)", + "sep": "fast system calls", + "mtrr": "memory type range registers", + "pge": "page global enable", + "mca": "machine check architecture", + "cmov": "conditional move instruction", + "pat": "page attribute table", + "pse36": "36-bit page size extensions", + "clflush": true, + "dts": "debug trace and EMON store MSRs", + "acpi": "thermal control (ACPI)", + "mmx": "multimedia extensions (MMX)", + "fxsr": "fast floating point save/restore", + "sse": "streaming SIMD extensions (SSE)", + "sse2": "streaming SIMD extensions (SSE2)", + "ss": "self-snoop", + "ht": "HyperThreading", + "tm": "thermal interrupt and status", + "pbe": "pending break event", + "syscall": "fast system calls", + "nx": "no-execute bit (NX)", + "pdpe1gb": true, + "rdtscp": true, + "x86-64": "64bits extensions (x86-64)", + "constant_tsc": true, + "art": true, + "arch_perfmon": true, + "pebs": true, + "bts": true, + "rep_good": true, + "nopl": true, + "xtopology": true, + "nonstop_tsc": true, + "cpuid": true, + "aperfmperf": true, + "pni": true, + "pclmulqdq": true, + "dtes64": true, + "monitor": true, + "ds_cpl": true, + "vmx": true, + "est": true, + "tm2": true, + "ssse3": true, + "sdbg": true, + "fma": true, + "cx16": true, + "xtpr": true, + "pdcm": true, + "pcid": true, + "sse4_1": true, + "sse4_2": true, + "x2apic": true, + "movbe": true, + "popcnt": true, + "aes": true, + "xsave": true, + "avx": true, + "f16c": true, + "rdrand": true, + "lahf_lm": true, + "abm": true, + "3dnowprefetch": true, + "cpuid_fault": true, + "epb": true, + "invpcid_single": true, + "pti": true, + "tpr_shadow": true, + "vnmi": true, + "flexpriority": true, + "ept": true, + "vpid": true, + "ept_ad": true, + "fsgsbase": true, + "tsc_adjust": true, + "bmi1": true, + "avx2": true, + "smep": true, + "bmi2": true, + "erms": true, + "invpcid": true, + "mpx": true, + "rdseed": true, + "adx": true, + "smap": true, + "clflushopt": true, + "intel_pt": true, + "xsaveopt": true, + "xsavec": true, + "xgetbv1": true, + "xsaves": true, + "dtherm": true, + "ida": true, + "arat": true, + "pln": true, + "pts": true, + "hwp": true, + "hwp_notify": true, + "hwp_act_window": true, + "hwp_epp": true, + "cpufreq": "CPU Frequency scaling" + } + }, + { + "id": "firmware", + "class": "memory", + "claimed": true, + "description": "BIOS", + "vendor": "LENOVO", + "physid": "b", + "version": "N1MET31W (1.16 )", + "date": "03/10/2017", + "units": "bytes", + "size": 131072, + "capacity": 16777216, + "capabilities": { + "pci": "PCI bus", + "pnp": "Plug-and-Play", + "upgrade": "BIOS EEPROM can be upgraded", + "shadowing": "BIOS shadowing", + "cdboot": "Booting from CD-ROM/DVD", + "bootselect": "Selectable boot path", + "edd": "Enhanced Disk Drive extensions", + "int13floppy720": "3.5\" 720KB floppy", + "int5printscreen": "Print Screen key", + "int9keyboard": "i8042 keyboard controller", + "int14serial": "INT14 serial line control", + "int17printer": "INT17 printer control", + "int10video": "INT10 CGA/Mono video", + "acpi": "ACPI", + "usb": "USB legacy emulation", + "biosbootspecification": "BIOS boot specification", + "uefi": "UEFI specification is supported" + } + }, + { + "id": "pci", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:00", + "description": "Host bridge", + "product": "Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers", + "vendor": "Intel Corporation", + "physid": "100", + "businfo": "pci@0000:00:00.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "skl_uncore" + }, + "children": [ + { + "id": "display", + "class": "display", + "claimed": true, + "handle": "PCI:0000:00:02.0", + "description": "VGA compatible controller", + "product": "HD Graphics 620", + "vendor": "Intel Corporation", + "physid": "2", + "businfo": "pci@0000:00:02.0", + "logicalname": "/dev/fb0", + "version": "02", + "width": 64, + "clock": 33000000, + "configuration": { + "depth": "32", + "driver": "i915", + "latency": "0", + "resolution": "1920,1080" + }, + "capabilities": { + "pciexpress": "PCI Express", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "vga_controller": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "rom": "extension ROM", + "fb": "framebuffer" + } + }, + { + "id": "generic:0", + "class": "generic", + "handle": "PCI:0000:00:08.0", + "description": "System peripheral", + "product": "Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model", + "vendor": "Intel Corporation", + "physid": "8", + "businfo": "pci@0000:00:08.0", + "version": "00", + "width": 64, + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "capabilities": { + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "cap_list": "PCI capabilities listing" + } + }, + { + "id": "usb", + "class": "bus", + "claimed": true, + "handle": "PCI:0000:00:14.0", + "description": "USB controller", + "product": "Sunrise Point-LP USB 3.0 xHCI Controller", + "vendor": "Intel Corporation", + "physid": "14", + "businfo": "pci@0000:00:14.0", + "version": "21", + "width": 64, + "clock": 33000000, + "configuration": { + "driver": "xhci_hcd", + "latency": "0" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "xhci": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "usbhost:0", + "class": "bus", + "claimed": true, + "handle": "USB:1:1", + "product": "xHCI Host Controller", + "vendor": "Linux 5.4.72-gentoo-x86_64 xhci-hcd", + "physid": "0", + "businfo": "usb@1", + "logicalname": "usb1", + "version": "5.04", + "configuration": { + "driver": "hub", + "slots": "12", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.00": "USB 2.0" + }, + "children": [ + { + "id": "usb:0", + "class": "communication", + "claimed": true, + "handle": "USB:1:2", + "description": "Bluetooth wireless interface", + "vendor": "Intel Corp.", + "physid": "7", + "businfo": "usb@1:7", + "version": "0.10", + "configuration": { + "driver": "btusb", + "maxpower": "100mA", + "speed": "12Mbit/s" + }, + "capabilities": { + "bluetooth": "Bluetooth wireless radio", + "usb-2.00": "USB 2.0" + } + }, + { + "id": "usb:1", + "class": "multimedia", + "claimed": true, + "handle": "USB:1:3", + "description": "Video", + "product": "Integrated Camera: Integrated C", + "vendor": "8SSC20F27049L1GZ6CB00MH", + "physid": "8", + "businfo": "usb@1:8", + "logicalname": [ + "input9", + "/dev/input/event8" + ], + "version": "0.16", + "serial": "200901010001", + "configuration": { + "driver": "uvcvideo", + "maxpower": "500mA", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.00": "USB 2.0", + "usb": "USB" + } + }, + { + "id": "usb:2", + "class": "generic", + "handle": "USB:1:4", + "description": "Generic USB device", + "vendor": "Validity Sensors, Inc.", + "physid": "9", + "businfo": "usb@1:9", + "version": "1.64", + "serial": "d6aa80ed14a7", + "configuration": { + "maxpower": "100mA", + "speed": "12Mbit/s" + }, + "capabilities": { + "usb-2.00": "USB 2.0" + } + } + ] + }, + { + "id": "usbhost:1", + "class": "bus", + "claimed": true, + "handle": "USB:2:1", + "product": "xHCI Host Controller", + "vendor": "Linux 5.4.72-gentoo-x86_64 xhci-hcd", + "physid": "1", + "businfo": "usb@2", + "logicalname": "usb2", + "version": "5.04", + "configuration": { + "driver": "hub", + "slots": "6", + "speed": "5000Mbit/s" + }, + "capabilities": { + "usb-3.00": true + } + } + ] + }, + { + "id": "generic:1", + "class": "generic", + "claimed": true, + "handle": "PCI:0000:00:14.2", + "description": "Signal processing controller", + "product": "Sunrise Point-LP Thermal subsystem", + "vendor": "Intel Corporation", + "physid": "14.2", + "businfo": "pci@0000:00:14.2", + "version": "21", + "width": 64, + "clock": 33000000, + "configuration": { + "driver": "intel_pch_thermal", + "latency": "0" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "cap_list": "PCI capabilities listing" + } + }, + { + "id": "communication", + "class": "communication", + "claimed": true, + "handle": "PCI:0000:00:16.0", + "description": "Communication controller", + "product": "Sunrise Point-LP CSME HECI #1", + "vendor": "Intel Corporation", + "physid": "16", + "businfo": "pci@0000:00:16.0", + "version": "21", + "width": 64, + "clock": 33000000, + "configuration": { + "driver": "mei_me", + "latency": "0" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + } + }, + { + "id": "pci:0", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:02", + "description": "PCI bridge", + "product": "Sunrise Point-LP PCI Express Root Port #1", + "vendor": "Intel Corporation", + "physid": "1c", + "businfo": "pci@0000:00:1c.0", + "version": "f1", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pciexpress": "PCI Express", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "generic", + "class": "bus", + "claimed": true, + "handle": "PCI:0000:02:00.0", + "description": "MMC Host", + "product": "RTS525A PCI Express Card Reader", + "vendor": "Realtek Semiconductor Co., Ltd.", + "physid": "0", + "businfo": "pci@0000:02:00.0", + "logicalname": "mmc0", + "version": "01", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "rtsx_pci", + "latency": "0" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + } + } + ] + }, + { + "id": "pci:1", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:04", + "description": "PCI bridge", + "product": "Sunrise Point-LP PCI Express Root Port #3", + "vendor": "Intel Corporation", + "physid": "1c.2", + "businfo": "pci@0000:00:1c.2", + "version": "f1", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pciexpress": "PCI Express", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "network", + "class": "network", + "claimed": true, + "handle": "PCI:0000:04:00.0", + "description": "Wireless interface", + "product": "Wireless 8265 / 8275", + "vendor": "Intel Corporation", + "physid": "0", + "businfo": "pci@0000:04:00.0", + "logicalname": "wlp4s0", + "version": "88", + "serial": "00:28:f8:a6:d5:7e", + "width": 64, + "clock": 33000000, + "configuration": { + "broadcast": "yes", + "driver": "iwlwifi", + "driverversion": "5.4.72-gentoo-x86_64", + "firmware": "36.ad812ee0.0", + "ip": "192.168.1.39", + "latency": "0", + "link": "yes", + "multicast": "yes", + "wireless": "IEEE 802.11" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "ethernet": true, + "physical": "Physical interface", + "wireless": "Wireless-LAN" + } + } + ] + }, + { + "id": "pci:2", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:05", + "description": "PCI bridge", + "product": "Sunrise Point-LP PCI Express Root Port #5", + "vendor": "Intel Corporation", + "physid": "1c.4", + "businfo": "pci@0000:00:1c.4", + "version": "f1", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pciexpress": "PCI Express", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "nvme", + "class": "storage", + "claimed": true, + "handle": "PCI:0000:05:00.0", + "description": "NVMe device", + "product": "SAMSUNG MZVLW1T0HMLH-000L7", + "vendor": "Samsung Electronics Co Ltd", + "physid": "0", + "businfo": "pci@0000:05:00.0", + "logicalname": "/dev/nvme0", + "version": "6L7QCXY7", + "serial": "S35ANX0J401001", + "width": 64, + "clock": 33000000, + "configuration": { + "driver": "nvme", + "latency": "0", + "nqn": "nqn.2014.08.org.nvmexpress:144d144dS35ANX0J401001 SAMSUNG MZVLW1T0HMLH-000L7", + "state": "live" + }, + "capabilities": { + "nvme": true, + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "msix": "MSI-X", + "nvm_express": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "namespace", + "class": "disk", + "claimed": true, + "handle": "GUID:a240de2f-0a5b-4704-907b-266b2b0272aa", + "description": "NVMe disk", + "physid": "1", + "businfo": "nvme@0:1", + "logicalname": "/dev/nvme0n1", + "units": "bytes", + "size": 1024209543168, + "configuration": { + "guid": "a240de2f-0a5b-4704-907b-266b2b0272aa", + "logicalsectorsize": "512", + "sectorsize": "512", + "wwid": "eui.002538b471b40718" + }, + "capabilities": { + "gpt-1.00": "GUID Partition Table version 1.00", + "partitioned": "Partitioned disk", + "partitioned:gpt": "GUID partition table" + }, + "children": [ + { + "id": "volume:0", + "class": "volume", + "claimed": true, + "handle": "GUID:631d2564-60c5-4ba8-8fdc-f9f9a9fe8342", + "description": "Windows FAT volume", + "vendor": "mkfs.fat", + "physid": "1", + "businfo": "nvme@0:1,1", + "logicalname": [ + "/dev/nvme0n1p1", + "/boot/efi" + ], + "dev": "259:1", + "version": "FAT32", + "serial": "b0c3-af95", + "size": 998227968, + "capacity": 999292416, + "configuration": { + "FATs": "2", + "filesystem": "fat", + "mount.fstype": "vfat", + "mount.options": "rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro", + "name": "EFI", + "state": "mounted" + }, + "capabilities": { + "boot": "Contains boot code", + "fat": "Windows FAT", + "initialized": "initialized volume" + } + }, + { + "id": "volume:1", + "class": "volume", + "claimed": true, + "handle": "GUID:52951680-c216-4d41-8990-fa1077a8b4a6", + "description": "EXT4 volume", + "vendor": "Linux", + "physid": "2", + "businfo": "nvme@0:1,2", + "logicalname": [ + "/dev/nvme0n1p2", + "/" + ], + "dev": "259:2", + "version": "1.0", + "serial": "789e6c5c-7e98-4971-be6e-5772b2427751", + "size": 249999998976, + "capacity": 249999999488, + "configuration": { + "created": "2020-11-07 14:20:41", + "filesystem": "ext4", + "label": "GENTOO", + "lastmountpoint": "/", + "modified": "2020-11-08 08:10:25", + "mount.fstype": "ext4", + "mount.options": "rw,relatime,errors=remount-ro", + "mounted": "2022-03-15 08:04:31", + "name": "ROOT", + "state": "mounted" + }, + "capabilities": { + "journaled": true, + "extended_attributes": "Extended Attributes", + "large_files": "4GB+ files", + "huge_files": "16TB+ files", + "dir_nlink": "directories with 65000+ subdirs", + "recover": "needs recovery", + "64bit": "64bit filesystem", + "extents": "extent-based allocation", + "ext4": true, + "ext2": "EXT2/EXT3", + "initialized": "initialized volume" + } + }, + { + "id": "volume:2", + "class": "volume", + "claimed": true, + "handle": "GUID:dcdda707-de03-4d98-9c9c-5978faadaea3", + "description": "swap partition", + "vendor": "NetBSD", + "physid": "3", + "businfo": "nvme@0:1,3", + "logicalname": "/dev/nvme0n1p3", + "dev": "259:3", + "serial": "dcdda707-de03-4d98-9c9c-5978faadaea3", + "capacity": 2999975424, + "configuration": { + "name": "SWAP BSD" + }, + "capabilities": { + "nofs": "No filesystem" + } + }, + { + "id": "volume:3", + "class": "volume", + "claimed": true, + "handle": "GUID:cf6b5554-fc7f-449d-8a23-dc18e923d85b", + "description": "Linux swap volume", + "vendor": "Linux", + "physid": "4", + "businfo": "nvme@0:1,4", + "logicalname": "/dev/nvme0n1p4", + "dev": "259:4", + "version": "1", + "serial": "0e61b980-1d5b-4e02-9414-7c3c3d9b9c57", + "size": 2999243520, + "capacity": 2999975424, + "configuration": { + "filesystem": "swap", + "pagesize": "4095" + }, + "capabilities": { + "nofs": "No filesystem", + "swap": "Linux swap", + "initialized": "initialized volume" + } + }, + { + "id": "volume:4", + "class": "volume", + "claimed": true, + "handle": "GUID:3fc34104-ca09-4c3d-b153-7dd09de4185a", + "description": "FFS partition", + "vendor": "NetBSD", + "physid": "5", + "businfo": "nvme@0:1,5", + "logicalname": "/dev/nvme0n1p5", + "dev": "259:5", + "serial": "3fc34104-ca09-4c3d-b153-7dd09de4185a", + "capacity": 200000142848, + "configuration": { + "name": "Devuan" + } + }, + { + "id": "volume:5", + "class": "volume", + "claimed": true, + "handle": "GUID:02d94658-530e-c844-ab78-ac48b52b48f9", + "description": "ZFS partition", + "vendor": "FreeBSD", + "physid": "6", + "businfo": "nvme@0:1,6", + "logicalname": "/dev/nvme0n1p6", + "dev": "259:6", + "serial": "02d94658-530e-c844-ab78-ac48b52b48f9", + "capacity": 567208647680 + } + ] + } + ] + } + ] + }, + { + "id": "pci:3", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:06", + "description": "PCI bridge", + "product": "Sunrise Point-LP PCI Express Root Port #9", + "vendor": "Intel Corporation", + "physid": "1d", + "businfo": "pci@0000:00:1d.0", + "version": "f1", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pciexpress": "PCI Express", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "pci", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:07", + "description": "PCI bridge", + "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]", + "vendor": "Intel Corporation", + "physid": "0", + "businfo": "pci@0000:06:00.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "pci:0", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:08", + "description": "PCI bridge", + "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]", + "vendor": "Intel Corporation", + "physid": "0", + "businfo": "pci@0000:07:00.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + } + }, + { + "id": "pci:1", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:09", + "description": "PCI bridge", + "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]", + "vendor": "Intel Corporation", + "physid": "1", + "businfo": "pci@0000:07:01.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + } + }, + { + "id": "pci:2", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:3c", + "description": "PCI bridge", + "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]", + "vendor": "Intel Corporation", + "physid": "2", + "businfo": "pci@0000:07:02.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "usb", + "class": "bus", + "claimed": true, + "handle": "PCI:0000:3c:00.0", + "description": "USB controller", + "product": "JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016]", + "vendor": "Intel Corporation", + "physid": "0", + "businfo": "pci@0000:3c:00.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "xhci_hcd", + "latency": "0" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "xhci": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "usbhost:0", + "class": "bus", + "claimed": true, + "handle": "USB:3:1", + "product": "xHCI Host Controller", + "vendor": "Linux 5.4.72-gentoo-x86_64 xhci-hcd", + "physid": "0", + "businfo": "usb@3", + "logicalname": "usb3", + "version": "5.04", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.00": "USB 2.0" + }, + "children": [ + { + "id": "usb", + "class": "bus", + "claimed": true, + "handle": "USB:3:2", + "description": "USB hub", + "product": "USB2.0 Hub", + "vendor": "VIA Labs, Inc.", + "physid": "2", + "businfo": "usb@3:2", + "version": "4.73", + "configuration": { + "driver": "hub", + "slots": "5", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.10": true + }, + "children": [ + { + "id": "usb:0", + "class": "bus", + "claimed": true, + "handle": "USB:3:3", + "description": "USB hub", + "product": "USB2.0 Hub", + "vendor": "VIA Labs, Inc.", + "physid": "1", + "businfo": "usb@3:2.1", + "version": "4.73", + "configuration": { + "driver": "hub", + "slots": "5", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.10": true + }, + "children": [ + { + "id": "usb:0", + "class": "input", + "claimed": true, + "handle": "USB:3:6", + "description": "Mouse", + "product": "Razer Razer DeathAdder V2", + "vendor": "Razer", + "physid": "2", + "businfo": "usb@3:2.1.2", + "logicalname": [ + "input174", + "/dev/input/event17", + "/dev/input/mouse2", + "input175", + "/dev/input/event18", + "input176", + "/dev/input/event19", + "input177", + "/dev/input/event20", + "input178", + "/dev/input/event21", + "input179", + "/dev/input/event22", + "input179::capslock", + "input179::numlock", + "input179::scrolllock" + ], + "version": "2.00", + "configuration": { + "driver": "usbhid", + "maxpower": "100mA", + "speed": "12Mbit/s" + }, + "capabilities": { + "usb-2.00": "USB 2.0", + "usb": "USB" + } + }, + { + "id": "usb:1", + "class": "input", + "claimed": true, + "handle": "USB:3:8", + "description": "Keyboard", + "product": "Razer Razer Huntsman Mini Consumer Control", + "vendor": "Razer", + "physid": "3", + "businfo": "usb@3:2.1.3", + "logicalname": [ + "input180", + "/dev/input/event23", + "input180::capslock", + "input180::numlock", + "input180::scrolllock", + "input181", + "/dev/input/event24", + "input181::capslock", + "input181::numlock", + "input181::scrolllock", + "input182", + "/dev/input/event25", + "input183", + "/dev/input/event26", + "input184", + "/dev/input/event27", + "input185", + "/dev/input/event28", + "/dev/input/mouse3", + "input186", + "/dev/input/event29" + ], + "version": "2.00", + "serial": "00000000001A", + "configuration": { + "driver": "usbhid", + "maxpower": "500mA", + "speed": "12Mbit/s" + }, + "capabilities": { + "usb-2.00": "USB 2.0", + "usb": "USB" + } + }, + { + "id": "usb:2", + "class": "generic", + "handle": "USB:3:9", + "description": "Generic USB device", + "product": "USB Billboard Device", + "vendor": "VIA Labs, Inc.", + "physid": "5", + "businfo": "usb@3:2.1.5", + "version": "0.01", + "serial": "0000000000000001", + "configuration": { + "maxpower": "100mA", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.01": true + } + } + ] + }, + { + "id": "usb:1", + "class": "generic", + "handle": "USB:3:4", + "description": "Generic USB device", + "product": "USB 2.0 BILLBOARD", + "vendor": "VLI Inc.", + "physid": "3", + "businfo": "usb@3:2.3", + "version": "14.24", + "serial": "0000000000000001", + "configuration": { + "speed": "12Mbit/s" + }, + "capabilities": { + "usb-2.01": true + } + }, + { + "id": "usb:2", + "class": "generic", + "handle": "USB:3:7", + "description": "Generic USB device", + "product": "USB Billboard Device", + "vendor": "VIA Labs, Inc.", + "physid": "5", + "businfo": "usb@3:2.5", + "version": "0.01", + "serial": "0000000000000001", + "configuration": { + "maxpower": "100mA", + "speed": "480Mbit/s" + }, + "capabilities": { + "usb-2.01": true + } + } + ] + } + ] + }, + { + "id": "usbhost:1", + "class": "bus", + "claimed": true, + "handle": "USB:4:1", + "product": "xHCI Host Controller", + "vendor": "Linux 5.4.72-gentoo-x86_64 xhci-hcd", + "physid": "1", + "businfo": "usb@4", + "logicalname": "usb4", + "version": "5.04", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "10000Mbit/s" + }, + "capabilities": { + "usb-3.10": true + }, + "children": [ + { + "id": "usb", + "class": "bus", + "claimed": true, + "handle": "USB:4:2", + "description": "USB hub", + "product": "USB3.0 Hub", + "vendor": "VIA Labs, Inc.", + "physid": "2", + "businfo": "usb@4:2", + "version": "4.73", + "configuration": { + "driver": "hub", + "slots": "4", + "speed": "5000Mbit/s" + }, + "capabilities": { + "usb-3.10": true + }, + "children": [ + { + "id": "usb:0", + "class": "bus", + "claimed": true, + "handle": "USB:4:3", + "description": "USB hub", + "product": "USB3.0 Hub", + "vendor": "VIA Labs, Inc.", + "physid": "1", + "businfo": "usb@4:2.1", + "version": "4.73", + "configuration": { + "driver": "hub", + "slots": "4", + "speed": "5000Mbit/s" + }, + "capabilities": { + "usb-3.10": true + } + }, + { + "id": "usb:1", + "class": "storage", + "claimed": true, + "handle": "SCSI:00", + "description": "Mass storage device", + "product": "Mass Storage Device", + "vendor": "Generic", + "physid": "2", + "businfo": "usb@4:2.2", + "logicalname": "scsi0", + "version": "1.00", + "serial": "058F84688461", + "configuration": { + "driver": "usb-storage", + "maxpower": "800mA", + "speed": "5000Mbit/s" + }, + "capabilities": { + "usb-3.00": true, + "scsi": "SCSI", + "emulated": "Emulated device", + "scsi-host": "SCSI host adapter" + }, + "children": [ + { + "id": "disk:0", + "class": "disk", + "claimed": true, + "handle": "SCSI:00:00:00:00", + "description": "SCSI Disk", + "product": "SD/MMC", + "vendor": "Generic-", + "physid": "0.0.0", + "businfo": "scsi@0:0.0.0", + "logicalname": "/dev/sda", + "dev": "8:0", + "version": "1.00", + "serial": "AU8461", + "configuration": { + "ansiversion": "6", + "logicalsectorsize": "512", + "sectorsize": "512" + }, + "capabilities": { + "removable": "support is removable" + }, + "children": [ + { + "id": "medium", + "class": "disk", + "claimed": true, + "physid": "0", + "logicalname": "/dev/sda", + "dev": "8:0" + } + ] + }, + { + "id": "disk:1", + "class": "disk", + "claimed": true, + "handle": "SCSI:00:00:00:01", + "description": "SCSI Disk", + "product": "Micro SD/M2", + "vendor": "Generic-", + "physid": "0.0.1", + "businfo": "scsi@0:0.0.1", + "logicalname": "/dev/sdb", + "dev": "8:16", + "version": "1.08", + "serial": "AU8461", + "configuration": { + "ansiversion": "6", + "logicalsectorsize": "512", + "sectorsize": "512" + }, + "capabilities": { + "removable": "support is removable" + }, + "children": [ + { + "id": "medium", + "class": "disk", + "claimed": true, + "physid": "0", + "logicalname": "/dev/sdb", + "dev": "8:16" + } + ] + } + ] + }, + { + "id": "usb:2", + "class": "generic", + "claimed": true, + "handle": "USB:4:5", + "description": "Generic USB device", + "product": "USB 10/100/1000 LAN", + "vendor": "Realtek", + "physid": "4", + "businfo": "usb@4:2.4", + "version": "31.00", + "serial": "001000001", + "configuration": { + "driver": "r8152", + "maxpower": "288mA", + "speed": "5000Mbit/s" + }, + "capabilities": { + "usb-3.00": true + } + } + ] + } + ] + } + ] + } + ] + }, + { + "id": "pci:3", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:3d", + "description": "PCI bridge", + "product": "JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]", + "vendor": "Intel Corporation", + "physid": "4", + "businfo": "pci@0000:07:04.0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "capabilities": { + "pci": true, + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "normal_decode": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + } + } + ] + } + ] + }, + { + "id": "isa", + "class": "bridge", + "claimed": true, + "handle": "PCI:0000:00:1f.0", + "description": "ISA bridge", + "product": "Sunrise Point-LP LPC Controller", + "vendor": "Intel Corporation", + "physid": "1f", + "businfo": "pci@0000:00:1f.0", + "version": "21", + "width": 32, + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "capabilities": { + "isa": true, + "bus_master": "bus mastering" + }, + "children": [ + { + "id": "pnp00:00", + "class": "system", + "claimed": true, + "product": "Motherboard registers", + "physid": "0", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:01", + "class": "system", + "claimed": true, + "product": "Motherboard registers", + "physid": "1", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:02", + "class": "system", + "claimed": true, + "product": "Motherboard registers", + "physid": "2", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:03", + "class": "system", + "claimed": true, + "product": "AT Real-Time Clock", + "physid": "3", + "configuration": { + "driver": "rtc_cmos" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:04", + "class": "generic", + "claimed": true, + "product": "PnP device INT3f0d", + "physid": "4", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:05", + "class": "generic", + "claimed": true, + "product": "PnP device LEN0071", + "physid": "5", + "configuration": { + "driver": "i8042 kbd" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:06", + "class": "generic", + "claimed": true, + "product": "PnP device LEN0072", + "physid": "6", + "configuration": { + "driver": "i8042 aux" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:07", + "class": "system", + "claimed": true, + "product": "Motherboard registers", + "physid": "7", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:08", + "class": "system", + "claimed": true, + "product": "Motherboard registers", + "physid": "8", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:09", + "class": "system", + "claimed": true, + "product": "Motherboard registers", + "physid": "9", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:0a", + "class": "system", + "claimed": true, + "product": "System Board", + "physid": "a", + "configuration": { + "driver": "system" + }, + "capabilities": { + "pnp": true + } + } + ] + }, + { + "id": "memory", + "class": "memory", + "handle": "PCI:0000:00:1f.2", + "description": "Memory controller", + "product": "Sunrise Point-LP PMC", + "vendor": "Intel Corporation", + "physid": "1f.2", + "businfo": "pci@0000:00:1f.2", + "version": "21", + "width": 32, + "clock": 33000000, + "configuration": { + "latency": "0" + } + }, + { + "id": "multimedia", + "class": "multimedia", + "claimed": true, + "handle": "PCI:0000:00:1f.3", + "description": "Audio device", + "product": "Sunrise Point-LP HD Audio", + "vendor": "Intel Corporation", + "physid": "1f.3", + "businfo": "pci@0000:00:1f.3", + "logicalname": [ + "card0", + "/dev/snd/controlC0", + "/dev/snd/hwC0D0", + "/dev/snd/hwC0D2", + "/dev/snd/pcmC0D0c", + "/dev/snd/pcmC0D0p", + "/dev/snd/pcmC0D10p", + "/dev/snd/pcmC0D3p", + "/dev/snd/pcmC0D7p", + "/dev/snd/pcmC0D8p", + "/dev/snd/pcmC0D9p" + ], + "version": "21", + "width": 64, + "clock": 33000000, + "configuration": { + "driver": "snd_hda_intel", + "latency": "64" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing" + }, + "children": [ + { + "id": "input:0", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH Mic", + "physid": "0", + "logicalname": [ + "input11", + "/dev/input/event10" + ] + }, + { + "id": "input:1", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH Headphone", + "physid": "1", + "logicalname": [ + "input12", + "/dev/input/event11" + ] + }, + { + "id": "input:2", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH HDMI/DP,pcm=3", + "physid": "2", + "logicalname": [ + "input13", + "/dev/input/event12" + ] + }, + { + "id": "input:3", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH HDMI/DP,pcm=7", + "physid": "3", + "logicalname": [ + "input14", + "/dev/input/event13" + ] + }, + { + "id": "input:4", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH HDMI/DP,pcm=8", + "physid": "4", + "logicalname": [ + "input15", + "/dev/input/event14" + ] + }, + { + "id": "input:5", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH HDMI/DP,pcm=9", + "physid": "5", + "logicalname": [ + "input16", + "/dev/input/event15" + ] + }, + { + "id": "input:6", + "class": "input", + "claimed": true, + "product": "HDA Intel PCH HDMI/DP,pcm=10", + "physid": "6", + "logicalname": [ + "input17", + "/dev/input/event16" + ] + } + ] + }, + { + "id": "serial", + "class": "bus", + "claimed": true, + "handle": "PCI:0000:00:1f.4", + "description": "SMBus", + "product": "Sunrise Point-LP SMBus", + "vendor": "Intel Corporation", + "physid": "1f.4", + "businfo": "pci@0000:00:1f.4", + "version": "21", + "width": 64, + "clock": 33000000, + "configuration": { + "driver": "i801_smbus", + "latency": "0" + } + }, + { + "id": "network", + "class": "network", + "claimed": true, + "handle": "PCI:0000:00:1f.6", + "description": "Ethernet interface", + "product": "Ethernet Connection (4) I219-V", + "vendor": "Intel Corporation", + "physid": "1f.6", + "businfo": "pci@0000:00:1f.6", + "logicalname": "enp0s31f6", + "version": "21", + "serial": "54:e1:ad:11:fb:b7", + "units": "bit/s", + "capacity": 1000000000, + "width": 32, + "clock": 33000000, + "configuration": { + "autonegotiation": "on", + "broadcast": "yes", + "driver": "e1000e", + "driverversion": "3.2.6-k", + "firmware": "0.1-4", + "latency": "0", + "link": "no", + "multicast": "yes", + "port": "twisted pair" + }, + "capabilities": { + "pm": "Power Management", + "msi": "Message Signalled Interrupts", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "ethernet": true, + "physical": "Physical interface", + "tp": "twisted pair", + "10bt": "10Mbit/s", + "10bt-fd": "10Mbit/s (full duplex)", + "100bt": "100Mbit/s", + "100bt-fd": "100Mbit/s (full duplex)", + "1000bt-fd": "1Gbit/s (full duplex)", + "autonegotiation": "Auto-negotiation" + } + } + ] + } + ] + }, + { + "id": "battery", + "class": "power", + "claimed": true, + "handle": "DMI:0023", + "product": "01AV429", + "vendor": "LGC", + "physid": "1", + "slot": "Front", + "units": "mWh", + "capacity": 57000, + "configuration": { + "voltage": "11,6V" + } + }, + { + "id": "input:0", + "class": "input", + "claimed": true, + "product": "Sleep Button", + "physid": "2", + "logicalname": [ + "input0", + "/dev/input/event0" + ], + "capabilities": { + "platform": true + } + }, + { + "id": "input:1", + "class": "input", + "claimed": true, + "product": "Lid Switch", + "physid": "3", + "logicalname": [ + "input1", + "/dev/input/event1" + ], + "capabilities": { + "platform": true + } + }, + { + "id": "input:2", + "class": "input", + "claimed": true, + "product": "PC Speaker", + "physid": "4", + "logicalname": [ + "input10", + "/dev/input/event9" + ], + "capabilities": { + "isa": "ISA bus" + } + }, + { + "id": "input:3", + "class": "input", + "claimed": true, + "product": "Power Button", + "physid": "5", + "logicalname": [ + "input2", + "/dev/input/event2" + ], + "capabilities": { + "platform": true + } + }, + { + "id": "input:4", + "class": "input", + "claimed": true, + "product": "AT Translated Set 2 keyboard", + "physid": "6", + "logicalname": [ + "input3", + "/dev/input/event3", + "input3::capslock", + "input3::numlock", + "input3::scrolllock" + ], + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + } + }, + { + "id": "input:5", + "class": "input", + "claimed": true, + "product": "SynPS/2 Synaptics TouchPad", + "physid": "7", + "logicalname": [ + "input5", + "/dev/input/event4", + "/dev/input/mouse0" + ], + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + } + }, + { + "id": "input:6", + "class": "input", + "claimed": true, + "product": "TPPS/2 Elan TrackPoint", + "physid": "8", + "logicalname": [ + "input6", + "/dev/input/event5", + "/dev/input/mouse1" + ], + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + } + }, + { + "id": "input:7", + "class": "input", + "claimed": true, + "product": "ThinkPad Extra Buttons", + "physid": "9", + "logicalname": [ + "input7", + "/dev/input/event6" + ], + "capabilities": { + "platform": true + } + }, + { + "id": "input:8", + "class": "input", + "claimed": true, + "product": "Video Bus", + "physid": "a", + "logicalname": [ + "input8", + "/dev/input/event7" + ], + "capabilities": { + "platform": true + } + }, + { + "id": "network", + "class": "network", + "claimed": true, + "description": "Ethernet interface", + "physid": "b", + "businfo": "usb@4:2.4", + "logicalname": "enp60s0u2u4", + "serial": "48:65:ee:17:57:1a", + "units": "bit/s", + "size": 100000000, + "capacity": 1000000000, + "configuration": { + "autonegotiation": "on", + "broadcast": "yes", + "driver": "r8152", + "driverversion": "v1.10.11", + "duplex": "full", + "ip": "192.168.1.35", + "link": "yes", + "multicast": "yes", + "port": "MII", + "speed": "100Mbit/s" + }, + "capabilities": { + "ethernet": true, + "physical": "Physical interface", + "tp": "twisted pair", + "mii": "Media Independant Interface", + "10bt": "10Mbit/s", + "10bt-fd": "10Mbit/s (full duplex)", + "100bt": "100Mbit/s", + "100bt-fd": "100Mbit/s (full duplex)", + "1000bt": "1Gbit/s", + "1000bt-fd": "1Gbit/s (full duplex)", + "autonegotiation": "Auto-negotiation" + } + } + ] + }, + "dmidecode": "# dmidecode 3.2\nGetting SMBIOS data from sysfs.\nSMBIOS 3.0.0 present.\nTable at 0x4F10E000.\n\nHandle 0x0000, DMI type 222, 16 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tDE 10 00 00 01 00 99 00 03 10 01 20 02 30 03 00\n\tStrings:\n\t\tMemory Init Complete\n\t\tEnd of DXE Phase\n\t\tBIOS Boot Complete\n\nHandle 0x0001, DMI type 14, 8 bytes\nGroup Associations\n\tName: Intel(R) Silicon View Technology\n\tItems: 1\n\t\t0x0000 (OEM-specific)\n\nHandle 0x0002, DMI type 134, 13 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t86 0D 02 00 27 04 17 20 00 00 00 00 00\n\nHandle 0x0003, DMI type 16, 23 bytes\nPhysical Memory Array\n\tLocation: System Board Or Motherboard\n\tUse: System Memory\n\tError Correction Type: None\n\tMaximum Capacity: 16 GB\n\tError Information Handle: Not Provided\n\tNumber Of Devices: 2\n\nHandle 0x0004, DMI type 17, 40 bytes\nMemory Device\n\tArray Handle: 0x0003\n\tError Information Handle: Not Provided\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 8192 MB\n\tForm Factor: Row Of Chips\n\tSet: None\n\tLocator: ChannelA-DIMM0\n\tBank Locator: BANK 0\n\tType: LPDDR3\n\tType Detail: Synchronous Unbuffered (Unregistered)\n\tSpeed: 1867 MT/s\n\tManufacturer: Samsung\n\tSerial Number: 00000000\n\tAsset Tag: None\n\tPart Number: K4EBE304EB-EGCF \n\tRank: 2\n\tConfigured Memory Speed: 1867 MT/s\n\tMinimum Voltage: Unknown\n\tMaximum Voltage: Unknown\n\tConfigured Voltage: 1.2 V\n\nHandle 0x0005, DMI type 17, 40 bytes\nMemory Device\n\tArray Handle: 0x0003\n\tError Information Handle: Not Provided\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 8192 MB\n\tForm Factor: Row Of Chips\n\tSet: None\n\tLocator: ChannelB-DIMM0\n\tBank Locator: BANK 2\n\tType: LPDDR3\n\tType Detail: Synchronous Unbuffered (Unregistered)\n\tSpeed: 1867 MT/s\n\tManufacturer: Samsung\n\tSerial Number: 00000000\n\tAsset Tag: None\n\tPart Number: K4EBE304EB-EGCF \n\tRank: 2\n\tConfigured Memory Speed: 1867 MT/s\n\tMinimum Voltage: Unknown\n\tMaximum Voltage: Unknown\n\tConfigured Voltage: 1.2 V\n\nHandle 0x0006, DMI type 19, 31 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x003FFFFFFFF\n\tRange Size: 16 GB\n\tPhysical Array Handle: 0x0003\n\tPartition Width: 2\n\nHandle 0x0007, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L1 Cache\n\tConfiguration: Enabled, Not Socketed, Level 1\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 128 kB\n\tMaximum Size: 128 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Parity\n\tSystem Type: Unified\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0008, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L2 Cache\n\tConfiguration: Enabled, Not Socketed, Level 2\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 512 kB\n\tMaximum Size: 512 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Unified\n\tAssociativity: 4-way Set-associative\n\nHandle 0x0009, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: L3 Cache\n\tConfiguration: Enabled, Not Socketed, Level 3\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 4096 kB\n\tMaximum Size: 4096 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Multi-bit ECC\n\tSystem Type: Unified\n\tAssociativity: 16-way Set-associative\n\nHandle 0x000A, DMI type 4, 48 bytes\nProcessor Information\n\tSocket Designation: U3E1\n\tType: Central Processor\n\tFamily: Core i7\n\tManufacturer: Intel(R) Corporation\n\tID: E9 06 08 00 FF FB EB BF\n\tSignature: Type 0, Family 6, Model 142, Stepping 9\n\tFlags:\n\t\tFPU (Floating-point unit on-chip)\n\t\tVME (Virtual mode extension)\n\t\tDE (Debugging extension)\n\t\tPSE (Page size extension)\n\t\tTSC (Time stamp counter)\n\t\tMSR (Model specific registers)\n\t\tPAE (Physical address extension)\n\t\tMCE (Machine check exception)\n\t\tCX8 (CMPXCHG8 instruction supported)\n\t\tAPIC (On-chip APIC hardware supported)\n\t\tSEP (Fast system call)\n\t\tMTRR (Memory type range registers)\n\t\tPGE (Page global enable)\n\t\tMCA (Machine check architecture)\n\t\tCMOV (Conditional move instruction supported)\n\t\tPAT (Page attribute table)\n\t\tPSE-36 (36-bit page size extension)\n\t\tCLFSH (CLFLUSH instruction supported)\n\t\tDS (Debug store)\n\t\tACPI (ACPI supported)\n\t\tMMX (MMX technology supported)\n\t\tFXSR (FXSAVE and FXSTOR instructions supported)\n\t\tSSE (Streaming SIMD extensions)\n\t\tSSE2 (Streaming SIMD extensions 2)\n\t\tSS (Self-snoop)\n\t\tHTT (Multi-threading)\n\t\tTM (Thermal monitor supported)\n\t\tPBE (Pending break enabled)\n\tVersion: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\n\tVoltage: 1.0 V\n\tExternal Clock: 100 MHz\n\tMax Speed: 2900 MHz\n\tCurrent Speed: 2700 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Other\n\tL1 Cache Handle: 0x0007\n\tL2 Cache Handle: 0x0008\n\tL3 Cache Handle: 0x0009\n\tSerial Number: None\n\tAsset Tag: None\n\tPart Number: None\n\tCore Count: 2\n\tCore Enabled: 2\n\tThread Count: 4\n\tCharacteristics:\n\t\t64-bit capable\n\t\tMulti-Core\n\t\tHardware Thread\n\t\tExecute Protection\n\t\tEnhanced Virtualization\n\t\tPower/Performance Control\n\nHandle 0x000B, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: LENOVO\n\tVersion: N1MET31W (1.16 )\n\tRelease Date: 03/10/2017\n\tAddress: 0xE0000\n\tRuntime Size: 128 kB\n\tROM Size: 16 MB\n\tCharacteristics:\n\t\tPCI is supported\n\t\tPNP is supported\n\t\tBIOS is upgradeable\n\t\tBIOS shadowing is allowed\n\t\tBoot from CD is supported\n\t\tSelectable boot is supported\n\t\tEDD is supported\n\t\t3.5\"/720 kB floppy services are supported (int 13h)\n\t\tPrint screen service is supported (int 5h)\n\t\t8042 keyboard services are supported (int 9h)\n\t\tSerial services are supported (int 14h)\n\t\tPrinter services are supported (int 17h)\n\t\tCGA/mono video services are supported (int 10h)\n\t\tACPI is supported\n\t\tUSB legacy is supported\n\t\tBIOS boot specification is supported\n\t\tTargeted content distribution is supported\n\t\tUEFI is supported\n\tBIOS Revision: 1.16\n\tFirmware Revision: 1.11\n\nHandle 0x000C, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: LENOVO\n\tProduct Name: 20HRCTO1WW\n\tVersion: ThinkPad X1 Carbon 5th\n\tSerial Number: PF0QMY5N\n\tUUID: 305f33cc-33ca-11b2-a85c-aad0993c0c99\n\tWake-up Type: Power Switch\n\tSKU Number: LENOVO_MT_20HR_BU_Think_FM_ThinkPad X1 Carbon 5th\n\tFamily: ThinkPad X1 Carbon 5th\n\nHandle 0x000D, DMI type 2, 15 bytes\nBase Board Information\n\tManufacturer: LENOVO\n\tProduct Name: 20HRCTO1WW\n\tVersion: SDK0J40709 WIN\n\tSerial Number: L3HF74S00AZ\n\tAsset Tag: Not Available\n\tFeatures:\n\t\tBoard is a hosting board\n\t\tBoard is replaceable\n\tLocation In Chassis: Not Available\n\tChassis Handle: 0x0000\n\tType: Motherboard\n\tContained Object Handles: 0\n\nHandle 0x000E, DMI type 3, 22 bytes\nChassis Information\n\tManufacturer: LENOVO\n\tType: Notebook\n\tLock: Not Present\n\tVersion: None\n\tSerial Number: PF0QMY5N\n\tAsset Tag: No Asset Information\n\tBoot-up State: Unknown\n\tPower Supply State: Unknown\n\tThermal State: Unknown\n\tSecurity Status: Unknown\n\tOEM Information: 0x00000000\n\tHeight: Unspecified\n\tNumber Of Power Cords: Unspecified\n\tContained Elements: 0\n\tSKU Number: Not Specified\n\nHandle 0x000F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB 1\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0010, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB 2\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0011, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB 3\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0012, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB 4\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0013, DMI type 126, 9 bytes\nInactive\n\nHandle 0x0014, DMI type 126, 9 bytes\nInactive\n\nHandle 0x0015, DMI type 126, 9 bytes\nInactive\n\nHandle 0x0016, DMI type 126, 9 bytes\nInactive\n\nHandle 0x0017, DMI type 126, 9 bytes\nInactive\n\nHandle 0x0018, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: Ethernet\n\tExternal Connector Type: RJ-45\n\tPort Type: Network Port\n\nHandle 0x0019, DMI type 126, 9 bytes\nInactive\n\nHandle 0x001A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: Hdmi\n\tExternal Connector Type: Other\n\tPort Type: Video Port\n\nHandle 0x001B, DMI type 126, 9 bytes\nInactive\n\nHandle 0x001C, DMI type 126, 9 bytes\nInactive\n\nHandle 0x001D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: Not Available\n\tInternal Connector Type: None\n\tExternal Reference Designator: Headphone/Microphone Combo Jack1\n\tExternal Connector Type: Mini Jack (headphones)\n\tPort Type: Audio Port\n\nHandle 0x001E, DMI type 126, 9 bytes\nInactive\n\nHandle 0x001F, DMI type 9, 17 bytes\nSystem Slot Information\n\tDesignation: Media Card Slot\n\tType: Other\n\tCurrent Usage: Available\n\tLength: Other\n\tCharacteristics:\n\t\tHot-plug devices are supported\n\tBus Address: 0000:00:00.0\n\nHandle 0x0020, DMI type 9, 17 bytes\nSystem Slot Information\n\tDesignation: SimCard Slot\n\tType: Other\n\tCurrent Usage: Available\n\tLength: Other\n\tCharacteristics: None\n\tBus Address: 0000:00:00.0\n\nHandle 0x0021, DMI type 12, 5 bytes\nSystem Configuration Options\n\nHandle 0x0022, DMI type 13, 22 bytes\nBIOS Language Information\n\tLanguage Description Format: Abbreviated\n\tInstallable Languages: 1\n\t\ten-US\n\tCurrently Installed Language: en-US\n\nHandle 0x0023, DMI type 22, 26 bytes\nPortable Battery\n\tLocation: Front\n\tManufacturer: LGC\n\tName: 01AV429\n\tDesign Capacity: 57000 mWh\n\tDesign Voltage: 11580 mV\n\tSBDS Version: 03.01\n\tMaximum Error: Unknown\n\tSBDS Serial Number: 0431\n\tSBDS Manufacture Date: 2017-03-29\n\tSBDS Chemistry: LiP\n\tOEM-specific Information: 0x00000000\n\nHandle 0x0024, DMI type 126, 26 bytes\nInactive\n\nHandle 0x0025, DMI type 133, 5 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t85 05 25 00 01\n\tStrings:\n\t\tKHOIHGIUCCHHII\n\nHandle 0x0026, DMI type 135, 19 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t87 13 26 00 54 50 07 02 42 41 59 20 49 2F 4F 20\n\t\t04 00 00\n\nHandle 0x0027, DMI type 130, 20 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t82 14 27 00 24 41 4D 54 00 00 00 00 00 A5 AF 02\n\t\tC0 00 00 00\n\nHandle 0x0028, DMI type 131, 64 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t83 40 28 00 31 00 00 00 0B 00 00 00 00 00 0A 00\n\t\tF8 00 58 9D 00 00 00 00 01 00 00 00 06 00 0B 00\n\t\tAC 04 0A 00 00 00 00 00 FE 00 D8 15 00 00 00 00\n\t\t00 00 00 00 22 00 00 00 76 50 72 6F 00 00 00 00\n\nHandle 0x0029, DMI type 221, 26 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tDD 1A 29 00 03 01 00 01 05 00 00 00 02 00 00 00\n\t\t00 4E 00 03 00 00 05 00 00 00\n\tStrings:\n\t\tReference Code - CPU\n\t\tuCode Version\n\t\tTXT ACM version\n\nHandle 0x002A, DMI type 221, 26 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tDD 1A 2A 00 03 01 00 01 05 00 00 00 02 00 0B 00\n\t\t00 0A 00 03 04 0B 06 0A AC 04\n\tStrings:\n\t\tReference Code - ME 11.0\n\t\tMEBx version\n\t\tME Firmware Version\n\t\tConsumer SKU\n\nHandle 0x002B, DMI type 221, 75 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tDD 4B 2B 00 0A 01 00 01 05 00 00 00 02 03 FF FF\n\t\tFF FF FF 04 00 FF FF FF 21 00 05 00 FF FF FF 21\n\t\t00 06 00 02 0A 00 00 00 07 00 3E 00 00 00 00 08\n\t\t00 34 00 00 00 00 09 00 0B 00 00 00 00 0A 00 3E\n\t\t00 00 00 00 0B 00 34 00 00 00 00\n\tStrings:\n\t\tReference Code - SKL PCH\n\t\tPCH-CRID Status\n\t\tDisabled\n\t\tPCH-CRID Original Value\n\t\tPCH-CRID New Value\n\t\tOPROM - RST - RAID\n\t\tSKL PCH H Bx Hsio Version\n\t\tSKL PCH H Dx Hsio Version\n\t\tKBL PCH H Ax Hsio Version\n\t\tSKL PCH LP Bx Hsio Version\n\t\tSKL PCH LP Cx Hsio Version\n\nHandle 0x002C, DMI type 221, 54 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tDD 36 2C 00 07 01 00 01 05 00 00 00 02 00 01 05\n\t\t00 00 00 03 00 01 05 00 00 00 04 05 FF FF FF FF\n\t\tFF 06 00 FF FF FF 02 00 07 00 FF FF FF 02 00 08\n\t\t00 FF FF FF 04 02\n\tStrings:\n\t\tReference Code - SA - System Agent\n\t\tReference Code - MRC\n\t\tSA - PCIe Version\n\t\tSA-CRID Status\n\t\tEnabled \n\t\tSA-CRID Original Value\n\t\tSA-CRID New Value\n\t\tOPROM - VBIOS\n\nHandle 0x002D, DMI type 15, 31 bytes\nSystem Event Log\n\tArea Length: 34 bytes\n\tHeader Start Offset: 0x0000\n\tHeader Length: 16 bytes\n\tData Start Offset: 0x0010\n\tAccess Method: General-purpose non-volatile data functions\n\tAccess Address: 0x00F0\n\tStatus: Valid, Not Full\n\tChange Token: 0x00000001\n\tHeader Format: Type 1\n\tSupported Log Type Descriptors: 4\n\tDescriptor 1: POST error\n\tData Format 1: POST results bitmap\n\tDescriptor 2: PCI system error\n\tData Format 2: None\n\tDescriptor 3: System reconfigured\n\tData Format 3: None\n\tDescriptor 4: Log area reset/cleared\n\tData Format 4: None\n\nHandle 0x002E, DMI type 24, 5 bytes\nHardware Security\n\tPower-On Password Status: Disabled\n\tKeyboard Password Status: Not Implemented\n\tAdministrator Password Status: Disabled\n\tFront Panel Reset Status: Not Implemented\n\nHandle 0x002F, DMI type 132, 7 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t84 07 2F 00 01 D8 36\n\nHandle 0x0030, DMI type 18, 23 bytes\n32-bit Memory Error Information\n\tType: OK\n\tGranularity: Unknown\n\tOperation: Unknown\n\tVendor Syndrome: Unknown\n\tMemory Array Address: Unknown\n\tDevice Address: Unknown\n\tResolution: Unknown\n\nHandle 0x0031, DMI type 21, 7 bytes\nBuilt-in Pointing Device\n\tType: Track Point\n\tInterface: PS/2\n\tButtons: 3\n\nHandle 0x0032, DMI type 21, 7 bytes\nBuilt-in Pointing Device\n\tType: Touch Pad\n\tInterface: PS/2\n\tButtons: 2\n\nHandle 0x0033, DMI type 131, 22 bytes\nThinkVantage Technologies\n\tVersion: 1\n\tDiagnostics: No\n\nHandle 0x0034, DMI type 136, 6 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t88 06 34 00 5A 5A\n\nHandle 0x0035, DMI type 140, 19 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t8C 13 35 00 4C 45 4E 4F 56 4F 0B 04 01 B2 00 4D\n\t\t53 20 00\n\nHandle 0x0036, DMI type 140, 19 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t8C 13 36 00 4C 45 4E 4F 56 4F 0B 05 01 05 00 00\n\t\t00 00 00\n\nHandle 0x0037, DMI type 140, 23 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t8C 17 37 00 4C 45 4E 4F 56 4F 0B 06 01 8A 13 00\n\t\t00 00 00 00 00 00 00\n\nHandle 0x0038, DMI type 14, 8 bytes\nGroup Associations\n\tName: $MEI\n\tItems: 1\n\t\t0x0000 (OEM-specific)\n\nHandle 0x0039, DMI type 219, 81 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tDB 51 39 00 01 03 01 45 02 00 A0 06 01 00 66 20\n\t\t00 00 00 00 40 08 00 01 1F 00 00 C9 0A 40 44 02\n\t\tFF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF\n\t\tFF FF FF FF FF FF FF FF 03 00 00 00 80 00 00 00\n\t\t00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n\t\t00\n\tStrings:\n\t\tMEI1\n\t\tMEI2\n\t\tMEI3\n\nHandle 0x003A, DMI type 140, 15 bytes\nThinkPad Embedded Controller Program\n\tVersion ID: N1MHT22W\n\tRelease Date: 03/10/2017\n\nHandle 0x003B, DMI type 140, 43 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t8C 2B 3B 00 4C 45 4E 4F 56 4F 0B 08 01 FF FF FF\n\t\tFF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF\n\t\tFF FF FF FF FF FF FF FF FF FF FF\n\nHandle 0x003C, DMI type 135, 18 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t87 12 3C 00 54 50 07 01 01 00 01 00 00 00 01 00\n\t\t00 00\n\nHandle 0xFEFF, DMI type 127, 4 bytes\nEnd Of Table\n\n", + "hwinfo": "01: None 00.0: 10105 BIOS\n [Created at bios.186]\n Unique ID: rdCR.lZF+r4EgHp4\n Hardware Class: bios\n BIOS Keyboard LED Status:\n Scroll Lock: off\n Num Lock: off\n Caps Lock: off\n Base Memory: 628 kB\n PnP BIOS: @@@0000\n BIOS32 Service Directory Entry: 0xfd000\n SMBIOS Version: 3.0\n Type 222 Record: #0\n Data 00: de 10 00 00 01 00 99 00 03 10 01 20 02 30 03 00\n String 1: \"Memory Init Complete\"\n String 2: \"End of DXE Phase\"\n String 3: \"BIOS Boot Complete\"\n Group Associations: #1\n Group Name: \"Intel(R) Silicon View Technology\"\n Items: #0\n Type 134 Record: #2\n Data 00: 86 0d 02 00 27 04 17 20 00 00 00 00 00\n Physical Memory Array: #3\n Use: 0x03 (System memory)\n Location: 0x03 (Motherboard)\n Slots: 2\n Max. Size: 16 GB\n ECC: 0x03 (None)\n Memory Device: #4\n Location: \"ChannelA-DIMM0\"\n Bank: \"BANK 0\"\n Manufacturer: \"Samsung\"\n Serial: \"00000000\"\n Asset Tag: \"None\"\n Part Number: \"K4EBE304EB-EGCF\"\n Memory Array: #3\n Form Factor: 0x0b (Row of Chips)\n Type: 0x1d (Other)\n Type Detail: 0x4080 (Synchronous)\n Data Width: 64 bits\n Size: 8 GB\n Speed: 1867 MHz\n Memory Device: #5\n Location: \"ChannelB-DIMM0\"\n Bank: \"BANK 2\"\n Manufacturer: \"Samsung\"\n Serial: \"00000000\"\n Asset Tag: \"None\"\n Part Number: \"K4EBE304EB-EGCF\"\n Memory Array: #3\n Form Factor: 0x0b (Row of Chips)\n Type: 0x1d (Other)\n Type Detail: 0x4080 (Synchronous)\n Data Width: 64 bits\n Size: 8 GB\n Speed: 1867 MHz\n Memory Array Mapping: #6\n Memory Array: #3\n Partition Width: 2\n Start Address: 0x0000000000000000\n End Address: 0x0000000400000000\n Cache Info: #7\n Designation: \"L1 Cache\"\n Level: L1\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x04 (Parity)\n Type: 0x05 (Unified)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 128 kB\n Current Size: 128 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #8\n Designation: \"L2 Cache\"\n Level: L2\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x05 (Unified)\n Associativity: 0x05 (4-way Set-Associative)\n Max. Size: 512 kB\n Current Size: 512 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #9\n Designation: \"L3 Cache\"\n Level: L3\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x06 (Multi-bit)\n Type: 0x05 (Unified)\n Associativity: 0x08 (16-way Set-Associative)\n Max. Size: 4096 kB\n Current Size: 4096 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Processor Info: #10\n Socket: \"U3E1\"\n Socket Type: 0x01 (Other)\n Socket Status: Populated\n Type: 0x03 (CPU)\n Family: 0xc6 (Other)\n Manufacturer: \"Intel(R) Corporation\"\n Version: \"Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\"\n Serial: \"None\"\n Asset Tag: \"None\"\n Part Number: \"None\"\n Processor ID: 0xbfebfbff000806e9\n Status: 0x01 (Enabled)\n Voltage: 1.0 V\n External Clock: 100 MHz\n Max. Speed: 2900 MHz\n Current Speed: 2700 MHz\n L1 Cache: #7\n L2 Cache: #8\n L3 Cache: #9\n BIOS Info: #11\n Vendor: \"LENOVO\"\n Version: \"N1MET31W (1.16 )\"\n Date: \"03/10/2017\"\n Start Address: 0xe0000\n ROM Size: 16384 kB\n Features: 0x0d03001200007d099a80\n PCI supported\n PnP supported\n BIOS flashable\n BIOS shadowing allowed\n CD boot supported\n Selectable boot supported\n EDD spec supported\n 720kB Floppy supported\n Print Screen supported\n 8042 Keyboard Services supported\n Serial Services supported\n Printer Services supported\n CGA/Mono Video supported\n ACPI supported\n USB Legacy supported\n BIOS Boot Spec supported\n System Info: #12\n Manufacturer: \"LENOVO\"\n Product: \"20HRCTO1WW\"\n Version: \"ThinkPad X1 Carbon 5th\"\n Serial: \"PF0QMY5N\"\n UUID: 305f33cc-33ca-11b2-a85c-aad0993c0c99\n Wake-up: 0x06 (Power Switch)\n Board Info: #13\n Manufacturer: \"LENOVO\"\n Product: \"20HRCTO1WW\"\n Version: \"SDK0J40709 WIN\"\n Serial: \"L3HF74S00AZ\"\n Asset Tag: \"Not Available\"\n Type: 0x0a (Motherboard)\n Features: 0x09\n Hosting Board\n Replaceable\n Location: \"Not Available\"\n Chassis Info: #14\n Manufacturer: \"LENOVO\"\n Version: \"None\"\n Serial: \"PF0QMY5N\"\n Asset Tag: \"No Asset Information\"\n Type: 0x0a (Notebook)\n Bootup State: 0x02 (Unknown)\n Power Supply State: 0x02 (Unknown)\n Thermal State: 0x02 (Unknown)\n Security Status: 0x02 (Unknown)\n Port Connector: #15\n Type: 0x10 (USB)\n Internal Designator: \"Not Available\"\n External Designator: \"USB 1\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #16\n Type: 0x10 (USB)\n Internal Designator: \"Not Available\"\n External Designator: \"USB 2\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #17\n Type: 0x10 (USB)\n Internal Designator: \"Not Available\"\n External Designator: \"USB 3\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #18\n Type: 0x10 (USB)\n Internal Designator: \"Not Available\"\n External Designator: \"USB 4\"\n External Connector: 0x12 (Access Bus [USB])\n Inactive Record: #19\n Data 00: 7e 09 13 00 01 00 02 12 10\n String 1: \"Not Available\"\n String 2: \"USB 5\"\n Inactive Record: #20\n Data 00: 7e 09 14 00 01 00 02 12 10\n String 1: \"Not Available\"\n String 2: \"USB 6\"\n Inactive Record: #21\n Data 00: 7e 09 15 00 01 00 02 12 10\n String 1: \"Not Available\"\n String 2: \"USB 7\"\n Inactive Record: #22\n Data 00: 7e 09 16 00 01 00 02 12 10\n String 1: \"Not Available\"\n String 2: \"USB 8\"\n Inactive Record: #23\n Data 00: 7e 09 17 00 01 00 02 12 10\n String 1: \"Not Available\"\n String 2: \"USB 9\"\n Port Connector: #24\n Type: 0x1f (Network Port)\n Internal Designator: \"Not Available\"\n External Designator: \"Ethernet\"\n External Connector: 0x0b (RJ-45)\n Inactive Record: #25\n Data 00: 7e 09 19 00 01 00 02 07 1c\n String 1: \"Not Available\"\n String 2: \"External Monitor\"\n Port Connector: #26\n Type: 0x1c (Video Port)\n Internal Designator: \"Not Available\"\n External Designator: \"Hdmi\"\n External Connector: 0xff (Other)\n Inactive Record: #27\n Data 00: 7e 09 1b 00 01 00 02 ff 1c\n String 1: \"Not Available\"\n String 2: \"DisplayPort/DVI-D\"\n Inactive Record: #28\n Data 00: 7e 09 1c 00 01 00 02 ff 1c\n String 1: \"Not Available\"\n String 2: \"DisplayPort/HDMI\"\n Port Connector: #29\n Type: 0x1d (Audio Port)\n Internal Designator: \"Not Available\"\n External Designator: \"Headphone/Microphone Combo Jack1\"\n External Connector: 0x1f (Mini-jack [headphones])\n Inactive Record: #30\n Data 00: 7e 09 1e 00 01 00 02 1f 1d\n String 1: \"Not Available\"\n String 2: \"Headphone/Microphone Combo Jack2\"\n System Slot: #31\n Designation: \"Media Card Slot\"\n Type: 0x01 (Other)\n Bus Width: 0x01 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 0\n Characteristics: 0x0200 (Hot-Plug)\n System Slot: #32\n Designation: \"SimCard Slot\"\n Type: 0x01 (Other)\n Bus Width: 0x01 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 0\n System Config Options (Jumpers & Switches) #33:\n Language Info: #34\n Languages: en-US\n Current: en-US\n Type 22 Record: #35\n Data 00: 16 1a 23 00 01 02 00 00 03 02 44 16 3c 2d 04 ff\n Data 10: 31 04 7d 4a 05 0a 00 00 00 00\n String 1: \"Front\"\n String 2: \"LGC\"\n String 3: \"01AV429\"\n String 4: \"03.01\"\n String 5: \"LiP\"\n Inactive Record: #36\n Data 00: 7e 1a 24 00 01 02 00 00 03 02 00 00 00 00 04 ff\n Data 10: 00 00 00 00 05 0a 00 00 00 00\n Type 133 Record: #37\n Data 00: 85 05 25 00 01\n String 1: \"KHOIHGIUCCHHII\"\n Type 135 Record: #38\n Data 00: 87 13 26 00 54 50 07 02 42 41 59 20 49 2f 4f 20\n Data 10: 04 00 00\n Type 130 Record: #39\n Data 00: 82 14 27 00 24 41 4d 54 00 00 00 00 00 a5 af 02\n Data 10: c0 00 00 00\n Type 131 Record: #40\n Data 00: 83 40 28 00 31 00 00 00 0b 00 00 00 00 00 0a 00\n Data 10: f8 00 58 9d 00 00 00 00 01 00 00 00 06 00 0b 00\n Data 20: ac 04 0a 00 00 00 00 00 fe 00 d8 15 00 00 00 00\n Data 30: 00 00 00 00 22 00 00 00 76 50 72 6f 00 00 00 00\n Type 221 Record: #41\n Data 00: dd 1a 29 00 03 01 00 01 05 00 00 00 02 00 00 00\n Data 10: 00 4e 00 03 00 00 05 00 00 00\n String 1: \"Reference Code - CPU\"\n String 2: \"uCode Version\"\n String 3: \"TXT ACM version\"\n Type 221 Record: #42\n Data 00: dd 1a 2a 00 03 01 00 01 05 00 00 00 02 00 0b 00\n Data 10: 00 0a 00 03 04 0b 06 0a ac 04\n String 1: \"Reference Code - ME 11.0\"\n String 2: \"MEBx version\"\n String 3: \"ME Firmware Version\"\n String 4: \"Consumer SKU\"\n Type 221 Record: #43\n Data 00: dd 4b 2b 00 0a 01 00 01 05 00 00 00 02 03 ff ff\n Data 10: ff ff ff 04 00 ff ff ff 21 00 05 00 ff ff ff 21\n Data 20: 00 06 00 02 0a 00 00 00 07 00 3e 00 00 00 00 08\n Data 30: 00 34 00 00 00 00 09 00 0b 00 00 00 00 0a 00 3e\n Data 40: 00 00 00 00 0b 00 34 00 00 00 00\n String 1: \"Reference Code - SKL PCH\"\n String 2: \"PCH-CRID Status\"\n String 3: \"Disabled\"\n String 4: \"PCH-CRID Original Value\"\n String 5: \"PCH-CRID New Value\"\n String 6: \"OPROM - RST - RAID\"\n String 7: \"SKL PCH H Bx Hsio Version\"\n String 8: \"SKL PCH H Dx Hsio Version\"\n String 9: \"KBL PCH H Ax Hsio Version\"\n String 10: \"SKL PCH LP Bx Hsio Version\"\n String 11: \"SKL PCH LP Cx Hsio Version\"\n Type 221 Record: #44\n Data 00: dd 36 2c 00 07 01 00 01 05 00 00 00 02 00 01 05\n Data 10: 00 00 00 03 00 01 05 00 00 00 04 05 ff ff ff ff\n Data 20: ff 06 00 ff ff ff 02 00 07 00 ff ff ff 02 00 08\n Data 30: 00 ff ff ff 04 02\n String 1: \"Reference Code - SA - System Agent\"\n String 2: \"Reference Code - MRC\"\n String 3: \"SA - PCIe Version\"\n String 4: \"SA-CRID Status\"\n String 5: \"Enabled\"\n String 6: \"SA-CRID Original Value\"\n String 7: \"SA-CRID New Value\"\n String 8: \"OPROM - VBIOS\"\n Type 15 Record: #45\n Data 00: 0f 1f 2d 00 22 00 00 00 10 00 04 01 01 00 00 00\n Data 10: f0 00 00 00 01 04 02 08 04 0a 00 14 00 16 00\n Hardware Security: #46\n Power-on Password: 0x00 (Disabled)\n Keyboard Password: 0x02 (Not Implemented)\n Admin Password: 0x00 (Disabled)\n Front Panel Reset: 0x02 (Not Implemented)\n Type 132 Record: #47\n Data 00: 84 07 2f 00 01 d8 36\n 32bit-Memory Error Info: #48\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Pointing Device: #49\n Type: 0x05 (Track Point)\n Interface: 0x04 (PS/2)\n Buttons: 3\n Pointing Device: #50\n Type: 0x07 (Touch Pad)\n Interface: 0x04 (PS/2)\n Buttons: 2\n Type 131 Record: #51\n Data 00: 83 16 33 00 01 00 00 00 00 00 00 00 00 00 00 00\n Data 10: 00 00 00 00 00 01\n String 1: \"TVT-Enablement\"\n Type 136 Record: #52\n Data 00: 88 06 34 00 5a 5a\n Type 140 Record: #53\n Data 00: 8c 13 35 00 4c 45 4e 4f 56 4f 0b 04 01 b2 00 4d\n Data 10: 53 20 00\n Type 140 Record: #54\n Data 00: 8c 13 36 00 4c 45 4e 4f 56 4f 0b 05 01 05 00 00\n Data 10: 00 00 00\n Type 140 Record: #55\n Data 00: 8c 17 37 00 4c 45 4e 4f 56 4f 0b 06 01 8a 13 00\n Data 10: 00 00 00 00 00 00 00\n Group Associations: #56\n Group Name: \"$MEI\"\n Items: #0\n Type 219 Record: #57\n Data 00: db 51 39 00 01 03 01 45 02 00 a0 06 01 00 66 20\n Data 10: 00 00 00 00 40 08 00 01 1f 00 00 c9 0a 40 44 02\n Data 20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\n Data 30: ff ff ff ff ff ff ff ff 03 00 00 00 80 00 00 00\n Data 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 50: 00\n String 1: \"MEI1\"\n String 2: \"MEI2\"\n String 3: \"MEI3\"\n Type 140 Record: #58\n Data 00: 8c 0f 3a 00 4c 45 4e 4f 56 4f 0b 07 01 01 02\n String 1: \"N1MHT22W\"\n String 2: \"03/10/2017\"\n Type 140 Record: #59\n Data 00: 8c 2b 3b 00 4c 45 4e 4f 56 4f 0b 08 01 ff ff ff\n Data 10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff\n Data 20: ff ff ff ff ff ff ff ff ff ff ff\n Type 135 Record: #60\n Data 00: 87 12 3c 00 54 50 07 01 01 00 01 00 00 00 01 00\n Data 10: 00 00\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n02: None 00.0: 10107 System\n [Created at sys.64]\n Unique ID: rdCR.n_7QNeEnh23\n Hardware Class: system\n Model: \"System\"\n Formfactor: \"laptop\"\n Driver Info #0:\n Driver Status: thermal,fan are not active\n Driver Activation Cmd: \"modprobe thermal; modprobe fan\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n03: None 00.0: 10104 FPU\n [Created at misc.191]\n Unique ID: rdCR.EMpH5pjcahD\n Hardware Class: unknown\n Model: \"FPU\"\n I/O Ports: 0xf0-0xff (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n04: None 00.0: 0801 DMA controller (8237)\n [Created at misc.205]\n Unique ID: rdCR.f5u1ucRm+H9\n Hardware Class: unknown\n Model: \"DMA controller\"\n I/O Ports: 0x00-0xcf7 (rw)\n I/O Ports: 0xc0-0xdf (rw)\n I/O Ports: 0x80-0x8f (rw)\n DMA: 4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n05: None 00.0: 0800 PIC (8259)\n [Created at misc.218]\n Unique ID: rdCR.8uRK7LxiIA2\n Hardware Class: unknown\n Model: \"PIC\"\n I/O Ports: 0x20-0x21 (rw)\n I/O Ports: 0xa0-0xa1 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n06: None 00.0: 0900 Keyboard controller\n [Created at misc.250]\n Unique ID: rdCR.9N+EecqykME\n Hardware Class: unknown\n Model: \"Keyboard controller\"\n I/O Port: 0x60 (rw)\n I/O Port: 0x64 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n11: None 00.0: 10102 Main Memory\n [Created at memory.74]\n Unique ID: rdCR.CxwsZFjVASF\n Hardware Class: memory\n Model: \"Main Memory\"\n Memory Range: 0x00000000-0x3da21bfff (rw)\n Memory Size: 15 GB\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n12: PCI 1f.2: 0580 Memory controller\n [Created at pci.386]\n Unique ID: w7Y8.GTc4jyafHt3\n SysFS ID: /devices/pci0000:00/0000:00:1f.2\n SysFS BusID: 0000:00:1f.2\n Hardware Class: unknown\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d21 \"Sunrise Point-LP PMC\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Memory Range: 0xec344000-0xec347fff (rw,non-prefetchable,disabled)\n Module Alias: \"pci:v00008086d00009D21sv000017AAsd0000224Fbc05sc80i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n13: PCI 1c.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: z8Q3.qOtgiL+BYA2\n SysFS ID: /devices/pci0000:00/0000:00:1c.0\n SysFS BusID: 0000:00:1c.0\n Hardware Class: bridge\n Model: \"Intel Sunrise Point-LP PCI Express Root Port #1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d10 \"Sunrise Point-LP PCI Express Root Port #1\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \n Revision: 0xf1\n Driver: \"pcieport\"\n IRQ: 122 (no events)\n Module Alias: \"pci:v00008086d00009D10sv000017AAsd0000224Fbc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n14: PCI 08.0: 0880 System peripheral\n [Created at pci.386]\n Unique ID: RE4e.UOzyR3R8EPE\n SysFS ID: /devices/pci0000:00/0000:00:08.0\n SysFS BusID: 0000:00:08.0\n Hardware Class: unknown\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1911 \"Xeon E3-1200 v5/v6 / E3-1500 v5 / 6th/7th/8th Gen Core Processor Gaussian Mixture Model\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Memory Range: 0xec348000-0xec348fff (rw,non-prefetchable,disabled)\n IRQ: 255 (no events)\n Module Alias: \"pci:v00008086d00001911sv000017AAsd0000224Fbc08sc80i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n15: PCI 701.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: fR8M.a2VhDObw5K1\n Parent ID: vTuk.a2VhDObw5K1\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:01.0\n SysFS BusID: 0000:07:01.0\n Hardware Class: bridge\n Model: \"Intel JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d3 \"JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n SubVendor: pci 0x2222 \n SubDevice: pci 0x1111 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 139 (no events)\n Module Alias: \"pci:v00008086d000015D3sv00002222sd00001111bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (PCI bridge)\n\n16: PCI 1f.0: 0601 ISA bridge\n [Created at pci.386]\n Unique ID: BUZT.9w51+S+DfB4\n SysFS ID: /devices/pci0000:00/0000:00:1f.0\n SysFS BusID: 0000:00:1f.0\n Hardware Class: bridge\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d58 \"Sunrise Point-LP LPC Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Module Alias: \"pci:v00008086d00009D58sv000017AAsd0000224Fbc06sc01i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n17: PCI 200.0: ff00 Unclassified device\n [Created at pci.386]\n Unique ID: B35A.sRQkqsLaUO8\n Parent ID: z8Q3.qOtgiL+BYA2\n SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:02:00.0\n SysFS BusID: 0000:02:00.0\n Hardware Class: unknown\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x10ec \"Realtek Semiconductor Co., Ltd.\"\n Device: pci 0x525a \"RTS525A PCI Express Card Reader\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x01\n Driver: \"rtsx_pci\"\n Driver Modules: \"rtsx_pci\"\n Memory Range: 0xec200000-0xec200fff (rw,non-prefetchable)\n IRQ: 134 (455 events)\n Module Alias: \"pci:v000010ECd0000525Asv000017AAsd0000224FbcFFsc00i00\"\n Driver Info #0:\n Driver Status: rtsx_pci is active\n Driver Activation Cmd: \"modprobe rtsx_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #13 (PCI bridge)\n\n18: PCI 704.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: umHm.a2VhDObw5K1\n Parent ID: vTuk.a2VhDObw5K1\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:04.0\n SysFS BusID: 0000:07:04.0\n Hardware Class: bridge\n Model: \"Intel JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d3 \"JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n SubVendor: pci 0x2222 \n SubDevice: pci 0x1111 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 141 (no events)\n Module Alias: \"pci:v00008086d000015D3sv00002222sd00001111bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (PCI bridge)\n\n19: PCI 16.0: 0780 Communication controller\n [Created at pci.386]\n Unique ID: WnlC.BoJelhg+KQ4\n SysFS ID: /devices/pci0000:00/0000:00:16.0\n SysFS BusID: 0000:00:16.0\n Hardware Class: unknown\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d3a \"Sunrise Point-LP CSME HECI #1\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Driver: \"mei_me\"\n Driver Modules: \"mei_me\"\n Memory Range: 0xec34a000-0xec34afff (rw,non-prefetchable)\n IRQ: 127 (39 events)\n Module Alias: \"pci:v00008086d00009D3Asv000017AAsd0000224Fbc07sc80i00\"\n Driver Info #0:\n Driver Status: mei_me is active\n Driver Activation Cmd: \"modprobe mei_me\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n20: PCI 700.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: aK5u.a2VhDObw5K1\n Parent ID: vTuk.a2VhDObw5K1\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:00.0\n SysFS BusID: 0000:07:00.0\n Hardware Class: bridge\n Model: \"Intel JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d3 \"JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n SubVendor: pci 0x2222 \n SubDevice: pci 0x1111 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 138 (no events)\n Module Alias: \"pci:v00008086d000015D3sv00002222sd00001111bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (PCI bridge)\n\n21: PCI 1f.3: 0403 Audio device\n [Created at pci.386]\n Unique ID: nS1_.2kTLVjATLd3\n SysFS ID: /devices/pci0000:00/0000:00:1f.3\n SysFS BusID: 0000:00:1f.3\n Hardware Class: sound\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d71 \"Sunrise Point-LP HD Audio\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Driver: \"snd_hda_intel\"\n Driver Modules: \"snd_hda_intel\"\n Memory Range: 0xec340000-0xec343fff (rw,non-prefetchable)\n Memory Range: 0xec330000-0xec33ffff (rw,non-prefetchable)\n IRQ: 137 (786 events)\n Module Alias: \"pci:v00008086d00009D71sv000017AAsd0000224Fbc04sc03i00\"\n Driver Info #0:\n Driver Status: snd_hda_intel is active\n Driver Activation Cmd: \"modprobe snd_hda_intel\"\n Driver Info #1:\n Driver Status: snd_soc_skl is active\n Driver Activation Cmd: \"modprobe snd_soc_skl\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n22: PCI 00.0: 0600 Host bridge\n [Created at pci.386]\n Unique ID: qLht.nHID6wzEQZB\n SysFS ID: /devices/pci0000:00/0000:00:00.0\n SysFS BusID: 0000:00:00.0\n Hardware Class: bridge\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x5904 \"Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x02\n Driver: \"skl_uncore\"\n Driver Modules: \"intel_uncore\"\n Module Alias: \"pci:v00008086d00005904sv000017AAsd0000224Fbc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n23: PCI 600.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: vTuk.a2VhDObw5K1\n Parent ID: 1GTX.yiQgYrH3mp3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0\n SysFS BusID: 0000:06:00.0\n Hardware Class: bridge\n Model: \"Intel JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d3 \"JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n SubVendor: pci 0x2222 \n SubDevice: pci 0x1111 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 16 (no events)\n Module Alias: \"pci:v00008086d000015D3sv00002222sd00001111bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #25 (PCI bridge)\n\n24: PCI 500.0: 0108 Non-Volatile memory controller (NVM Express)\n [Created at pci.386]\n Unique ID: Ddhb.6HVdCPE4AT5\n Parent ID: QSNP.u2fgddT0fi3\n SysFS ID: /devices/pci0000:00/0000:00:1c.4/0000:05:00.0\n SysFS BusID: 0000:05:00.0\n Hardware Class: storage\n Model: \"Samsung Electronics SM963 2.5\" NVMe PCIe SSD\"\n Vendor: pci 0x144d \"Samsung Electronics Co Ltd\"\n Device: pci 0xa804 \"NVMe SSD Controller SM961/PM961/SM963\"\n SubVendor: pci 0x144d \"Samsung Electronics Co Ltd\"\n SubDevice: pci 0xa801 \"SM963 2.5\" NVMe PCIe SSD\"\n Driver: \"nvme\"\n Driver Modules: \"nvme\"\n Memory Range: 0xec000000-0xec003fff (rw,non-prefetchable)\n IRQ: 16 (no events)\n Module Alias: \"pci:v0000144Dd0000A804sv0000144Dsd0000A801bc01sc08i02\"\n Driver Info #0:\n Driver Status: nvme is active\n Driver Activation Cmd: \"modprobe nvme\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #29 (PCI bridge)\n\n25: PCI 1d.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: 1GTX.yiQgYrH3mp3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0\n SysFS BusID: 0000:00:1d.0\n Hardware Class: bridge\n Model: \"Intel Sunrise Point-LP PCI Express Root Port #9\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d18 \"Sunrise Point-LP PCI Express Root Port #9\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \n Revision: 0xf1\n Driver: \"pcieport\"\n IRQ: 125 (no events)\n Module Alias: \"pci:v00008086d00009D18sv000017AAsd0000224Fbc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n26: PCI 702.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: kYBq.a2VhDObw5K1\n Parent ID: vTuk.a2VhDObw5K1\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0\n SysFS BusID: 0000:07:02.0\n Hardware Class: bridge\n Model: \"Intel JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d3 \"JHL6540 Thunderbolt 3 Bridge (C step) [Alpine Ridge 4C 2016]\"\n SubVendor: pci 0x2222 \n SubDevice: pci 0x1111 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 140 (no events)\n Module Alias: \"pci:v00008086d000015D3sv00002222sd00001111bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (PCI bridge)\n\n27: PCI 14.2: 1180 Signal processing controller\n [Created at pci.386]\n Unique ID: 5Dex.ivM2aMDw+KC\n SysFS ID: /devices/pci0000:00/0000:00:14.2\n SysFS BusID: 0000:00:14.2\n Hardware Class: unknown\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d31 \"Sunrise Point-LP Thermal subsystem\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Driver: \"intel_pch_thermal\"\n Driver Modules: \"intel_pch_thermal\"\n Memory Range: 0xec349000-0xec349fff (rw,non-prefetchable)\n IRQ: 18 (no events)\n Module Alias: \"pci:v00008086d00009D31sv000017AAsd0000224Fbc11sc80i00\"\n Driver Info #0:\n Driver Status: intel_pch_thermal is active\n Driver Activation Cmd: \"modprobe intel_pch_thermal\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n28: PCI 1f.6: 0200 Ethernet controller\n [Created at pci.386]\n Unique ID: AhzA.SRCP7pKsA81\n SysFS ID: /devices/pci0000:00/0000:00:1f.6\n SysFS BusID: 0000:00:1f.6\n Hardware Class: network\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d8 \"Ethernet Connection (4) I219-V\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Driver: \"e1000e\"\n Driver Modules: \"e1000e\"\n Device File: enp0s31f6\n Memory Range: 0xec300000-0xec31ffff (rw,non-prefetchable)\n IRQ: 133 (18005 events)\n HW Address: 54:e1:ad:11:fb:b7\n Permanent HW Address: 54:e1:ad:11:fb:b7\n Link detected: no\n Module Alias: \"pci:v00008086d000015D8sv000017AAsd0000224Fbc02sc00i00\"\n Driver Info #0:\n Driver Status: e1000e is active\n Driver Activation Cmd: \"modprobe e1000e\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n29: PCI 1c.4: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: QSNP.u2fgddT0fi3\n SysFS ID: /devices/pci0000:00/0000:00:1c.4\n SysFS BusID: 0000:00:1c.4\n Hardware Class: bridge\n Model: \"Intel Sunrise Point-LP PCI Express Root Port #5\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d14 \"Sunrise Point-LP PCI Express Root Port #5\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \n Revision: 0xf1\n Driver: \"pcieport\"\n IRQ: 124 (no events)\n Module Alias: \"pci:v00008086d00009D14sv000017AAsd0000224Fbc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n30: PCI 400.0: 0282 WLAN controller\n [Created at pci.386]\n Unique ID: YVtp.cbEpR7q1Jd1\n Parent ID: hoOk.sDmAgUEcbx2\n SysFS ID: /devices/pci0000:00/0000:00:1c.2/0000:04:00.0\n SysFS BusID: 0000:04:00.0\n Hardware Class: network\n Model: \"Intel Dual Band Wireless-AC 8265\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x24fd \"Wireless 8265 / 8275\"\n SubVendor: pci 0x8086 \"Intel Corporation\"\n SubDevice: pci 0x1130 \"Dual Band Wireless-AC 8265\"\n Revision: 0x88\n Driver: \"iwlwifi\"\n Driver Modules: \"iwlwifi\"\n Device File: wlp4s0\n Features: WLAN\n Memory Range: 0xec100000-0xec101fff (rw,non-prefetchable)\n IRQ: 136 (24359765 events)\n HW Address: 00:28:f8:a6:d5:7e\n Permanent HW Address: 00:28:f8:a6:d5:7e\n Link detected: yes\n WLAN channels: 1 2 3 4 5 6 7 8 9 10 11 12 13 36 40 44 48 52 56 60 64 100 104 108 112 116 120 124 128 132 136 140\n WLAN frequencies: 2.412 2.417 2.422 2.427 2.432 2.437 2.442 2.447 2.452 2.457 2.462 2.467 2.472 5.18 5.2 5.22 5.24 5.26 5.28 5.3 5.32 5.5 5.52 5.54 5.56 5.58 5.6 5.62 5.64 5.66 5.68 5.7\n WLAN encryption modes: WEP40 WEP104 TKIP CCMP\n WLAN authentication modes: open sharedkey wpa-psk wpa-eap\n Module Alias: \"pci:v00008086d000024FDsv00008086sd00001130bc02sc80i00\"\n Driver Info #0:\n Driver Status: iwlwifi is active\n Driver Activation Cmd: \"modprobe iwlwifi\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #35 (PCI bridge)\n\n31: PCI 3c00.0: 0c03 USB Controller (XHCI)\n [Created at pci.386]\n Unique ID: Hy9f.QAjUSygQ+G7\n Parent ID: kYBq.a2VhDObw5K1\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0\n SysFS BusID: 0000:3c:00.0\n Hardware Class: usb controller\n Model: \"Intel JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x15d4 \"JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine Ridge 4C 2016]\"\n SubVendor: pci 0x2222 \n SubDevice: pci 0x1111 \n Revision: 0x02\n Driver: \"xhci_hcd\"\n Driver Modules: \"xhci_pci\"\n Memory Range: 0xd3f00000-0xd3f0ffff (rw,non-prefetchable)\n IRQ: 142 (5623563 events)\n Module Alias: \"pci:v00008086d000015D4sv00002222sd00001111bc0Csc03i30\"\n Driver Info #0:\n Driver Status: xhci_pci is active\n Driver Activation Cmd: \"modprobe xhci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #26 (PCI bridge)\n\n32: PCI 02.0: 0300 VGA compatible controller (VGA)\n [Created at pci.386]\n Unique ID: _Znp.0IdyCMQBatD\n SysFS ID: /devices/pci0000:00/0000:00:02.0\n SysFS BusID: 0000:00:02.0\n Hardware Class: graphics card\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x5916 \"HD Graphics 620\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x02\n Driver: \"i915\"\n Driver Modules: \"i915\"\n Memory Range: 0xeb000000-0xebffffff (rw,non-prefetchable)\n Memory Range: 0x60000000-0x6fffffff (ro,non-prefetchable)\n I/O Ports: 0xe000-0xe03f (rw)\n Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)\n IRQ: 135 (618451479 events)\n Module Alias: \"pci:v00008086d00005916sv000017AAsd0000224Fbc03sc00i00\"\n Driver Info #0:\n Driver Status: i915 is active\n Driver Activation Cmd: \"modprobe i915\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n33: PCI 14.0: 0c03 USB Controller (XHCI)\n [Created at pci.386]\n Unique ID: MZfG.uG+UK2yqXF2\n SysFS ID: /devices/pci0000:00/0000:00:14.0\n SysFS BusID: 0000:00:14.0\n Hardware Class: usb controller\n Model: \"Intel Sunrise Point-LP USB 3.0 xHCI Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d2f \"Sunrise Point-LP USB 3.0 xHCI Controller\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \n Revision: 0x21\n Driver: \"xhci_hcd\"\n Driver Modules: \"xhci_pci\"\n Memory Range: 0xec320000-0xec32ffff (rw,non-prefetchable)\n IRQ: 126 (89557890 events)\n Module Alias: \"pci:v00008086d00009D2Fsv000017AAsd0000224Fbc0Csc03i30\"\n Driver Info #0:\n Driver Status: xhci_pci is active\n Driver Activation Cmd: \"modprobe xhci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n34: PCI 1f.4: 0c05 SMBus\n [Created at pci.386]\n Unique ID: fnWp._i9ff7R7CN8\n SysFS ID: /devices/pci0000:00/0000:00:1f.4\n SysFS BusID: 0000:00:1f.4\n Hardware Class: unknown\n Model: \"Lenovo ThinkPad X1 Carbon 5th Gen\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d23 \"Sunrise Point-LP SMBus\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \"ThinkPad X1 Carbon 5th Gen\"\n Revision: 0x21\n Driver: \"i801_smbus\"\n Driver Modules: \"i2c_i801\"\n Memory Range: 0xec34b000-0xec34b0ff (rw,non-prefetchable)\n I/O Ports: 0xefa0-0xefbf (rw)\n IRQ: 16 (no events)\n Module Alias: \"pci:v00008086d00009D23sv000017AAsd0000224Fbc0Csc05i00\"\n Driver Info #0:\n Driver Status: i2c_i801 is active\n Driver Activation Cmd: \"modprobe i2c_i801\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n35: PCI 1c.2: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: hoOk.sDmAgUEcbx2\n SysFS ID: /devices/pci0000:00/0000:00:1c.2\n SysFS BusID: 0000:00:1c.2\n Hardware Class: bridge\n Model: \"Intel Sunrise Point-LP PCI Express Root Port #3\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x9d12 \"Sunrise Point-LP PCI Express Root Port #3\"\n SubVendor: pci 0x17aa \"Lenovo\"\n SubDevice: pci 0x224f \n Revision: 0xf1\n Driver: \"pcieport\"\n IRQ: 123 (no events)\n Module Alias: \"pci:v00008086d00009D12sv000017AAsd0000224Fbc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n36: None 00.0: 10002 LCD Monitor\n [Created at monitor.125]\n Unique ID: rdCR.gDNynEL4dRB\n Parent ID: _Znp.0IdyCMQBatD\n Hardware Class: monitor\n Model: \"AUO LCD Monitor\"\n Vendor: AUO \"AUO\"\n Device: eisa 0x313d \n Resolution: 1920x1080@60Hz\n Size: 309x174 mm\n Year of Manufacture: 2016\n Week of Manufacture: 0\n Detailed Timings #0:\n Resolution: 1920x1080\n Horizontal: 1920 1936 1952 2104 (+16 +32 +184) -hsync\n Vertical: 1080 1083 1097 1116 (+3 +17 +36) -vsync\n Frequencies: 141.00 MHz, 67.02 kHz, 60.05 Hz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #32 (VGA compatible controller)\n\n37: None 01.0: 10002 LCD Monitor\n [Created at monitor.125]\n Unique ID: wkFv.3eFRZPYqQnB\n Parent ID: _Znp.0IdyCMQBatD\n Hardware Class: monitor\n Model: \"SAMSUNG LC27T55\"\n Vendor: SAM \"SAMSUNG\"\n Device: eisa 0x701e \"LC27T55\"\n Serial ID: \"HNAR401779\"\n Resolution: 720x400@70Hz\n Resolution: 640x480@60Hz\n Resolution: 640x480@67Hz\n Resolution: 640x480@72Hz\n Resolution: 640x480@75Hz\n Resolution: 800x600@56Hz\n Resolution: 800x600@60Hz\n Resolution: 800x600@72Hz\n Resolution: 800x600@75Hz\n Resolution: 832x624@75Hz\n Resolution: 1024x768@60Hz\n Resolution: 1024x768@70Hz\n Resolution: 1024x768@75Hz\n Resolution: 1280x1024@75Hz\n Resolution: 1280x720@60Hz\n Resolution: 1280x1024@60Hz\n Resolution: 1920x1080@60Hz\n Size: 609x349 mm\n Year of Manufacture: 2021\n Week of Manufacture: 17\n Detailed Timings #0:\n Resolution: 1920x1080\n Horizontal: 1920 2008 2052 2200 (+88 +132 +280) +hsync\n Vertical: 1080 1084 1089 1125 (+4 +9 +45) +vsync\n Frequencies: 148.50 MHz, 67.50 kHz, 60.00 Hz\n Driver Info #0:\n Max. Resolution: 1920x1080\n Vert. Sync Range: 48-75 Hz\n Hor. Sync Range: 30-84 kHz\n Bandwidth: 148 MHz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #32 (VGA compatible controller)\n\n38: PCI 00.0: 10600 Disk\n [Created at block.245]\n Unique ID: wLCS.AfVvhtt5p16\n Parent ID: Ddhb.6HVdCPE4AT5\n SysFS ID: /class/block/nvme0n1\n SysFS BusID: nvme0\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.4/0000:05:00.0/nvme/nvme0\n Hardware Class: disk\n Model: \"Samsung Electronics SM963 2.5\" NVMe PCIe SSD\"\n Vendor: pci 0x144d \"Samsung Electronics Co Ltd\"\n Device: pci 0xa804 \"NVMe SSD Controller SM961/PM961/SM963\"\n SubVendor: pci 0x144d \"Samsung Electronics Co Ltd\"\n SubDevice: pci 0xa801 \"SM963 2.5\" NVMe PCIe SSD\"\n Driver: \"nvme\"\n Driver Modules: \"nvme\"\n Device File: /dev/nvme0n1\n Device Number: block 259:0\n Geometry (Logical): CHS 976762/64/32\n Size: 2000409264 sectors a 512 bytes\n Capacity: 953 GB (1024209543168 bytes)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #24 (Non-Volatile memory controller)\n\n39: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: cS_q.SE1wIdpsiiC\n Parent ID: wLCS.AfVvhtt5p16\n SysFS ID: /class/block/nvme0n1/nvme0n1p1\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/nvme0n1p1\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Disk)\n\n40: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: 3eEv.SE1wIdpsiiC\n Parent ID: wLCS.AfVvhtt5p16\n SysFS ID: /class/block/nvme0n1/nvme0n1p2\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/nvme0n1p2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Disk)\n\n41: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: XpUz.SE1wIdpsiiC\n Parent ID: wLCS.AfVvhtt5p16\n SysFS ID: /class/block/nvme0n1/nvme0n1p3\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/nvme0n1p3\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Disk)\n\n42: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: __k1.SE1wIdpsiiC\n Parent ID: wLCS.AfVvhtt5p16\n SysFS ID: /class/block/nvme0n1/nvme0n1p4\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/nvme0n1p4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Disk)\n\n43: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: RA+5.SE1wIdpsiiC\n Parent ID: wLCS.AfVvhtt5p16\n SysFS ID: /class/block/nvme0n1/nvme0n1p5\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/nvme0n1p5\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Disk)\n\n44: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: uLFA.SE1wIdpsiiC\n Parent ID: wLCS.AfVvhtt5p16\n SysFS ID: /class/block/nvme0n1/nvme0n1p6\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/nvme0n1p6\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Disk)\n\n45: SCSI 00.1: 10600 Disk\n [Created at block.256]\n Unique ID: JLNk.rd_zLqy6FGE\n Parent ID: Hy9f.QAjUSygQ+G7\n SysFS ID: /class/block/sdb\n SysFS BusID: 0:0:0:1\n SysFS Device Link: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-2/4-2.2/4-2.2:1.0/host0/target0:0:0/0:0:0:1\n Hardware Class: disk\n Model: \"Generic Micro SD/M2\"\n Vendor: usb 0x058f \"Generic-\"\n Device: usb 0x8468 \"Micro SD/M2\"\n Revision: \"1.08\"\n Serial ID: \"AU8461\"\n Driver: \"usb-storage\", \"sd\"\n Driver Modules: \"usb_storage\", \"sd_mod\"\n Device File: /dev/sdb (/dev/sg1)\n Device Number: block 8:16-8:31 (char 21:1)\n Geometry (Logical): CHS 1024/0/62\n Module Alias: \"usb:v058Fp8468d0100dc00dsc00dp00ic08isc06ip50in00\"\n Driver Info #0:\n Driver Status: uas is active\n Driver Activation Cmd: \"modprobe uas\"\n Driver Info #1:\n Driver Status: usb_storage is active\n Driver Activation Cmd: \"modprobe usb_storage\"\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #31 (USB Controller)\n\n46: SCSI 00.0: 10600 Disk\n [Created at block.256]\n Unique ID: R7kM.cEqnUHU+UjE\n Parent ID: Hy9f.QAjUSygQ+G7\n SysFS ID: /class/block/sda\n SysFS BusID: 0:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-2/4-2.2/4-2.2:1.0/host0/target0:0:0/0:0:0:0\n Hardware Class: disk\n Model: \"Generic SD/MMC\"\n Vendor: usb 0x058f \"Generic-\"\n Device: usb 0x8468 \"SD/MMC\"\n Revision: \"1.00\"\n Serial ID: \"AU8461\"\n Driver: \"usb-storage\", \"sd\"\n Driver Modules: \"usb_storage\", \"sd_mod\"\n Device File: /dev/sda (/dev/sg0)\n Device Number: block 8:0-8:15 (char 21:0)\n Geometry (Logical): CHS 1024/0/62\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #31 (USB Controller)\n\n47: USB 00.3: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: zF+l.vQCI4RMGVj7\n Parent ID: BkVc.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1.2/3-2.1.2:1.3\n SysFS BusID: 3-2.1.2:1.3\n Hardware Class: unknown\n Model: \"Razer RZ01-0321 Gaming Mouse [DeathAdder V2]\"\n Hotplug: USB\n Vendor: usb 0x1532 \"Razer USA, Ltd\"\n Device: usb 0x0084 \"RZ01-0321 Gaming Mouse [DeathAdder V2]\"\n Revision: \"2.00\"\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1532p0084d0200dc00dsc00dp00ic03isc00ip02in03\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #68 (Hub)\n\n48: USB 00.0: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: POWV.SKi3BMEP1zB\n Parent ID: k4bc.2DFUsyrieMD\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0\n SysFS BusID: 1-9:1.0\n Hardware Class: unknown\n Model: \"Validity Sensors Unclassified device\"\n Hotplug: USB\n Vendor: usb 0x138a \"Validity Sensors, Inc.\"\n Device: usb 0x0097 \n Revision: \"1.64\"\n Serial ID: \"d6aa80ed14a7\"\n Speed: 12 Mbps\n Module Alias: \"usb:v138Ap0097d0164dcFFdsc10dpFFicFFisc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #64 (Hub)\n\n49: USB 00.0: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: xJFn.LX0JUh335qA\n Parent ID: mZxt.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.3/3-2.3:2.0\n SysFS BusID: 3-2.3:2.0\n Hardware Class: unknown\n Model: \"VIA USB 2.0 BILLBOARD\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x0103 \"USB 2.0 BILLBOARD\"\n Revision: \"14.24\"\n Serial ID: \"0000000000000001\"\n Speed: 12 Mbps\n Module Alias: \"usb:v2109p0103d1424dc11dsc00dp00ic11isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #66 (Hub)\n\n50: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: rg_L.AneSAPsLcPF\n Parent ID: zPk0.i7wpDO9tkR0\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-2/4-2:1.0\n SysFS BusID: 4-2:1.0\n Hardware Class: hub\n Model: \"VIA USB3.0 Hub\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x0817 \"USB3.0 Hub\"\n Revision: \"4.73\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Module Alias: \"usb:v2109p0817d0473dc09dsc00dp03ic09isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #60 (Hub)\n\n52: USB 00.0: 0200 Ethernet controller\n [Created at usb.122]\n Unique ID: Bcd3.pPU9FHDlTRC\n Parent ID: rg_L.AneSAPsLcPF\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-2/4-2.4/4-2.4:1.0\n SysFS BusID: 4-2.4:1.0\n Hardware Class: network\n Model: \"Realtek RTL8153 Gigabit Ethernet Adapter\"\n Hotplug: USB\n Vendor: usb 0x0bda \"Realtek Semiconductor Corp.\"\n Device: usb 0x8153 \"RTL8153 Gigabit Ethernet Adapter\"\n Revision: \"31.00\"\n Serial ID: \"001000001\"\n Driver: \"r8152\"\n Driver Modules: \"r8152\"\n Device File: enp60s0u2u4\n HW Address: 48:65:ee:17:57:1a\n Permanent HW Address: 48:65:ee:17:57:1a\n Link detected: yes\n Module Alias: \"usb:v0BDAp8153d3100dc00dsc00dp00icFFiscFFip00in00\"\n Driver Info #0:\n Driver Status: r8152 is active\n Driver Activation Cmd: \"modprobe r8152\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #50 (Hub)\n\n53: USB 00.1: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: QR8P.XP6vQjDsZa1\n Parent ID: k4bc.2DFUsyrieMD\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8:1.1\n SysFS BusID: 1-8:1.1\n Hardware Class: unknown\n Model: \"Lite-On Integrated Camera\"\n Hotplug: USB\n Vendor: usb 0x04ca \"Lite-On Technology Corp.\"\n Device: usb 0x7067 \"Integrated Camera\"\n Revision: \"0.16\"\n Serial ID: \"200901010001\"\n Driver: \"uvcvideo\"\n Driver Modules: \"uvcvideo\"\n Speed: 480 Mbps\n Module Alias: \"usb:v04CAp7067d0016dcEFdsc02dp01ic0Eisc02ip00in01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #64 (Hub)\n\n54: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: uIhY.pnncnQNBpD7\n Parent ID: Hy9f.QAjUSygQ+G7\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-0:1.0\n SysFS BusID: 3-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"5.04\"\n Serial ID: \"0000:3c:00.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0504dc09dsc00dp01ic09isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #31 (USB Controller)\n\n55: USB 00.3: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: POdw.uBlpLnsCFz5\n Parent ID: BkVc.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1.3/3-2.1.3:1.3\n SysFS BusID: 3-2.1.3:1.3\n Hardware Class: unknown\n Model: \"Razer Huntsman Mini\"\n Hotplug: USB\n Vendor: usb 0x1532 \"Razer USA, Ltd\"\n Device: usb 0x0257 \"Razer Huntsman Mini\"\n Revision: \"2.00\"\n Serial ID: \"00000000001A\"\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Device File: /dev/input/event29\n Device Number: char 13:93\n Speed: 12 Mbps\n Module Alias: \"usb:v1532p0257d0200dc00dsc00dp00ic03isc00ip01in03\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #68 (Hub)\n\n57: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: tClZ.AneSAPsLcPF\n Parent ID: rg_L.AneSAPsLcPF\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-2/4-2.1/4-2.1:1.0\n SysFS BusID: 4-2.1:1.0\n Hardware Class: hub\n Model: \"VIA USB3.0 Hub\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x0817 \"USB3.0 Hub\"\n Revision: \"4.73\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Module Alias: \"usb:v2109p0817d0473dc09dsc00dp03ic09isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #50 (Hub)\n\n58: USB 00.0: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: w673.mAuzP6z8zSE\n Parent ID: BkVc.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1.5/3-2.1.5:1.0\n SysFS BusID: 3-2.1.5:1.0\n Hardware Class: unknown\n Model: \"VIA USB Billboard Device\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x8817 \"USB Billboard Device\"\n Revision: \"0.01\"\n Serial ID: \"0000000000000001\"\n Speed: 480 Mbps\n Module Alias: \"usb:v2109p8817d0001dcFEdsc00dp00ic11isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #68 (Hub)\n\n59: USB 00.0: 11500 Bluetooth Device\n [Created at usb.122]\n Unique ID: X7GA.GS0ueMFUyi1\n Parent ID: k4bc.2DFUsyrieMD\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0\n SysFS BusID: 1-7:1.0\n Hardware Class: bluetooth\n Model: \"Intel Bluetooth wireless interface\"\n Hotplug: USB\n Vendor: usb 0x8087 \"Intel Corp.\"\n Device: usb 0x0a2b \"Bluetooth wireless interface\"\n Revision: \"0.10\"\n Driver: \"btusb\"\n Driver Modules: \"btusb\"\n Speed: 12 Mbps\n Module Alias: \"usb:v8087p0A2Bd0010dcE0dsc01dp01icE0isc01ip01in00\"\n Driver Info #0:\n Driver Status: btusb is active\n Driver Activation Cmd: \"modprobe btusb\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #64 (Hub)\n\n60: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: zPk0.i7wpDO9tkR0\n Parent ID: Hy9f.QAjUSygQ+G7\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-0:1.0\n SysFS BusID: 4-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 3.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0003 \"3.0 root hub\"\n Revision: \"5.04\"\n Serial ID: \"0000:3c:00.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Module Alias: \"usb:v1D6Bp0003d0504dc09dsc00dp03ic09isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #31 (USB Controller)\n\n61: USB 00.2: 10800 Keyboard\n [Created at usb.122]\n Unique ID: W4lh.AK78juYgagD\n Parent ID: BkVc.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1.2/3-2.1.2:1.2\n SysFS BusID: 3-2.1.2:1.2\n Hardware Class: keyboard\n Model: \"Razer RZ01-0321 Gaming Mouse [DeathAdder V2]\"\n Hotplug: USB\n Vendor: usb 0x1532 \"Razer USA, Ltd\"\n Device: usb 0x0084 \"RZ01-0321 Gaming Mouse [DeathAdder V2]\"\n Revision: \"2.00\"\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Device File: /dev/input/event22\n Device Number: char 13:86\n Speed: 12 Mbps\n Module Alias: \"usb:v1532p0084d0200dc00dsc00dp00ic03isc01ip01in02\"\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #68 (Hub)\n\n63: USB 00.0: 10503 USB Mouse\n [Created at usb.122]\n Unique ID: cjEZ.v2dnE7+mQmC\n Parent ID: BkVc.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1.2/3-2.1.2:1.0\n SysFS BusID: 3-2.1.2:1.0\n Hardware Class: mouse\n Model: \"Razer RZ01-0321 Gaming Mouse [DeathAdder V2]\"\n Hotplug: USB\n Vendor: usb 0x1532 \"Razer USA, Ltd\"\n Device: usb 0x0084 \"RZ01-0321 Gaming Mouse [DeathAdder V2]\"\n Revision: \"2.00\"\n Compatible to: int 0x0210 0x0025\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Device File: /dev/input/mice (/dev/input/mouse2)\n Device Files: /dev/input/mice, /dev/input/mouse2, /dev/input/event17\n Device Number: char 13:63 (char 13:34)\n Speed: 12 Mbps\n Module Alias: \"usb:v1532p0084d0200dc00dsc00dp00ic03isc01ip02in00\"\n Driver Info #0:\n Buttons: 5\n Wheels: 2\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #68 (Hub)\n\n64: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: k4bc.2DFUsyrieMD\n Parent ID: MZfG.uG+UK2yqXF2\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-0:1.0\n SysFS BusID: 1-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"5.04\"\n Serial ID: \"0000:00:14.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0504dc09dsc00dp01ic09isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #33 (USB Controller)\n\n66: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: mZxt.g5rjI1SjqE3\n Parent ID: uIhY.pnncnQNBpD7\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2:1.0\n SysFS BusID: 3-2:1.0\n Hardware Class: hub\n Model: \"VIA USB2.0 Hub\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x2817 \"USB2.0 Hub\"\n Revision: \"4.73\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v2109p2817d0473dc09dsc00dp02ic09isc00ip02in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #54 (Hub)\n\n68: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: BkVc.g5rjI1SjqE3\n Parent ID: mZxt.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1:1.0\n SysFS BusID: 3-2.1:1.0\n Hardware Class: hub\n Model: \"VIA USB2.0 Hub\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x2817 \"USB2.0 Hub\"\n Revision: \"4.73\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v2109p2817d0473dc09dsc00dp02ic09isc00ip02in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #66 (Hub)\n\n69: USB 00.0: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: xF0H.mAuzP6z8zSE\n Parent ID: mZxt.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.5/3-2.5:1.0\n SysFS BusID: 3-2.5:1.0\n Hardware Class: unknown\n Model: \"VIA USB Billboard Device\"\n Hotplug: USB\n Vendor: usb 0x2109 \"VIA Labs, Inc.\"\n Device: usb 0x8817 \"USB Billboard Device\"\n Revision: \"0.01\"\n Serial ID: \"0000000000000001\"\n Speed: 480 Mbps\n Module Alias: \"usb:v2109p8817d0001dcFEdsc00dp00ic11isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #66 (Hub)\n\n70: USB 00.0: 10800 Keyboard\n [Created at usb.122]\n Unique ID: 2ssj.XoA0EArn++0\n Parent ID: BkVc.g5rjI1SjqE3\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb3/3-2/3-2.1/3-2.1.3/3-2.1.3:1.0\n SysFS BusID: 3-2.1.3:1.0\n Hardware Class: keyboard\n Model: \"Razer Huntsman Mini\"\n Hotplug: USB\n Vendor: usb 0x1532 \"Razer USA, Ltd\"\n Device: usb 0x0257 \"Razer Huntsman Mini\"\n Revision: \"2.00\"\n Serial ID: \"00000000001A\"\n Driver: \"usbhid\"\n Driver Modules: \"usbhid\"\n Device File: /dev/input/event23\n Device Number: char 13:87\n Speed: 12 Mbps\n Module Alias: \"usb:v1532p0257d0200dc00dsc00dp00ic03isc01ip01in00\"\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #68 (Hub)\n\n72: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: pBe4.xYNhIwdOaa6\n Parent ID: MZfG.uG+UK2yqXF2\n SysFS ID: /devices/pci0000:00/0000:00:14.0/usb2/2-0:1.0\n SysFS BusID: 2-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 3.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0003 \"3.0 root hub\"\n Revision: \"5.04\"\n Serial ID: \"0000:00:14.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Module Alias: \"usb:v1D6Bp0003d0504dc09dsc00dp03ic09isc00ip00in00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #33 (USB Controller)\n\n73: PS/2 00.0: 10800 Keyboard\n [Created at input.226]\n Unique ID: 9ui9.+49ps10DtUF\n Hardware Class: keyboard\n Model: \"AT Translated Set 2 keyboard\"\n Vendor: 0x0001 \n Device: 0x0001 \"AT Translated Set 2 keyboard\"\n Compatible to: int 0x0211 0x0001\n Device File: /dev/input/event3\n Device Number: char 13:67\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n74: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.Y_f5kDtfqz2\n Hardware Class: mouse\n Model: \"SynPS/2 Synaptics TouchPad\"\n Vendor: 0x0002 \n Device: 0x0007 \"SynPS/2 Synaptics TouchPad\"\n Compatible to: int 0x0210 0x0001\n Device File: /dev/input/mice (/dev/input/mouse0)\n Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event4\n Device Number: char 13:63 (char 13:32)\n Driver Info #0:\n Buttons: 1\n Wheels: 0\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n75: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.7qlGUQk7T34\n Hardware Class: mouse\n Model: \"TPPS/2 Elan TrackPoint\"\n Vendor: 0x0002 \n Device: 0x000a \"TPPS/2 Elan TrackPoint\"\n Compatible to: int 0x0210 0x0003\n Device File: /dev/input/mice (/dev/input/mouse1)\n Device Files: /dev/input/mice, /dev/input/mouse1, /dev/input/event5\n Device Number: char 13:63 (char 13:33)\n Driver Info #0:\n Buttons: 3\n Wheels: 0\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n76: None 00.0: 10103 CPU\n [Created at cpu.462]\n Unique ID: rdCR.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.142.9 \"Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,avx2,smep,bmi2,erms,invpcid,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp\n Clock: 3284 MHz\n BogoMips: 5802.42\n Cache: 4096 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n77: None 01.0: 10103 CPU\n [Created at cpu.462]\n Unique ID: wkFv.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.142.9 \"Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,avx2,smep,bmi2,erms,invpcid,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp\n Clock: 3369 MHz\n BogoMips: 5802.42\n Cache: 4096 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n78: None 02.0: 10103 CPU\n [Created at cpu.462]\n Unique ID: +rIN.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.142.9 \"Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,avx2,smep,bmi2,erms,invpcid,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp\n Clock: 3384 MHz\n BogoMips: 5802.42\n Cache: 4096 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n79: None 03.0: 10103 CPU\n [Created at cpu.462]\n Unique ID: 4zLr.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.142.9 \"Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,art,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,nonstop_tsc,cpuid,aperfmperf,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,sdbg,fma,cx16,xtpr,pdcm,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,aes,xsave,avx,f16c,rdrand,lahf_lm,abm,3dnowprefetch,cpuid_fault,epb,invpcid_single,pti,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,avx2,smep,bmi2,erms,invpcid,mpx,rdseed,adx,smap,clflushopt,intel_pt,xsaveopt,xsavec,xgetbv1,xsaves,dtherm,ida,arat,pln,pts,hwp,hwp_notify,hwp_act_window,hwp_epp\n Clock: 3303 MHz\n BogoMips: 5802.42\n Cache: 4096 kb\n Units/Processor: 16\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n80: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: E98i.ndpeucax6V1\n Parent ID: YVtp.cbEpR7q1Jd1\n SysFS ID: /class/net/wlp4s0\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.2/0000:04:00.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"iwlwifi\"\n Driver Modules: \"iwlwifi\"\n Device File: wlp4s0\n HW Address: 00:28:f8:a6:d5:7e\n Permanent HW Address: 00:28:f8:a6:d5:7e\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #30 (WLAN controller)\n\n81: None 00.0: 10700 Loopback\n [Created at net.126]\n Unique ID: ZsBS.GQNx7L4uPNA\n SysFS ID: /class/net/lo\n Hardware Class: network interface\n Model: \"Loopback network interface\"\n Device File: lo\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n82: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: 23b5.ndpeucax6V1\n Parent ID: AhzA.SRCP7pKsA81\n SysFS ID: /class/net/enp0s31f6\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.6\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"e1000e\"\n Driver Modules: \"e1000e\"\n Device File: enp0s31f6\n HW Address: 54:e1:ad:11:fb:b7\n Permanent HW Address: 54:e1:ad:11:fb:b7\n Link detected: no\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #28 (Ethernet controller)\n\n83: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: WF3Z.ndpeucax6V1\n Parent ID: Bcd3.pPU9FHDlTRC\n SysFS ID: /class/net/enp60s0u2u4\n SysFS Device Link: /devices/pci0000:00/0000:00:1d.0/0000:06:00.0/0000:07:02.0/0000:3c:00.0/usb4/4-2/4-2.4/4-2.4:1.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"r8152\"\n Driver Modules: \"r8152\"\n Device File: enp60s0u2u4\n HW Address: 48:65:ee:17:57:1a\n Permanent HW Address: 48:65:ee:17:57:1a\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #52 (Ethernet controller)\n", + "smart": [ + { + "device": { + "info_name": "/dev/nvme0n1", + "name": "/dev/nvme0n1", + "protocol": "NVMe", + "type": "nvme" + }, + "firmware_version": "6L7QCXY7", + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Thu Mar 31 19:09:57 2022 CEST", + "time_t": 1648746597 + }, + "logical_block_size": 512, + "model_name": "SAMSUNG MZVLW1T0HMLH-000L7", + "nvme_controller_id": 2, + "nvme_ieee_oui_identifier": 9528, + "nvme_namespaces": [ + { + "capacity": { + "blocks": 2000409264, + "blocks_s": "2000409264", + "bytes": 1024209543168, + "bytes_le": [ + 0, + 96, + 165, + 119, + 238 + ], + "bytes_s": "1024209543168" + }, + "eui64": { + "ext_id": 775001736984, + "oui": 9528 + }, + "formatted_lba_size": 512, + "id": 1, + "size": { + "blocks": 2000409264, + "blocks_s": "2000409264", + "bytes": 1024209543168, + "bytes_le": [ + 0, + 96, + 165, + 119, + 238 + ], + "bytes_s": "1024209543168" + }, + "utilization": { + "blocks": 1467365048, + "blocks_s": "1467365048", + "bytes": 751290904576, + "bytes_le": [ + 0, + 112, + 109, + 236, + 174 + ], + "bytes_s": "751290904576" + } + } + ], + "nvme_number_of_namespaces": 1, + "nvme_pci_vendor": { + "id": 5197, + "subsystem_id": 5197 + }, + "nvme_smart_health_information_log": { + "available_spare": 100, + "available_spare_threshold": 10, + "controller_busy_time": 2377, + "controller_busy_time_le": [ + 73, + 9 + ], + "controller_busy_time_s": "2377", + "critical_comp_time": 0, + "critical_warning": 0, + "data_units_read": 14418152, + "data_units_read_le": [ + 232, + 0, + 220 + ], + "data_units_read_s": "14418152", + "data_units_written": 65176274, + "data_units_written_le": [ + 210, + 130, + 226, + 3 + ], + "data_units_written_s": "65176274", + "host_reads": 291649994, + "host_reads_le": [ + 202, + 57, + 98, + 17 + ], + "host_reads_s": "291649994", + "host_writes": 1827855643, + "host_writes_le": [ + 27, + 221, + 242, + 108 + ], + "host_writes_s": "1827855643", + "media_errors": 0, + "media_errors_s": "0", + "num_err_log_entries": 2891, + "num_err_log_entries_le": [ + 75, + 11 + ], + "num_err_log_entries_s": "2891", + "percentage_used": 2, + "power_cycles": 5320, + "power_cycles_le": [ + 200, + 20 + ], + "power_cycles_s": "5320", + "power_on_hours": 6032, + "power_on_hours_le": [ + 144, + 23 + ], + "power_on_hours_s": "6032", + "temperature": 40, + "temperature_sensors": [ + 40, + 47 + ], + "unsafe_shutdowns": 286, + "unsafe_shutdowns_le": [ + 30, + 1 + ], + "unsafe_shutdowns_s": "286", + "warning_temp_time": 0 + }, + "nvme_total_capacity": 1024209543168, + "nvme_total_capacity_le": [ + 0, + 96, + 165, + 119, + 238 + ], + "nvme_total_capacity_s": "1024209543168", + "nvme_unallocated_capacity": 0, + "nvme_unallocated_capacity_s": "0", + "nvme_version": { + "string": "1.2", + "value": 66048 + }, + "power_cycle_count": 5320, + "power_on_time": { + "hours": 6032 + }, + "serial_number": "S35ANX0J401001", + "smart_status": { + "nvme": { + "value": 0 + }, + "passed": true + }, + "smartctl": { + "argv": [ + "smartctl", + "-x", + "--json=cosviu", + "/dev/nvme0n1" + ], + "build_info": "(local build)", + "exit_status": 0, + "output": [ + "smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.4.72-gentoo-x86_64] (local build)", + "Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org", + "", + "=== START OF INFORMATION SECTION ===", + "Model Number: SAMSUNG MZVLW1T0HMLH-000L7", + "Serial Number: S35ANX0J401001", + "Firmware Version: 6L7QCXY7", + "PCI Vendor/Subsystem ID: 0x144d", + "IEEE OUI Identifier: 0x002538", + "Total NVM Capacity: 1.024.209.543.168 [1,02 TB]", + "Unallocated NVM Capacity: 0", + "Controller ID: 2", + "NVMe Version: 1.2", + "Number of Namespaces: 1", + "Namespace 1 Size/Capacity: 1.024.209.543.168 [1,02 TB]", + "Namespace 1 Utilization: 751.290.904.576 [751 GB]", + "Namespace 1 Formatted LBA Size: 512", + "Namespace 1 IEEE EUI-64: 002538 b471b40718", + "Local Time is: Thu Mar 31 19:09:57 2022 CEST", + "Firmware Updates (0x16): 3 Slots, no Reset required", + "Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test", + "Optional NVM Commands (0x001f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat", + "Log Page Attributes (0x03): S/H_per_NS Cmd_Eff_Lg", + "Warning Comp. Temp. Threshold: 69 Celsius", + "Critical Comp. Temp. Threshold: 72 Celsius", + "", + "Supported Power States", + "St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat", + " 0 + 7.60W - - 0 0 0 0 0 0", + " 1 + 6.00W - - 1 1 1 1 0 0", + " 2 + 5.10W - - 2 2 2 2 0 0", + " 3 - 0.0400W - - 3 3 3 3 210 1500", + " 4 - 0.0050W - - 4 4 4 4 2200 6000", + "", + "Supported LBA Sizes (NSID 0x1)", + "Id Fmt Data Metadt Rel_Perf", + " 0 + 512 0 0", + "", + "=== START OF SMART DATA SECTION ===", + "SMART overall-health self-assessment test result: PASSED", + "", + "SMART/Health Information (NVMe Log 0x02)", + "Critical Warning: 0x00", + "Temperature: 40 Celsius", + "Available Spare: 100%", + "Available Spare Threshold: 10%", + "Percentage Used: 2%", + "Data Units Read: 14.418.152 [7,38 TB]", + "Data Units Written: 65.176.274 [33,3 TB]", + "Host Read Commands: 291.649.994", + "Host Write Commands: 1.827.855.643", + "Controller Busy Time: 2.377", + "Power Cycles: 5.320", + "Power On Hours: 6.032", + "Unsafe Shutdowns: 286", + "Media and Data Integrity Errors: 0", + "Error Information Log Entries: 2.891", + "Warning Comp. Temperature Time: 0", + "Critical Comp. Temperature Time: 0", + "Temperature Sensor 1: 40 Celsius", + "Temperature Sensor 2: 47 Celsius", + "", + "Error Information (NVMe Log 0x01, 16 of 64 entries)", + "Num ErrCount SQId CmdId Status PELoc LBA NSID VS", + " 0 2891 0 0x1016 0x4004 - 0 0 -", + " 1 2890 0 0x0008 0x4004 - 0 0 -", + " 2 2889 0 0x0008 0x4004 - 0 0 -", + " 3 2888 0 0x0008 0x4004 - 0 0 -", + " 4 2887 0 0x0008 0x4004 - 0 0 -", + " 5 2886 0 0x0008 0x4004 - 0 0 -", + " 6 2885 0 0x0008 0x4004 - 0 0 -", + " 7 2884 0 0x0008 0x4004 - 0 0 -", + " 8 2883 0 0x0008 0x4004 - 0 0 -", + " 9 2882 0 0x0008 0x4004 - 0 0 -", + " 10 2881 0 0x0008 0x4004 - 0 0 -", + " 11 2880 0 0x0008 0x4004 - 0 0 -", + " 12 2879 0 0x0008 0x4004 - 0 0 -", + " 13 2878 0 0x0008 0x4004 - 0 0 -", + " 14 2877 0 0x0008 0x4004 - 0 0 -", + " 15 2876 0 0x0008 0x4004 - 0 0 -", + "... (48 entries not read)", + "" + ], + "platform_info": "x86_64-linux-5.4.72-gentoo-x86_64", + "svn_revision": "5155", + "uint128_precision_bits": 128, + "version": [ + 7, + 2 + ] + }, + "smartctl_0001_i": "smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.4.72-gentoo-x86_64] (local build)", + "smartctl_0002_i": "Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org", + "smartctl_0004_u": "=== START OF INFORMATION SECTION ===", + "smartctl_0005_i": "Model Number: SAMSUNG MZVLW1T0HMLH-000L7", + "smartctl_0006_i": "Serial Number: S35ANX0J401001", + "smartctl_0007_i": "Firmware Version: 6L7QCXY7", + "smartctl_0008_i": "PCI Vendor/Subsystem ID: 0x144d", + "smartctl_0009_i": "IEEE OUI Identifier: 0x002538", + "smartctl_0010_i": "Total NVM Capacity: 1.024.209.543.168 [1,02 TB]", + "smartctl_0011_i": "Unallocated NVM Capacity: 0", + "smartctl_0012_i": "Controller ID: 2", + "smartctl_0013_i": "NVMe Version: 1.2", + "smartctl_0014_i": "Number of Namespaces: 1", + "smartctl_0015_i": "Namespace 1 Size/Capacity: 1.024.209.543.168 [1,02 TB]", + "smartctl_0016_i": "Namespace 1 Utilization: 751.290.904.576 [751 GB]", + "smartctl_0017_i": "Namespace 1 Formatted LBA Size: 512", + "smartctl_0018_i": "Namespace 1 IEEE EUI-64: 002538 b471b40718", + "smartctl_0019_i": "Local Time is: Thu Mar 31 19:09:57 2022 CEST", + "smartctl_0020_u": "Firmware Updates (0x16): 3 Slots, no Reset required", + "smartctl_0021_u": "Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test", + "smartctl_0022_u": "Optional NVM Commands (0x001f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat", + "smartctl_0023_u": "Log Page Attributes (0x03): S/H_per_NS Cmd_Eff_Lg", + "smartctl_0024_u": "Warning Comp. Temp. Threshold: 69 Celsius", + "smartctl_0025_u": "Critical Comp. Temp. Threshold: 72 Celsius", + "smartctl_0027_u": "Supported Power States", + "smartctl_0028_u": "St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat", + "smartctl_0029_u": " 0 + 7.60W - - 0 0 0 0 0 0", + "smartctl_0030_u": " 1 + 6.00W - - 1 1 1 1 0 0", + "smartctl_0031_u": " 2 + 5.10W - - 2 2 2 2 0 0", + "smartctl_0032_u": " 3 - 0.0400W - - 3 3 3 3 210 1500", + "smartctl_0033_u": " 4 - 0.0050W - - 4 4 4 4 2200 6000", + "smartctl_0035_u": "Supported LBA Sizes (NSID 0x1)", + "smartctl_0036_u": "Id Fmt Data Metadt Rel_Perf", + "smartctl_0037_u": " 0 + 512 0 0", + "smartctl_0039_u": "=== START OF SMART DATA SECTION ===", + "smartctl_0040_i": "SMART overall-health self-assessment test result: PASSED", + "smartctl_0042_i": "SMART/Health Information (NVMe Log 0x02)", + "smartctl_0043_i": "Critical Warning: 0x00", + "smartctl_0044_i": "Temperature: 40 Celsius", + "smartctl_0045_i": "Available Spare: 100%", + "smartctl_0046_i": "Available Spare Threshold: 10%", + "smartctl_0047_i": "Percentage Used: 2%", + "smartctl_0048_i": "Data Units Read: 14.418.152 [7,38 TB]", + "smartctl_0049_i": "Data Units Written: 65.176.274 [33,3 TB]", + "smartctl_0050_i": "Host Read Commands: 291.649.994", + "smartctl_0051_i": "Host Write Commands: 1.827.855.643", + "smartctl_0052_i": "Controller Busy Time: 2.377", + "smartctl_0053_i": "Power Cycles: 5.320", + "smartctl_0054_i": "Power On Hours: 6.032", + "smartctl_0055_i": "Unsafe Shutdowns: 286", + "smartctl_0056_i": "Media and Data Integrity Errors: 0", + "smartctl_0057_i": "Error Information Log Entries: 2.891", + "smartctl_0058_i": "Warning Comp. Temperature Time: 0", + "smartctl_0059_i": "Critical Comp. Temperature Time: 0", + "smartctl_0060_i": "Temperature Sensor 1: 40 Celsius", + "smartctl_0061_i": "Temperature Sensor 2: 47 Celsius", + "smartctl_0063_u": "Error Information (NVMe Log 0x01, 16 of 64 entries)", + "smartctl_0064_u": "Num ErrCount SQId CmdId Status PELoc LBA NSID VS", + "smartctl_0065_u": " 0 2891 0 0x1016 0x4004 - 0 0 -", + "smartctl_0066_u": " 1 2890 0 0x0008 0x4004 - 0 0 -", + "smartctl_0067_u": " 2 2889 0 0x0008 0x4004 - 0 0 -", + "smartctl_0068_u": " 3 2888 0 0x0008 0x4004 - 0 0 -", + "smartctl_0069_u": " 4 2887 0 0x0008 0x4004 - 0 0 -", + "smartctl_0070_u": " 5 2886 0 0x0008 0x4004 - 0 0 -", + "smartctl_0071_u": " 6 2885 0 0x0008 0x4004 - 0 0 -", + "smartctl_0072_u": " 7 2884 0 0x0008 0x4004 - 0 0 -", + "smartctl_0073_u": " 8 2883 0 0x0008 0x4004 - 0 0 -", + "smartctl_0074_u": " 9 2882 0 0x0008 0x4004 - 0 0 -", + "smartctl_0075_u": " 10 2881 0 0x0008 0x4004 - 0 0 -", + "smartctl_0076_u": " 11 2880 0 0x0008 0x4004 - 0 0 -", + "smartctl_0077_u": " 12 2879 0 0x0008 0x4004 - 0 0 -", + "smartctl_0078_u": " 13 2878 0 0x0008 0x4004 - 0 0 -", + "smartctl_0079_u": " 14 2877 0 0x0008 0x4004 - 0 0 -", + "smartctl_0080_u": " 15 2876 0 0x0008 0x4004 - 0 0 -", + "smartctl_0081_u": "... (48 entries not read)", + "temperature": { + "current": 40 + }, + "user_capacity": { + "blocks": 2000409264, + "blocks_s": "2000409264", + "bytes": 1024209543168, + "bytes_le": [ + 0, + 96, + 165, + 119, + 238 + ], + "bytes_s": "1024209543168" + } + } + ] + } +} diff --git a/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json b/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json new file mode 100644 index 00000000..f11364c8 --- /dev/null +++ b/tests/files/2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json @@ -0,0 +1,1179 @@ +{ + "timestamp": "2022-04-01 06:28:54.099394", + "type": "Snapshot", + "uuid": "232b44f3-b139-490e-90c8-2748a4523e80", + "wbid": "YKPZ27NJ2NMRO4893M4L5NRZV5YJ1", + "software": "Workbench", + "version": "2022.03.00", + "schema_api": "1.0.0", + "data": { + "lspci": "", + "lshw": { + "id": "wb", + "class": "system", + "claimed": true, + "handle": "DMI:0100", + "description": "Computer", + "product": "Standard PC (i440FX + PIIX, 1996)", + "vendor": "QEMU", + "version": "pc-i440fx-5.2", + "width": 64, + "configuration": { + "boot": "normal" + }, + "capabilities": { + "smbios-2.8": "SMBIOS version 2.8", + "dmi-2.8": "DMI version 2.8", + "vsyscall32": "32-bit processes" + }, + "children": [ + { + "id": "core", + "class": "bus", + "claimed": true, + "description": "Motherboard", + "physid": "0", + "children": [ + { + "id": "firmware", + "class": "memory", + "claimed": true, + "description": "BIOS", + "vendor": "SeaBIOS", + "physid": "0", + "version": "?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31", + "date": "04/01/2014", + "units": "bytes", + "size": 98304 + }, + { + "id": "cpu", + "class": "processor", + "claimed": true, + "handle": "DMI:0400", + "description": "CPU", + "product": "Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz", + "vendor": "Intel Corp.", + "physid": "400", + "businfo": "cpu@0", + "version": "6.142.9", + "slot": "CPU 0", + "units": "Hz", + "size": 2000000000, + "capacity": 2000000000, + "width": 64, + "configuration": { + "cores": "1", + "enabledcores": "1", + "microcode": "1", + "threads": "1" + }, + "capabilities": { + "fpu": "mathematical co-processor", + "fpu_exception": "FPU exceptions reporting", + "wp": true, + "vme": "virtual mode extensions", + "de": "debugging extensions", + "pse": "page size extensions", + "tsc": "time stamp counter", + "msr": "model-specific registers", + "pae": "4GB+ memory addressing (Physical Address Extension)", + "mce": "machine check exceptions", + "cx8": "compare and exchange 8-byte", + "apic": "on-chip advanced programmable interrupt controller (APIC)", + "sep": "fast system calls", + "mtrr": "memory type range registers", + "pge": "page global enable", + "mca": "machine check architecture", + "cmov": "conditional move instruction", + "pat": "page attribute table", + "pse36": "36-bit page size extensions", + "clflush": true, + "mmx": "multimedia extensions (MMX)", + "fxsr": "fast floating point save/restore", + "sse": "streaming SIMD extensions (SSE)", + "sse2": "streaming SIMD extensions (SSE2)", + "ss": "self-snoop", + "syscall": "fast system calls", + "nx": "no-execute bit (NX)", + "pdpe1gb": true, + "rdtscp": true, + "x86-64": "64bits extensions (x86-64)", + "constant_tsc": true, + "arch_perfmon": true, + "rep_good": true, + "nopl": true, + "xtopology": true, + "cpuid": true, + "tsc_known_freq": true, + "pni": true, + "pclmulqdq": true, + "vmx": true, + "ssse3": true, + "fma": true, + "cx16": true, + "pcid": true, + "sse4_1": true, + "sse4_2": true, + "x2apic": true, + "movbe": true, + "popcnt": true, + "tsc_deadline_timer": true, + "aes": true, + "xsave": true, + "avx": true, + "f16c": true, + "rdrand": true, + "hypervisor": true, + "lahf_lm": true, + "abm": true, + "3dnowprefetch": true, + "cpuid_fault": true, + "invpcid_single": true, + "pti": true, + "tpr_shadow": true, + "vnmi": true, + "flexpriority": true, + "ept": true, + "vpid": true, + "ept_ad": true, + "fsgsbase": true, + "tsc_adjust": true, + "bmi1": true, + "avx2": true, + "smep": true, + "bmi2": true, + "erms": true, + "invpcid": true, + "mpx": true, + "rdseed": true, + "adx": true, + "smap": true, + "clflushopt": true, + "xsaveopt": true, + "xsavec": true, + "xgetbv1": true, + "xsaves": true, + "arat": true, + "umip": true, + "arch_capabilities": true + } + }, + { + "id": "memory", + "class": "memory", + "claimed": true, + "handle": "DMI:1000", + "description": "System Memory", + "physid": "1000", + "units": "bytes", + "size": 4294967296, + "configuration": { + "errordetection": "multi-bit-ecc" + }, + "capabilities": { + "ecc": "Multi-bit error-correcting code (ECC)" + }, + "children": [ + { + "id": "bank", + "class": "memory", + "claimed": true, + "handle": "DMI:1100", + "description": "DIMM RAM", + "vendor": "QEMU", + "physid": "0", + "slot": "DIMM 0", + "units": "bytes", + "size": 4294967296 + } + ] + }, + { + "id": "pci", + "class": "bridge", + "claimed": true, + "handle": "PCIBUS:0000:00", + "description": "Host bridge", + "product": "440FX - 82441FX PMC [Natoma]", + "vendor": "Intel Corporation", + "physid": "100", + "businfo": "pci@0000:00:00.0", + "version": "02", + "width": 32, + "clock": 33000000, + "children": [ + { + "id": "isa", + "class": "bridge", + "claimed": true, + "handle": "PCI:0000:00:01.0", + "description": "ISA bridge", + "product": "82371SB PIIX3 ISA [Natoma/Triton II]", + "vendor": "Intel Corporation", + "physid": "1", + "businfo": "pci@0000:00:01.0", + "version": "00", + "width": 32, + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "capabilities": { + "isa": true + }, + "children": [ + { + "id": "pnp00:00", + "class": "input", + "claimed": true, + "product": "PnP device PNP0303", + "physid": "0", + "configuration": { + "driver": "i8042 kbd" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:01", + "class": "input", + "claimed": true, + "product": "PnP device PNP0f13", + "physid": "1", + "configuration": { + "driver": "i8042 aux" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:02", + "class": "storage", + "claimed": true, + "product": "PnP device PNP0700", + "physid": "2", + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:03", + "class": "printer", + "claimed": true, + "product": "PnP device PNP0400", + "physid": "3", + "configuration": { + "driver": "parport_pc" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:04", + "class": "communication", + "claimed": true, + "product": "PnP device PNP0501", + "physid": "4", + "configuration": { + "driver": "serial" + }, + "capabilities": { + "pnp": true + } + }, + { + "id": "pnp00:05", + "class": "system", + "claimed": true, + "product": "PnP device PNP0b00", + "physid": "5", + "configuration": { + "driver": "rtc_cmos" + }, + "capabilities": { + "pnp": true + } + } + ] + }, + { + "id": "ide", + "class": "storage", + "claimed": true, + "handle": "PCI:0000:00:01.1", + "description": "IDE interface", + "product": "82371SB PIIX3 IDE [Natoma/Triton II]", + "vendor": "Intel Corporation", + "physid": "1.1", + "businfo": "pci@0000:00:01.1", + "logicalname": [ + "scsi0", + "scsi1" + ], + "version": "00", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "ata_piix", + "latency": "0" + }, + "capabilities": { + "ide": true, + "isa_compat_mode": "ISA compatibility mode", + "bus_master": "bus mastering", + "emulated": "Emulated device" + }, + "children": [ + { + "id": "disk", + "class": "disk", + "claimed": true, + "handle": "SCSI:00:00:00:00", + "description": "ATA Disk", + "product": "QEMU HARDDISK", + "physid": "0", + "businfo": "scsi@0:0.0.0", + "logicalname": "/dev/sda", + "dev": "8:0", + "version": "2.5+", + "serial": "QM00001", + "units": "bytes", + "size": 42949673472, + "configuration": { + "ansiversion": "5", + "logicalsectorsize": "512", + "sectorsize": "512", + "signature": "c338ebd4" + }, + "capabilities": { + "partitioned": "Partitioned disk", + "partitioned:dos": "MS-DOS partition table" + }, + "children": [ + { + "id": "volume:0", + "class": "volume", + "claimed": true, + "description": "EXT4 volume", + "vendor": "Linux", + "physid": "1", + "businfo": "scsi@0:0.0.0,1", + "logicalname": "/dev/sda1", + "dev": "8:1", + "version": "1.0", + "serial": "666140b3-42b9-4940-8d82-7d894261231f", + "size": 4293918720, + "capacity": 4293918720, + "configuration": { + "created": "2020-09-18 14:01:52", + "filesystem": "ext4", + "lastmountpoint": "/", + "modified": "2022-01-29 15:42:10", + "mounted": "2022-01-29 15:42:10", + "state": "clean" + }, + "capabilities": { + "primary": "Primary partition", + "bootable": "Bootable partition (active)", + "journaled": true, + "extended_attributes": "Extended Attributes", + "large_files": "4GB+ files", + "huge_files": "16TB+ files", + "dir_nlink": "directories with 65000+ subdirs", + "recover": "needs recovery", + "64bit": "64bit filesystem", + "extents": "extent-based allocation", + "ext4": true, + "ext2": "EXT2/EXT3", + "initialized": "initialized volume" + } + }, + { + "id": "volume:1", + "class": "volume", + "claimed": true, + "description": "Extended partition", + "physid": "2", + "businfo": "scsi@0:0.0.0,2", + "logicalname": "/dev/sda2", + "dev": "8:2", + "size": 38652609536, + "capacity": 38652609536, + "capabilities": { + "primary": "Primary partition", + "extended": "Extended partition", + "partitioned": "Partitioned disk", + "partitioned:extended": "Extended partition" + }, + "children": [ + { + "id": "logicalvolume:0", + "class": "volume", + "claimed": true, + "description": "Linux swap volume", + "physid": "5", + "logicalname": "/dev/sda5", + "dev": "8:5", + "version": "1", + "serial": "5149082d-e5ab-4ccb-b75d-52a8b4da4fc8", + "size": 4292870144, + "capacity": 4292870144, + "configuration": { + "filesystem": "swap", + "pagesize": "4096" + }, + "capabilities": { + "nofs": "No filesystem", + "swap": "Linux swap", + "initialized": "initialized volume" + } + }, + { + "id": "logicalvolume:1", + "class": "volume", + "claimed": true, + "description": "EXT4 volume", + "vendor": "Linux", + "physid": "6", + "logicalname": [ + "/dev/sda6", + "/" + ], + "dev": "8:6", + "version": "1.0", + "serial": "cc4fd343-e6f4-4376-937e-f5d2fbcb48c7", + "size": 34358689792, + "capacity": 34358689792, + "configuration": { + "created": "2022-04-01 05:25:42", + "filesystem": "ext4", + "lastmountpoint": "/", + "modified": "2022-04-01 05:27:52", + "mount.fstype": "ext4", + "mount.options": "rw,relatime,errors=remount-ro", + "mounted": "2022-04-01 05:27:52", + "state": "mounted" + }, + "capabilities": { + "journaled": true, + "extended_attributes": "Extended Attributes", + "large_files": "4GB+ files", + "huge_files": "16TB+ files", + "dir_nlink": "directories with 65000+ subdirs", + "recover": "needs recovery", + "64bit": "64bit filesystem", + "extents": "extent-based allocation", + "ext4": true, + "ext2": "EXT2/EXT3", + "initialized": "initialized volume" + } + } + ] + } + ] + }, + { + "id": "cdrom", + "class": "disk", + "claimed": true, + "handle": "SCSI:01:00:00:00", + "description": "DVD reader", + "product": "QEMU DVD-ROM", + "vendor": "QEMU", + "physid": "1", + "businfo": "scsi@1:0.0.0", + "logicalname": [ + "/dev/cdrom", + "/dev/dvd", + "/dev/sr0" + ], + "dev": "11:0", + "version": "2.5+", + "configuration": { + "ansiversion": "5", + "status": "nodisc" + }, + "capabilities": { + "removable": "support is removable", + "audio": "Audio CD playback", + "dvd": "DVD playback" + } + } + ] + }, + { + "id": "bridge", + "class": "bridge", + "claimed": true, + "handle": "PCI:0000:00:01.3", + "description": "Bridge", + "product": "82371AB/EB/MB PIIX4 ACPI", + "vendor": "Intel Corporation", + "physid": "1.3", + "businfo": "pci@0000:00:01.3", + "version": "03", + "width": 32, + "clock": 33000000, + "configuration": { + "driver": "piix4_smbus", + "latency": "0" + }, + "capabilities": { + "bridge": true + } + }, + { + "id": "display", + "class": "display", + "claimed": true, + "handle": "PCI:0000:00:02.0", + "description": "VGA compatible controller", + "product": "bochs-drmdrmfb", + "physid": "2", + "businfo": "pci@0000:00:02.0", + "logicalname": "/dev/fb0", + "version": "02", + "width": 32, + "clock": 33000000, + "configuration": { + "depth": "32", + "driver": "bochs-drm", + "latency": "0", + "resolution": "1024,768" + }, + "capabilities": { + "vga_controller": true, + "bus_master": "bus mastering", + "rom": "extension ROM", + "fb": "framebuffer" + } + }, + { + "id": "network", + "class": "network", + "claimed": true, + "handle": "PCI:0000:00:03.0", + "description": "Ethernet interface", + "product": "82540EM Gigabit Ethernet Controller", + "vendor": "Intel Corporation", + "physid": "3", + "businfo": "pci@0000:00:03.0", + "logicalname": "ens3", + "version": "03", + "serial": "52:54:00:12:34:56", + "units": "bit/s", + "size": 1000000000, + "capacity": 1000000000, + "width": 32, + "clock": 33000000, + "configuration": { + "autonegotiation": "on", + "broadcast": "yes", + "driver": "e1000", + "driverversion": "5.10.0-13-amd64", + "duplex": "full", + "ip": "10.0.2.15", + "latency": "0", + "link": "yes", + "multicast": "yes", + "port": "twisted pair", + "speed": "1Gbit/s" + }, + "capabilities": { + "bus_master": "bus mastering", + "rom": "extension ROM", + "ethernet": true, + "physical": "Physical interface", + "tp": "twisted pair", + "10bt": "10Mbit/s", + "10bt-fd": "10Mbit/s (full duplex)", + "100bt": "100Mbit/s", + "100bt-fd": "100Mbit/s (full duplex)", + "1000bt-fd": "1Gbit/s (full duplex)", + "autonegotiation": "Auto-negotiation" + } + } + ] + } + ] + }, + { + "id": "input:0", + "class": "input", + "claimed": true, + "product": "AT Translated Set 2 keyboard", + "physid": "1", + "logicalname": [ + "input0", + "/dev/input/event0", + "input0::capslock", + "input0::numlock", + "input0::scrolllock" + ], + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + } + }, + { + "id": "input:1", + "class": "input", + "claimed": true, + "product": "VirtualPS/2 VMware VMMouse", + "physid": "2", + "logicalname": [ + "input2", + "/dev/input/event2", + "/dev/input/mouse1" + ], + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + } + }, + { + "id": "input:2", + "class": "input", + "claimed": true, + "product": "VirtualPS/2 VMware VMMouse", + "physid": "3", + "logicalname": [ + "input3", + "/dev/input/event1", + "/dev/input/mouse0" + ], + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + } + }, + { + "id": "input:3", + "class": "input", + "claimed": true, + "product": "Power Button", + "physid": "4", + "logicalname": [ + "input4", + "/dev/input/event3" + ], + "capabilities": { + "platform": true + } + }, + { + "id": "input:4", + "class": "input", + "claimed": true, + "product": "PC Speaker", + "physid": "5", + "logicalname": [ + "input5", + "/dev/input/event4" + ], + "capabilities": { + "isa": "ISA bus" + } + } + ] + }, + "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.8 present.\n10 structures occupying 462 bytes.\nTable at 0x000F5A90.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: SeaBIOS\n\tVersion: ?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31\n\tRelease Date: 04/01/2014\n\tAddress: 0xE8000\n\tRuntime Size: 96 kB\n\tROM Size: 64 kB\n\tCharacteristics:\n\t\tBIOS characteristics not supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 0.0\n\nHandle 0x0100, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: QEMU\n\tProduct Name: Standard PC (i440FX + PIIX, 1996)\n\tVersion: pc-i440fx-5.2\n\tSerial Number: Not Specified\n\tUUID: Not Settable\n\tWake-up Type: Power Switch\n\tSKU Number: Not Specified\n\tFamily: Not Specified\n\nHandle 0x0300, DMI type 3, 22 bytes\nChassis Information\n\tManufacturer: QEMU\n\tType: Other\n\tLock: Not Present\n\tVersion: pc-i440fx-5.2\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: Unknown\n\tOEM Information: 0x00000000\n\tHeight: Unspecified\n\tNumber Of Power Cords: Unspecified\n\tContained Elements: 0\n\tSKU Number: Not Specified\n\nHandle 0x0400, DMI type 4, 42 bytes\nProcessor Information\n\tSocket Designation: CPU 0\n\tType: Central Processor\n\tFamily: Other\n\tManufacturer: QEMU\n\tID: E9 06 08 00 FF FB 8B 0F\n\tVersion: pc-i440fx-5.2\n\tVoltage: Unknown\n\tExternal Clock: Unknown\n\tMax Speed: 2000 MHz\n\tCurrent Speed: 2000 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Other\n\tL1 Cache Handle: Not Provided\n\tL2 Cache Handle: Not Provided\n\tL3 Cache Handle: Not Provided\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tPart Number: Not Specified\n\tCore Count: 1\n\tCore Enabled: 1\n\tThread Count: 1\n\tCharacteristics: None\n\nHandle 0x1000, DMI type 16, 23 bytes\nPhysical Memory Array\n\tLocation: Other\n\tUse: System Memory\n\tError Correction Type: Multi-bit ECC\n\tMaximum Capacity: 4 GB\n\tError Information Handle: Not Provided\n\tNumber Of Devices: 1\n\nHandle 0x1100, DMI type 17, 40 bytes\nMemory Device\n\tArray Handle: 0x1000\n\tError Information Handle: Not Provided\n\tTotal Width: Unknown\n\tData Width: Unknown\n\tSize: 4 GB\n\tForm Factor: DIMM\n\tSet: None\n\tLocator: DIMM 0\n\tBank Locator: Not Specified\n\tType: RAM\n\tType Detail: Other\n\tSpeed: Unknown\n\tManufacturer: QEMU\n\tSerial Number: Not Specified\n\tAsset Tag: Not Specified\n\tPart Number: Not Specified\n\tRank: Unknown\n\tConfigured Memory Speed: Unknown\n\tMinimum Voltage: Unknown\n\tMaximum Voltage: Unknown\n\tConfigured Voltage: Unknown\n\nHandle 0x1300, DMI type 19, 31 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x000BFFFFFFF\n\tRange Size: 3 GB\n\tPhysical Array Handle: 0x1000\n\tPartition Width: 1\n\nHandle 0x1301, DMI type 19, 31 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00100000000\n\tEnding Address: 0x0013FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Array Handle: 0x1000\n\tPartition Width: 1\n\nHandle 0x2000, DMI type 32, 11 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x7F00, DMI type 127, 4 bytes\nEnd Of Table\n\n", + "hwinfo": "01: None 00.0: 0102 Floppy disk controller\n [Created at floppy.112]\n Unique ID: rdCR.3wRL2_g4d2B\n Hardware Class: storage\n Model: \"Floppy disk controller\"\n I/O Port: 0x3f2 (rw)\n I/O Ports: 0x3f4-0x3f5 (rw)\n I/O Port: 0x3f7 (rw)\n DMA: 2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n02: Floppy 00.0: 10603 Floppy Disk\n [Created at floppy.127]\n Unique ID: sPPV.oZ89vuho4Y3\n Parent ID: rdCR.3wRL2_g4d2B\n Hardware Class: floppy\n Model: \"Floppy Disk\"\n Device File: /dev/fd0\n Size: 3.5 ''\n Size: 5760 sectors a 512 bytes\n Capacity: 0 GB (2949120 bytes)\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #1 (Floppy disk controller)\n\n03: None 00.0: 10105 BIOS\n [Created at bios.186]\n Unique ID: rdCR.lZF+r4EgHp4\n Hardware Class: bios\n BIOS Keyboard LED Status:\n Scroll Lock: off\n Num Lock: off\n Caps Lock: off\n Serial Port 0: 0x3f8\n Parallel Port 0: 0x378\n Base Memory: 639 kB\n PnP BIOS: @@@0000\n MP spec rev 1.4 info:\n OEM id: \"BOCHSCPU\"\n Product id: \"0.1\"\n 1 CPUs (0 disabled)\n BIOS32 Service Directory Entry: 0xfd243\n SMBIOS Version: 2.8\n BIOS Info: #0\n Vendor: \"SeaBIOS\"\n Version: \"?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31\"\n Date: \"04/01/2014\"\n Start Address: 0xe8000\n ROM Size: 64 kB\n Features: 0x04000000000000000008\n System Info: #256\n Manufacturer: \"QEMU\"\n Product: \"Standard PC (i440FX + PIIX, 1996)\"\n Version: \"pc-i440fx-5.2\"\n UUID: undefined\n Wake-up: 0x06 (Power Switch)\n Chassis Info: #768\n Manufacturer: \"QEMU\"\n Version: \"pc-i440fx-5.2\"\n Type: 0x01 (Other)\n Bootup State: 0x03 (Safe)\n Power Supply State: 0x03 (Safe)\n Thermal State: 0x03 (Safe)\n Security Status: 0x02 (Unknown)\n Processor Info: #1024\n Socket: \"CPU 0\"\n Socket Type: 0x01 (Other)\n Socket Status: Populated\n Type: 0x03 (CPU)\n Family: 0x01 (Other)\n Manufacturer: \"QEMU\"\n Version: \"pc-i440fx-5.2\"\n Processor ID: 0x0f8bfbff000806e9\n Status: 0x01 (Enabled)\n Max. Speed: 2000 MHz\n Current Speed: 2000 MHz\n Physical Memory Array: #4096\n Use: 0x03 (System memory)\n Location: 0x01 (Other)\n Slots: 1\n Max. Size: 4 GB\n ECC: 0x06 (Multi-bit)\n Memory Device: #4352\n Location: \"DIMM 0\"\n Manufacturer: \"QEMU\"\n Memory Array: #4096\n Form Factor: 0x09 (DIMM)\n Type: 0x07 (RAM)\n Type Detail: 0x0002 (Other)\n Data Width: 0 bits\n Size: 4 GB\n Memory Array Mapping: #4864\n Memory Array: #4096\n Partition Width: 1\n Start Address: 0x00000000\n End Address: 0xc0000000\n Memory Array Mapping: #4865\n Memory Array: #4096\n Partition Width: 1\n Start Address: 0x0000000100000000\n End Address: 0x0000000140000000\n Type 32 Record: #8192\n Data 00: 20 0b 00 20 00 00 00 00 00 00 00\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n04: None 00.0: 10107 System\n [Created at sys.64]\n Unique ID: rdCR.n_7QNeEnh23\n Hardware Class: system\n Model: \"System\"\n Formfactor: \"desktop\"\n Driver Info #0:\n Driver Status: thermal,fan are not active\n Driver Activation Cmd: \"modprobe thermal; modprobe fan\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n05: None 00.0: 10104 FPU\n [Created at misc.191]\n Unique ID: rdCR.EMpH5pjcahD\n Hardware Class: unknown\n Model: \"FPU\"\n I/O Ports: 0xf0-0xff (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n06: None 00.0: 0801 DMA controller (8237)\n [Created at misc.205]\n Unique ID: rdCR.f5u1ucRm+H9\n Hardware Class: unknown\n Model: \"DMA controller\"\n I/O Ports: 0x00-0xcf7 (rw)\n I/O Ports: 0xc0-0xdf (rw)\n I/O Ports: 0x80-0x8f (rw)\n DMA: 4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n07: None 00.0: 0800 PIC (8259)\n [Created at misc.218]\n Unique ID: rdCR.8uRK7LxiIA2\n Hardware Class: unknown\n Model: \"PIC\"\n I/O Ports: 0x20-0x21 (rw)\n I/O Ports: 0xa0-0xa1 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n08: None 00.0: 0900 Keyboard controller\n [Created at misc.250]\n Unique ID: rdCR.9N+EecqykME\n Hardware Class: unknown\n Model: \"Keyboard controller\"\n I/O Port: 0x60 (rw)\n I/O Port: 0x64 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n09: None 00.0: 0701 Parallel controller (SPP)\n [Created at misc.261]\n Unique ID: YMnp.ecK7NLYWZ5D\n Hardware Class: unknown\n Model: \"Parallel controller\"\n Device File: /dev/lp0\n I/O Ports: 0x378-0x37a (rw)\n I/O Ports: 0x37b-0x37f (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n10: None 00.0: 10400 PS/2 Controller\n [Created at misc.303]\n Unique ID: rdCR.DziBbWO85o5\n Hardware Class: unknown\n Model: \"PS/2 Controller\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n12: None 00.0: 10102 Main Memory\n [Created at memory.74]\n Unique ID: rdCR.CxwsZFjVASF\n Hardware Class: memory\n Model: \"Main Memory\"\n Memory Range: 0x00000000-0xf5b80fff (rw)\n Memory Size: 3 GB + 768 MB\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n13: PCI 01.0: 0601 ISA bridge\n [Created at pci.386]\n Unique ID: vSkL.ucdhKwLeeAA\n SysFS ID: /devices/pci0000:00/0000:00:01.0\n SysFS BusID: 0000:00:01.0\n Hardware Class: bridge\n Model: \"Red Hat Qemu virtual machine\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x7000 \"82371SB PIIX3 ISA [Natoma/Triton II]\"\n SubVendor: pci 0x1af4 \"Red Hat, Inc.\"\n SubDevice: pci 0x1100 \"Qemu virtual machine\"\n Module Alias: \"pci:v00008086d00007000sv00001AF4sd00001100bc06sc01i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n14: PCI 00.0: 0600 Host bridge\n [Created at pci.386]\n Unique ID: qLht.YeL3TKDjrxE\n SysFS ID: /devices/pci0000:00/0000:00:00.0\n SysFS BusID: 0000:00:00.0\n Hardware Class: bridge\n Model: \"Red Hat Qemu virtual machine\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x1237 \"440FX - 82441FX PMC [Natoma]\"\n SubVendor: pci 0x1af4 \"Red Hat, Inc.\"\n SubDevice: pci 0x1100 \"Qemu virtual machine\"\n Revision: 0x02\n Module Alias: \"pci:v00008086d00001237sv00001AF4sd00001100bc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n15: PCI 01.3: 0680 Bridge\n [Created at pci.386]\n Unique ID: VRCs.M9Cc8lcQjE2\n SysFS ID: /devices/pci0000:00/0000:00:01.3\n SysFS BusID: 0000:00:01.3\n Hardware Class: bridge\n Model: \"Red Hat Qemu virtual machine\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x7113 \"82371AB/EB/MB PIIX4 ACPI\"\n SubVendor: pci 0x1af4 \"Red Hat, Inc.\"\n SubDevice: pci 0x1100 \"Qemu virtual machine\"\n Revision: 0x03\n Driver: \"piix4_smbus\"\n Driver Modules: \"i2c_piix4\"\n IRQ: 9 (no events)\n Module Alias: \"pci:v00008086d00007113sv00001AF4sd00001100bc06sc80i00\"\n Driver Info #0:\n Driver Status: i2c_piix4 is active\n Driver Activation Cmd: \"modprobe i2c_piix4\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n16: PCI 03.0: 0200 Ethernet controller\n [Created at pci.386]\n Unique ID: RNcY.amjFVOTKCI8\n SysFS ID: /devices/pci0000:00/0000:00:03.0\n SysFS BusID: 0000:00:03.0\n Hardware Class: network\n Model: \"Red Hat QEMU Virtual Machine\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x100e \"82540EM Gigabit Ethernet Controller\"\n SubVendor: pci 0x1af4 \"Red Hat, Inc.\"\n SubDevice: pci 0x1100 \"QEMU Virtual Machine\"\n Revision: 0x03\n Driver: \"e1000\"\n Driver Modules: \"e1000\"\n Device File: ens3\n Memory Range: 0xfebc0000-0xfebdffff (rw,non-prefetchable)\n I/O Ports: 0xc000-0xc03f (rw)\n Memory Range: 0xfeb80000-0xfebbffff (ro,non-prefetchable,disabled)\n IRQ: 11 (81544 events)\n HW Address: 52:54:00:12:34:56\n Permanent HW Address: 52:54:00:12:34:56\n Link detected: yes\n Module Alias: \"pci:v00008086d0000100Esv00001AF4sd00001100bc02sc00i00\"\n Driver Info #0:\n Driver Status: e1000 is active\n Driver Activation Cmd: \"modprobe e1000\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n17: PCI 01.1: 0101 IDE interface (ISA Compatibility mode-only controller, supports bus mastering)\n [Created at pci.386]\n Unique ID: mnDB.3sKqaxiizg6\n SysFS ID: /devices/pci0000:00/0000:00:01.1\n SysFS BusID: 0000:00:01.1\n Hardware Class: storage\n Model: \"Red Hat Qemu virtual machine\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x7010 \"82371SB PIIX3 IDE [Natoma/Triton II]\"\n SubVendor: pci 0x1af4 \"Red Hat, Inc.\"\n SubDevice: pci 0x1100 \"Qemu virtual machine\"\n Driver: \"ata_piix\"\n Driver Modules: \"ata_piix\"\n I/O Ports: 0x1f0-0x1f7 (rw)\n I/O Port: 0x3f6 (rw)\n I/O Ports: 0x170-0x177 (rw)\n I/O Port: 0x376 (rw)\n I/O Ports: 0xc040-0xc04f (rw)\n Module Alias: \"pci:v00008086d00007010sv00001AF4sd00001100bc01sc01i80\"\n Driver Info #0:\n Driver Status: ata_piix is active\n Driver Activation Cmd: \"modprobe ata_piix\"\n Driver Info #1:\n Driver Status: ata_generic is active\n Driver Activation Cmd: \"modprobe ata_generic\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n18: PCI 02.0: 0300 VGA compatible controller (VGA)\n [Created at pci.386]\n Unique ID: _Znp.WspiKb87LiA\n SysFS ID: /devices/pci0000:00/0000:00:02.0\n SysFS BusID: 0000:00:02.0\n Hardware Class: graphics card\n Model: \"VGA compatible controller\"\n Vendor: pci 0x1234 \n Device: pci 0x1111 \n SubVendor: pci 0x1af4 \"Red Hat, Inc.\"\n SubDevice: pci 0x1100 \n Revision: 0x02\n Driver: \"bochs-drm\"\n Driver Modules: \"bochs_drm\"\n Memory Range: 0xfd000000-0xfdffffff (ro,non-prefetchable)\n Memory Range: 0xfebf0000-0xfebf0fff (rw,non-prefetchable)\n Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)\n I/O Ports: 0x3c0-0x3df (rw)\n Module Alias: \"pci:v00001234d00001111sv00001AF4sd00001100bc03sc00i00\"\n Driver Info #0:\n Driver Status: bochs_drm is active\n Driver Activation Cmd: \"modprobe bochs_drm\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n19: None 00.0: 10002 LCD Monitor\n [Created at monitor.125]\n Unique ID: rdCR.AenZDShaZ_5\n Parent ID: _Znp.WspiKb87LiA\n Hardware Class: monitor\n Model: \"QEMU Monitor\"\n Vendor: RHT \n Device: eisa 0x1234 \"QEMU Monitor\"\n Resolution: 640x480@60Hz\n Resolution: 800x600@60Hz\n Resolution: 1024x768@60Hz\n Resolution: 2048x1152@60Hz\n Resolution: 1920x1080@60Hz\n Size: 260x195 mm\n Year of Manufacture: 2014\n Week of Manufacture: 42\n Detailed Timings #0:\n Resolution: 1024x768\n Horizontal: 1024 1280 1310 1382 (+256 +286 +358) -hsync\n Vertical: 768 771 774 794 (+3 +6 +26) -vsync\n Frequencies: 82.29 MHz, 59.54 kHz, 74.99 Hz\n Driver Info #0:\n Max. Resolution: 2048x1152\n Vert. Sync Range: 50-125 Hz\n Hor. Sync Range: 30-160 kHz\n Bandwidth: 82 MHz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #18 (VGA compatible controller)\n\n20: None 00.0: 0700 Serial controller (16550)\n [Created at serial.74]\n Unique ID: S_Uw.3fyvFV+mbWD\n Hardware Class: unknown\n Model: \"16550A\"\n Device: \"16550A\"\n Device File: /dev/ttyS0\n I/O Ports: 0x3f8-0x3ff (rw)\n IRQ: 4 (56 events)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n21: SCSI 100.0: 10602 CD-ROM (DVD)\n [Created at block.249]\n Unique ID: KD9E.53N0UD4ozwD\n Parent ID: mnDB.3sKqaxiizg6\n SysFS ID: /class/block/sr0\n SysFS BusID: 1:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:01.1/ata2/host1/target1:0:0/1:0:0:0\n Hardware Class: cdrom\n Model: \"QEMU DVD-ROM\"\n Vendor: \"QEMU\"\n Device: \"QEMU DVD-ROM\"\n Revision: \"2.5+\"\n Driver: \"ata_piix\", \"sr\"\n Driver Modules: \"ata_piix\", \"sr_mod\"\n Device File: /dev/sr0 (/dev/sg1)\n Device Files: /dev/sr0, /dev/cdrom, /dev/disk/by-id/ata-QEMU_DVD-ROM_QM00003, /dev/disk/by-path/pci-0000:00:01.1-ata-2, /dev/disk/by-path/pci-0000:00:01.1-ata-2.0, /dev/dvd\n Device Number: block 11:0 (char 21:1)\n Features: DVD, MRW, MRW-W\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (IDE interface)\n Drive Speed: 4\n\n22: None 00.0: 10600 Disk\n [Created at block.245]\n Unique ID: kwWm.Fxp0d3BezAE\n SysFS ID: /class/block/fd0\n SysFS BusID: floppy.0\n SysFS Device Link: /devices/platform/floppy.0\n Hardware Class: disk\n Model: \"Disk\"\n Driver: \"floppy\"\n Driver Modules: \"floppy\"\n Device File: /dev/fd0\n Device Number: block 2:0\n Size: 8 sectors a 512 bytes\n Capacity: 0 GB (4096 bytes)\n Drive status: no medium\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n23: IDE 00.0: 10600 Disk\n [Created at block.245]\n Unique ID: 3OOL.W8iGvCekDp8\n Parent ID: mnDB.3sKqaxiizg6\n SysFS ID: /class/block/sda\n SysFS BusID: 0:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0\n Hardware Class: disk\n Model: \"QEMU HARDDISK\"\n Vendor: \"QEMU\"\n Device: \"HARDDISK\"\n Revision: \"2.5+\"\n Serial ID: \"QM00001\"\n Driver: \"ata_piix\", \"sd\"\n Driver Modules: \"ata_piix\", \"sd_mod\"\n Device File: /dev/sda\n Device Files: /dev/sda, /dev/disk/by-path/pci-0000:00:01.1-ata-1.0, /dev/disk/by-path/pci-0000:00:01.1-ata-1, /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001\n Device Number: block 8:0-8:15\n Geometry (Logical): CHS 5221/255/63\n Size: 83886081 sectors a 512 bytes\n Capacity: 40 GB (42949673472 bytes)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (IDE interface)\n\n24: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: bdUI.SE1wIdpsiiC\n Parent ID: 3OOL.W8iGvCekDp8\n SysFS ID: /class/block/sda/sda1\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sda1\n Device Files: /dev/sda1, /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1, /dev/disk/by-partuuid/c338ebd4-01, /dev/disk/by-path/pci-0000:00:01.1-ata-1-part1, /dev/disk/by-uuid/666140b3-42b9-4940-8d82-7d894261231f, /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part1\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (Disk)\n\n25: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: 2pkM.SE1wIdpsiiC\n Parent ID: 3OOL.W8iGvCekDp8\n SysFS ID: /class/block/sda/sda2\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sda2\n Device Files: /dev/sda2, /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part2, /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part2, /dev/disk/by-path/pci-0000:00:01.1-ata-1-part2, /dev/disk/by-partuuid/c338ebd4-02\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (Disk)\n\n26: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: QLVZ.SE1wIdpsiiC\n Parent ID: 3OOL.W8iGvCekDp8\n SysFS ID: /class/block/sda/sda5\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sda5\n Device Files: /dev/sda5, /dev/disk/by-partuuid/c338ebd4-05, /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part5, /dev/disk/by-path/pci-0000:00:01.1-ata-1-part5, /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part5, /dev/disk/by-uuid/5149082d-e5ab-4ccb-b75d-52a8b4da4fc8\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (Disk)\n\n27: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: tWld.SE1wIdpsiiC\n Parent ID: 3OOL.W8iGvCekDp8\n SysFS ID: /class/block/sda/sda6\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sda6\n Device Files: /dev/sda6, /dev/disk/by-path/pci-0000:00:01.1-ata-1.0-part6, /dev/disk/by-path/pci-0000:00:01.1-ata-1-part6, /dev/disk/by-partuuid/c338ebd4-06, /dev/disk/by-uuid/cc4fd343-e6f4-4376-937e-f5d2fbcb48c7, /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part6\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (Disk)\n\n28: PS/2 00.0: 10800 Keyboard\n [Created at input.226]\n Unique ID: nLyy.+49ps10DtUF\n Hardware Class: keyboard\n Model: \"AT Translated Set 2 keyboard\"\n Vendor: 0x0001 \n Device: 0x0001 \"AT Translated Set 2 keyboard\"\n Compatible to: int 0x0211 0x0001\n Device File: /dev/input/event0\n Device Files: /dev/input/event0, /dev/input/by-path/platform-i8042-serio-0-event-kbd\n Device Number: char 13:64\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n29: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.mYF0pYoTCW7\n Hardware Class: mouse\n Model: \"VirtualPS/2 VMware VMMouse\"\n Vendor: 0x0002 \n Device: 0x0013 \"VirtualPS/2 VMware VMMouse\"\n Compatible to: int 0x0210 0x0003\n Device File: /dev/input/mice (/dev/input/mouse0)\n Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event1, /dev/input/by-path/platform-i8042-serio-1-mouse\n Device Number: char 13:63 (char 13:32)\n Driver Info #0:\n Buttons: 3\n Wheels: 0\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n30: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.++hSeDccb2F\n Hardware Class: mouse\n Model: \"VirtualPS/2 VMware VMMouse\"\n Vendor: 0x0002 \n Device: 0x0013 \"VirtualPS/2 VMware VMMouse\"\n Compatible to: int 0x0210 0x0012\n Device File: /dev/input/mice (/dev/input/mouse1)\n Device Files: /dev/input/mice, /dev/input/mouse1, /dev/input/event2, /dev/input/by-path/platform-i8042-serio-1-event-mouse\n Device Number: char 13:63 (char 13:33)\n Driver Info #0:\n Buttons: 2\n Wheels: 1\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n31: None 00.0: 10103 CPU\n [Created at cpu.465]\n Unique ID: rdCR.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.142.9 \"Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,mmx,fxsr,sse,sse2,ss,syscall,nx,pdpe1gb,rdtscp,lm,constant_tsc,arch_perfmon,rep_good,nopl,xtopology,cpuid,tsc_known_freq,pni,pclmulqdq,vmx,ssse3,fma,cx16,pcid,sse4_1,sse4_2,x2apic,movbe,popcnt,tsc_deadline_timer,aes,xsave,avx,f16c,rdrand,hypervisor,lahf_lm,abm,3dnowprefetch,cpuid_fault,invpcid_single,pti,tpr_shadow,vnmi,flexpriority,ept,vpid,ept_ad,fsgsbase,tsc_adjust,bmi1,avx2,smep,bmi2,erms,invpcid,mpx,rdseed,adx,smap,clflushopt,xsaveopt,xsavec,xgetbv1,xsaves,arat,umip,arch_capabilities\n Clock: 2904 MHz\n BogoMips: 5808.00\n Cache: 16384 kb\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n32: None 03.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: U2Mp.ndpeucax6V1\n Parent ID: RNcY.amjFVOTKCI8\n SysFS ID: /class/net/ens3\n SysFS Device Link: /devices/pci0000:00/0000:00:03.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"e1000\"\n Driver Modules: \"e1000\"\n Device File: ens3\n HW Address: 52:54:00:12:34:56\n Permanent HW Address: 52:54:00:12:34:56\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #16 (Ethernet controller)\n\n33: None 00.0: 10700 Loopback\n [Created at net.126]\n Unique ID: ZsBS.GQNx7L4uPNA\n SysFS ID: /class/net/lo\n Hardware Class: network interface\n Model: \"Loopback network interface\"\n Device File: lo\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n", + "smart": [ + { + "json_format_version": [ + 1, + 0 + ], + "smartctl": { + "argv": [ + "smartctl", + "-x", + "--json=cosviu", + "/dev/fd0" + ], + "build_info": "(local build)", + "exit_status": 1, + "messages": [ + { + "severity": "error", + "string": "/dev/fd0: Unable to detect device type" + } + ], + "output": [ + "smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-13-amd64] (local build)", + "Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org", + "", + "/dev/fd0: Unable to detect device type", + "Please specify device type with the -d option.", + "", + "Use smartctl -h to get a usage summary", + "" + ], + "platform_info": "x86_64-linux-5.10.0-13-amd64", + "svn_revision": "5155", + "version": [ + 7, + 2 + ] + }, + "smartctl_0001_i": "smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-13-amd64] (local build)", + "smartctl_0002_i": "Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org", + "smartctl_0004_i": "/dev/fd0: Unable to detect device type", + "smartctl_0005_u": "Please specify device type with the -d option.", + "smartctl_0007_u": "Use smartctl -h to get a usage summary" + }, + { + "ata_smart_attributes": { + "revision": 1, + "table": [ + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 1, + "name": "Raw_Read_Error_Rate", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 6, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 3, + "name": "Spin_Up_Time", + "raw": { + "string": "16", + "value": 16 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": false, + "string": "-O---- ", + "updated_online": true, + "value": 2 + }, + "id": 4, + "name": "Start_Stop_Count", + "raw": { + "string": "100", + "value": 100 + }, + "thresh": 20, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 5, + "name": "Reallocated_Sector_Ct", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 36, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 9, + "name": "Power_On_Hours", + "raw": { + "string": "1", + "value": 1 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 12, + "name": "Power_Cycle_Count", + "raw": { + "string": "0", + "value": 0 + }, + "thresh": 0, + "value": 100, + "when_failed": "", + "worst": 100 + }, + { + "flags": { + "auto_keep": false, + "error_rate": false, + "event_count": false, + "performance": false, + "prefailure": true, + "string": "PO---- ", + "updated_online": true, + "value": 3 + }, + "id": 190, + "name": "Airflow_Temperature_Cel", + "raw": { + "string": "31 (Min/Max 31/31)", + "value": 522125343 + }, + "thresh": 50, + "value": 69, + "when_failed": "", + "worst": 69 + } + ] + }, + "ata_smart_data": { + "capabilities": { + "attribute_autosave_enabled": true, + "conveyance_self_test_supported": false, + "error_logging_supported": true, + "exec_offline_immediate_supported": true, + "gp_logging_supported": false, + "offline_is_aborted_upon_new_cmd": false, + "offline_surface_scan_supported": true, + "selective_self_test_supported": false, + "self_tests_supported": true, + "values": [ + 25, + 3 + ] + }, + "offline_data_collection": { + "completion_seconds": 288, + "status": { + "passed": true, + "string": "was completed without error", + "value": 130 + } + }, + "self_test": { + "polling_minutes": { + "extended": 54, + "short": 2 + }, + "status": { + "passed": true, + "string": "completed without error", + "value": 0 + } + } + }, + "ata_smart_error_log": { + "summary": { + "count": 0, + "revision": 1 + } + }, + "ata_smart_self_test_log": { + "standard": { + "count": 0, + "revision": 1 + } + }, + "ata_version": { + "major_value": 240, + "minor_value": 22, + "string": "ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000" + }, + "device": { + "info_name": "/dev/sda [SAT]", + "name": "/dev/sda", + "protocol": "ATA", + "type": "sat" + }, + "firmware_version": "2.5+", + "in_smartctl_database": false, + "json_format_version": [ + 1, + 0 + ], + "local_time": { + "asctime": "Fri Apr 1 06:28:54 2022 EDT", + "time_t": 1648808934 + }, + "logical_block_size": 512, + "model_name": "QEMU HARDDISK", + "physical_block_size": 512, + "power_cycle_count": 0, + "power_on_time": { + "hours": 1 + }, + "serial_number": "QM00001", + "smart_status": { + "passed": true + }, + "smartctl": { + "argv": [ + "smartctl", + "-x", + "--json=cosviu", + "/dev/sda" + ], + "build_info": "(local build)", + "exit_status": 4, + "output": [ + "smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-13-amd64] (local build)", + "Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org", + "", + "=== START OF INFORMATION SECTION ===", + "Device Model: QEMU HARDDISK", + "Serial Number: QM00001", + "Firmware Version: 2.5+", + "User Capacity: 42,949,673,472 bytes [42.9 GB]", + "Sector Size: 512 bytes logical/physical", + "TRIM Command: Available, deterministic", + "Device is: Not in smartctl database [for details use: -P showall]", + "ATA Version is: ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000", + "Local Time is: Fri Apr 1 06:28:54 2022 EDT", + "SMART support is: Available - device has SMART capability.", + "SMART support is: Enabled", + "AAM feature is: Unavailable", + "APM feature is: Unavailable", + "Rd look-ahead is: Unavailable", + "Write cache is: Enabled", + "DSN feature is: Unavailable", + "ATA Security is: Unavailable", + "Wt Cache Reorder: Unavailable", + "", + "=== START OF READ SMART DATA SECTION ===", + "SMART overall-health self-assessment test result: PASSED", + "", + "General SMART Values:", + "Offline data collection status: (0x82)\tOffline data collection activity", + "\t\t\t\t\twas completed without error.", + "\t\t\t\t\tAuto Offline Data Collection: Enabled.", + "Self-test execution status: ( 0)\tThe previous self-test routine completed", + "\t\t\t\t\twithout error or no self-test has ever ", + "\t\t\t\t\tbeen run.", + "Total time to complete Offline ", + "data collection: \t\t( 288) seconds.", + "Offline data collection", + "capabilities: \t\t\t (0x19) SMART execute Offline immediate.", + "\t\t\t\t\tNo Auto Offline data collection support.", + "\t\t\t\t\tSuspend Offline collection upon new", + "\t\t\t\t\tcommand.", + "\t\t\t\t\tOffline surface scan supported.", + "\t\t\t\t\tSelf-test supported.", + "\t\t\t\t\tNo Conveyance Self-test supported.", + "\t\t\t\t\tNo Selective Self-test supported.", + "SMART capabilities: (0x0003)\tSaves SMART data before entering", + "\t\t\t\t\tpower-saving mode.", + "\t\t\t\t\tSupports SMART auto save timer.", + "Error logging capability: (0x01)\tError logging supported.", + "\t\t\t\t\tNo General Purpose Logging support.", + "Short self-test routine ", + "recommended polling time: \t ( 2) minutes.", + "Extended self-test routine", + "recommended polling time: \t ( 54) minutes.", + "", + "SMART Attributes Data Structure revision number: 1", + "Vendor Specific SMART Attributes with Thresholds:", + "ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE", + " 1 Raw_Read_Error_Rate PO---- 100 100 006 - 0", + " 3 Spin_Up_Time PO---- 100 100 000 - 16", + " 4 Start_Stop_Count -O---- 100 100 020 - 100", + " 5 Reallocated_Sector_Ct PO---- 100 100 036 - 0", + " 9 Power_On_Hours PO---- 100 100 000 - 1", + " 12 Power_Cycle_Count PO---- 100 100 000 - 0", + "190 Airflow_Temperature_Cel PO---- 069 069 050 - 31 (Min/Max 31/31)", + " ||||||_ K auto-keep", + " |||||__ C event count", + " ||||___ R error rate", + " |||____ S speed/performance", + " ||_____ O updated online", + " |______ P prefailure warning", + "", + "Read SMART Log Directory failed: scsi error badly formed scsi parameters", + "", + "General Purpose Log Directory not supported", + "", + "SMART Extended Comprehensive Error Log (GP Log 0x03) not supported", + "", + "SMART Error Log Version: 1", + "No Errors Logged", + "", + "SMART Extended Self-test Log (GP Log 0x07) not supported", + "", + "SMART Self-test log structure revision number 1", + "No self-tests have been logged. [To run self-tests, use: smartctl -t]", + "", + "Selective Self-tests/Logging not supported", + "", + "SCT Commands not supported", + "", + "Device Statistics (GP/SMART Log 0x04) not supported", + "", + "Pending Defects log (GP Log 0x0c) not supported", + "", + "SATA Phy Event Counters (GP Log 0x11) not supported", + "" + ], + "platform_info": "x86_64-linux-5.10.0-13-amd64", + "svn_revision": "5155", + "version": [ + 7, + 2 + ] + }, + "smartctl_0001_i": "smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-13-amd64] (local build)", + "smartctl_0002_i": "Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org", + "smartctl_0004_u": "=== START OF INFORMATION SECTION ===", + "smartctl_0005_i": "Device Model: QEMU HARDDISK", + "smartctl_0006_i": "Serial Number: QM00001", + "smartctl_0007_i": "Firmware Version: 2.5+", + "smartctl_0008_i": "User Capacity: 42,949,673,472 bytes [42.9 GB]", + "smartctl_0009_i": "Sector Size: 512 bytes logical/physical", + "smartctl_0010_i": "TRIM Command: Available, deterministic", + "smartctl_0011_i": "Device is: Not in smartctl database [for details use: -P showall]", + "smartctl_0012_i": "ATA Version is: ATA/ATAPI-7, ATA/ATAPI-5 published, ANSI NCITS 340-2000", + "smartctl_0013_i": "Local Time is: Fri Apr 1 06:28:54 2022 EDT", + "smartctl_0014_u": "SMART support is: Available - device has SMART capability.", + "smartctl_0015_u": "SMART support is: Enabled", + "smartctl_0016_u": "AAM feature is: Unavailable", + "smartctl_0017_u": "APM feature is: Unavailable", + "smartctl_0018_u": "Rd look-ahead is: Unavailable", + "smartctl_0019_i": "Write cache is: Enabled", + "smartctl_0020_u": "DSN feature is: Unavailable", + "smartctl_0021_u": "ATA Security is: Unavailable", + "smartctl_0022_u": "Wt Cache Reorder: Unavailable", + "smartctl_0024_u": "=== START OF READ SMART DATA SECTION ===", + "smartctl_0025_i": "SMART overall-health self-assessment test result: PASSED", + "smartctl_0027_i": "General SMART Values:", + "smartctl_0028_i": "Offline data collection status: (0x82)\tOffline data collection activity", + "smartctl_0029_i": "\t\t\t\t\twas completed without error.", + "smartctl_0030_u": "\t\t\t\t\tAuto Offline Data Collection: Enabled.", + "smartctl_0031_i": "Self-test execution status: ( 0)\tThe previous self-test routine completed", + "smartctl_0032_i": "\t\t\t\t\twithout error or no self-test has ever ", + "smartctl_0033_i": "\t\t\t\t\tbeen run.", + "smartctl_0034_i": "Total time to complete Offline ", + "smartctl_0035_i": "data collection: \t\t( 288) seconds.", + "smartctl_0036_i": "Offline data collection", + "smartctl_0037_i": "capabilities: \t\t\t (0x19) SMART execute Offline immediate.", + "smartctl_0038_u": "\t\t\t\t\tNo Auto Offline data collection support.", + "smartctl_0039_i": "\t\t\t\t\tSuspend Offline collection upon new", + "smartctl_0040_i": "\t\t\t\t\tcommand.", + "smartctl_0041_i": "\t\t\t\t\tOffline surface scan supported.", + "smartctl_0042_i": "\t\t\t\t\tSelf-test supported.", + "smartctl_0043_i": "\t\t\t\t\tNo Conveyance Self-test supported.", + "smartctl_0044_i": "\t\t\t\t\tNo Selective Self-test supported.", + "smartctl_0045_i": "SMART capabilities: (0x0003)\tSaves SMART data before entering", + "smartctl_0046_i": "\t\t\t\t\tpower-saving mode.", + "smartctl_0047_u": "\t\t\t\t\tSupports SMART auto save timer.", + "smartctl_0048_i": "Error logging capability: (0x01)\tError logging supported.", + "smartctl_0049_i": "\t\t\t\t\tNo General Purpose Logging support.", + "smartctl_0050_i": "Short self-test routine ", + "smartctl_0051_i": "recommended polling time: \t ( 2) minutes.", + "smartctl_0052_i": "Extended self-test routine", + "smartctl_0053_i": "recommended polling time: \t ( 54) minutes.", + "smartctl_0055_i": "SMART Attributes Data Structure revision number: 1", + "smartctl_0056_i": "Vendor Specific SMART Attributes with Thresholds:", + "smartctl_0057_i": "ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE", + "smartctl_0058_i": " 1 Raw_Read_Error_Rate PO---- 100 100 006 - 0", + "smartctl_0059_i": " 3 Spin_Up_Time PO---- 100 100 000 - 16", + "smartctl_0060_i": " 4 Start_Stop_Count -O---- 100 100 020 - 100", + "smartctl_0061_i": " 5 Reallocated_Sector_Ct PO---- 100 100 036 - 0", + "smartctl_0062_i": " 9 Power_On_Hours PO---- 100 100 000 - 1", + "smartctl_0063_i": " 12 Power_Cycle_Count PO---- 100 100 000 - 0", + "smartctl_0064_i": "190 Airflow_Temperature_Cel PO---- 069 069 050 - 31 (Min/Max 31/31)", + "smartctl_0065_i": " ||||||_ K auto-keep", + "smartctl_0066_i": " |||||__ C event count", + "smartctl_0067_i": " ||||___ R error rate", + "smartctl_0068_i": " |||____ S speed/performance", + "smartctl_0069_i": " ||_____ O updated online", + "smartctl_0070_i": " |______ P prefailure warning", + "smartctl_0072_u": "Read SMART Log Directory failed: scsi error badly formed scsi parameters", + "smartctl_0074_u": "General Purpose Log Directory not supported", + "smartctl_0076_u": "SMART Extended Comprehensive Error Log (GP Log 0x03) not supported", + "smartctl_0078_i": "SMART Error Log Version: 1", + "smartctl_0079_i": "No Errors Logged", + "smartctl_0081_u": "SMART Extended Self-test Log (GP Log 0x07) not supported", + "smartctl_0083_i": "SMART Self-test log structure revision number 1", + "smartctl_0084_i": "No self-tests have been logged. [To run self-tests, use: smartctl -t]", + "smartctl_0086_u": "Selective Self-tests/Logging not supported", + "smartctl_0088_u": "SCT Commands not supported", + "smartctl_0090_u": "Device Statistics (GP/SMART Log 0x04) not supported", + "smartctl_0092_u": "Pending Defects log (GP Log 0x0c) not supported", + "smartctl_0094_u": "SATA Phy Event Counters (GP Log 0x11) not supported", + "temperature": { + "current": 31 + }, + "trim": { + "deterministic": true, + "supported": true, + "zeroed": false + }, + "user_capacity": { + "blocks": 83886081, + "blocks_s": "83886081", + "bytes": 42949673472, + "bytes_s": "42949673472" + }, + "write_cache": { + "enabled": true + } + } + ] + } +} diff --git a/tests/files/basic-stock.csv b/tests/files/basic-stock.csv index d037b191..471b0b26 100644 --- a/tests/files/basic-stock.csv +++ b/tests/files/basic-stock.csv @@ -1,2 +1,2 @@ -Type,Chassis,Serial Number,Model,Manufacturer,Registered in,Physical state,Trading state,Price,Processor,RAM (MB),Data Storage Size (MB),Rate,Range,Processor Rate,Processor Range,RAM Rate,RAM Range,Data Storage Rate,Data Storage Range -Desktop,Microtower,d1s,d1ml,d1mr,Tue Jul 2 10:35:10 2019,,,,p1ml,0,0,1.0,Very low,1.0,Very low,1.0,Very low,1.0,Very low +Type;Chassis;Serial Number;Model;Manufacturer;Registered in;Physical state;Trading state;Price;Processor;RAM (MB);Data Storage Size (MB) +Desktop;Microtower;d1s;d1ml;d1mr;Tue Mar 29 18:13:05 2022;;;;p1ml;0;0 diff --git a/tests/files/basic.csv b/tests/files/basic.csv index 63b4a58a..bb5c72a5 100644 --- a/tests/files/basic.csv +++ b/tests/files/basic.csv @@ -1,2 +1,2 @@ DHID;DocumentID;Public Link;Lots;Tag 1 Type;Tag 1 ID;Tag 1 Organization;Tag 2 Type;Tag 2 ID;Tag 2 Organization;Tag 3 Type;Tag 3 ID;Tag 3 Organization;Device Hardware ID;Device Type;Device Chassis;Device Serial Number;Device Model;Device Manufacturer;Registered in;Registered (process);Updated in (software);Updated in (web);Physical state;Trading state;Processor;RAM (MB);Data Storage Size (MB);Processor 1;Processor 1 Manufacturer;Processor 1 Model;Processor 1 Serial Number;Processor 1 Number of cores;Processor 1 Speed (GHz);Benchmark Processor 1 (points);Benchmark ProcessorSysbench Processor 1 (points);Processor 2;Processor 2 Manufacturer;Processor 2 Model;Processor 2 Serial Number;Processor 2 Number of cores;Processor 2 Speed (GHz);Benchmark Processor 2 (points);Benchmark ProcessorSysbench Processor 2 (points);RamModule 1;RamModule 1 Manufacturer;RamModule 1 Model;RamModule 1 Serial Number;RamModule 1 Size (MB);RamModule 1 Speed (MHz);RamModule 2;RamModule 2 Manufacturer;RamModule 2 Model;RamModule 2 Serial Number;RamModule 2 Size (MB);RamModule 2 Speed (MHz);RamModule 3;RamModule 3 Manufacturer;RamModule 3 Model;RamModule 3 Serial Number;RamModule 3 Size (MB);RamModule 3 Speed (MHz);RamModule 4;RamModule 4 Manufacturer;RamModule 4 Model;RamModule 4 Serial Number;RamModule 4 Size (MB);RamModule 4 Speed (MHz);DataStorage 1;DataStorage 1 Manufacturer;DataStorage 1 Model;DataStorage 1 Serial Number;DataStorage 1 Size (MB);Erasure DataStorage 1;Erasure DataStorage 1 Serial Number;Erasure DataStorage 1 Size (MB);Erasure DataStorage 1 Software;Erasure DataStorage 1 Result;Erasure DataStorage 1 Certificate URL;Erasure DataStorage 1 Type;Erasure DataStorage 1 Method;Erasure DataStorage 1 Elapsed (hours);Erasure DataStorage 1 Date;Erasure DataStorage 1 Steps;Erasure DataStorage 1 Steps Start Time;Erasure DataStorage 1 Steps End Time;Benchmark DataStorage 1 Read Speed (MB/s);Benchmark DataStorage 1 Writing speed (MB/s);Test DataStorage 1 Software;Test DataStorage 1 Type;Test DataStorage 1 Result;Test DataStorage 1 Power cycle count;Test DataStorage 1 Lifetime (days);Test DataStorage 1 Power on hours;DataStorage 2;DataStorage 2 Manufacturer;DataStorage 2 Model;DataStorage 2 Serial Number;DataStorage 2 Size (MB);Erasure DataStorage 2;Erasure DataStorage 2 Serial Number;Erasure DataStorage 2 Size (MB);Erasure DataStorage 2 Software;Erasure DataStorage 2 Result;Erasure DataStorage 2 Certificate URL;Erasure DataStorage 2 Type;Erasure DataStorage 2 Method;Erasure DataStorage 2 Elapsed (hours);Erasure DataStorage 2 Date;Erasure DataStorage 2 Steps;Erasure DataStorage 2 Steps Start Time;Erasure DataStorage 2 Steps End Time;Benchmark DataStorage 2 Read Speed (MB/s);Benchmark DataStorage 2 Writing speed (MB/s);Test DataStorage 2 Software;Test DataStorage 2 Type;Test DataStorage 2 Result;Test DataStorage 2 Power cycle count;Test DataStorage 2 Lifetime (days);Test DataStorage 2 Power on hours;DataStorage 3;DataStorage 3 Manufacturer;DataStorage 3 Model;DataStorage 3 Serial Number;DataStorage 3 Size (MB);Erasure DataStorage 3;Erasure DataStorage 3 Serial Number;Erasure DataStorage 3 Size (MB);Erasure DataStorage 3 Software;Erasure DataStorage 3 Result;Erasure DataStorage 3 Certificate URL;Erasure DataStorage 3 Type;Erasure DataStorage 3 Method;Erasure DataStorage 3 Elapsed (hours);Erasure DataStorage 3 Date;Erasure DataStorage 3 Steps;Erasure DataStorage 3 Steps Start Time;Erasure DataStorage 3 Steps End Time;Benchmark DataStorage 3 Read Speed (MB/s);Benchmark DataStorage 3 Writing speed (MB/s);Test DataStorage 3 Software;Test DataStorage 3 Type;Test DataStorage 3 Result;Test DataStorage 3 Power cycle count;Test DataStorage 3 Lifetime (days);Test DataStorage 3 Power on hours;DataStorage 4;DataStorage 4 Manufacturer;DataStorage 4 Model;DataStorage 4 Serial Number;DataStorage 4 Size (MB);Erasure DataStorage 4;Erasure DataStorage 4 Serial Number;Erasure DataStorage 4 Size (MB);Erasure DataStorage 4 Software;Erasure DataStorage 4 Result;Erasure DataStorage 4 Certificate URL;Erasure DataStorage 4 Type;Erasure DataStorage 4 Method;Erasure DataStorage 4 Elapsed (hours);Erasure DataStorage 4 Date;Erasure DataStorage 4 Steps;Erasure DataStorage 4 Steps Start Time;Erasure DataStorage 4 Steps End Time;Benchmark DataStorage 4 Read Speed (MB/s);Benchmark DataStorage 4 Writing speed (MB/s);Test DataStorage 4 Software;Test DataStorage 4 Type;Test DataStorage 4 Result;Test DataStorage 4 Power cycle count;Test DataStorage 4 Lifetime (days);Test DataStorage 4 Power on hours;Motherboard 1;Motherboard 1 Manufacturer;Motherboard 1 Model;Motherboard 1 Serial Number;Display 1;Display 1 Manufacturer;Display 1 Model;Display 1 Serial Number;GraphicCard 1;GraphicCard 1 Manufacturer;GraphicCard 1 Model;GraphicCard 1 Serial Number;GraphicCard 1 Memory (MB);GraphicCard 2;GraphicCard 2 Manufacturer;GraphicCard 2 Model;GraphicCard 2 Serial Number;GraphicCard 2 Memory (MB);NetworkAdapter 1;NetworkAdapter 1 Manufacturer;NetworkAdapter 1 Model;NetworkAdapter 1 Serial Number;NetworkAdapter 2;NetworkAdapter 2 Manufacturer;NetworkAdapter 2 Model;NetworkAdapter 2 Serial Number;SoundCard 1;SoundCard 1 Manufacturer;SoundCard 1 Model;SoundCard 1 Serial Number;SoundCard 2;SoundCard 2 Manufacturer;SoundCard 2 Model;SoundCard 2 Serial Number;Device Rate;Device Range;Processor Rate;Processor Range;RAM Rate;RAM Range;Data Storage Rate;Data Storage Range;Price;Benchmark RamSysbench (points) -O48N2;;http://localhost/devices/O48N2;;named;O48N2;FooOrg;;;;;;;desktop-d1mr-d1ml-d1s;Desktop;Microtower;d1s;d1ml;d1mr;Tue Nov 23 15:12:59 2021;Workbench 11.0;2021-11-23 15:12:59.333542+01:00;;;;p1ml;0;0;Processor 6: model p1ml, S/N p1s;p1mr;p1ml;p1s;;1.6;2410.0;;;;;;;;;;RamModule 5: model rm1ml, S/N rm1s;rm1mr;rm1ml;rm1s;;1333;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GraphicCard 4: model gc1ml, S/N gc1s;gc1mr;gc1ml;gc1s;;;;;;;;;;;;;;;;;;;;;;;1.0;VERY_LOW;1.0;VERY_LOW;1.0;VERY_LOW;1.0;VERY_LOW;; +O48N2;;http://localhost/devices/O48N2;;named;O48N2;FooOrg;;;;;;;desktop-d1mr-d1ml-d1s;Desktop;Microtower;d1s;d1ml;d1mr;Tue Mar 29 18:06:15 2022;Workbench 11.0;2022-03-29 18:06:15.029953+02:00;;;;p1ml;0;0;Processor 6: model p1ml, S/N p1s;p1mr;p1ml;p1s;;1.6;2410.0;;;;;;;;;;RamModule 5: model rm1ml, S/N rm1s;rm1mr;rm1ml;rm1s;;1333;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GraphicCard 4: model gc1ml, S/N gc1s;gc1mr;gc1ml;gc1s;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/tests/files/proposal_extended_csv_report.csv b/tests/files/proposal_extended_csv_report.csv index 39b02f88..f57d2c04 100644 --- a/tests/files/proposal_extended_csv_report.csv +++ b/tests/files/proposal_extended_csv_report.csv @@ -1,3 +1,3 @@ DHID;DocumentID;Public Link;Lots;Tag 1 Type;Tag 1 ID;Tag 1 Organization;Tag 2 Type;Tag 2 ID;Tag 2 Organization;Tag 3 Type;Tag 3 ID;Tag 3 Organization;Device Hardware ID;Device Type;Device Chassis;Device Serial Number;Device Model;Device Manufacturer;Registered in;Registered (process);Updated in (software);Updated in (web);Physical state;Trading state;Processor;RAM (MB);Data Storage Size (MB);Processor 1;Processor 1 Manufacturer;Processor 1 Model;Processor 1 Serial Number;Processor 1 Number of cores;Processor 1 Speed (GHz);Benchmark Processor 1 (points);Benchmark ProcessorSysbench Processor 1 (points);Processor 2;Processor 2 Manufacturer;Processor 2 Model;Processor 2 Serial Number;Processor 2 Number of cores;Processor 2 Speed (GHz);Benchmark Processor 2 (points);Benchmark ProcessorSysbench Processor 2 (points);RamModule 1;RamModule 1 Manufacturer;RamModule 1 Model;RamModule 1 Serial Number;RamModule 1 Size (MB);RamModule 1 Speed (MHz);RamModule 2;RamModule 2 Manufacturer;RamModule 2 Model;RamModule 2 Serial Number;RamModule 2 Size (MB);RamModule 2 Speed (MHz);RamModule 3;RamModule 3 Manufacturer;RamModule 3 Model;RamModule 3 Serial Number;RamModule 3 Size (MB);RamModule 3 Speed (MHz);RamModule 4;RamModule 4 Manufacturer;RamModule 4 Model;RamModule 4 Serial Number;RamModule 4 Size (MB);RamModule 4 Speed (MHz);DataStorage 1;DataStorage 1 Manufacturer;DataStorage 1 Model;DataStorage 1 Serial Number;DataStorage 1 Size (MB);Erasure DataStorage 1;Erasure DataStorage 1 Serial Number;Erasure DataStorage 1 Size (MB);Erasure DataStorage 1 Software;Erasure DataStorage 1 Result;Erasure DataStorage 1 Certificate URL;Erasure DataStorage 1 Type;Erasure DataStorage 1 Method;Erasure DataStorage 1 Elapsed (hours);Erasure DataStorage 1 Date;Erasure DataStorage 1 Steps;Erasure DataStorage 1 Steps Start Time;Erasure DataStorage 1 Steps End Time;Benchmark DataStorage 1 Read Speed (MB/s);Benchmark DataStorage 1 Writing speed (MB/s);Test DataStorage 1 Software;Test DataStorage 1 Type;Test DataStorage 1 Result;Test DataStorage 1 Power cycle count;Test DataStorage 1 Lifetime (days);Test DataStorage 1 Power on hours;DataStorage 2;DataStorage 2 Manufacturer;DataStorage 2 Model;DataStorage 2 Serial Number;DataStorage 2 Size (MB);Erasure DataStorage 2;Erasure DataStorage 2 Serial Number;Erasure DataStorage 2 Size (MB);Erasure DataStorage 2 Software;Erasure DataStorage 2 Result;Erasure DataStorage 2 Certificate URL;Erasure DataStorage 2 Type;Erasure DataStorage 2 Method;Erasure DataStorage 2 Elapsed (hours);Erasure DataStorage 2 Date;Erasure DataStorage 2 Steps;Erasure DataStorage 2 Steps Start Time;Erasure DataStorage 2 Steps End Time;Benchmark DataStorage 2 Read Speed (MB/s);Benchmark DataStorage 2 Writing speed (MB/s);Test DataStorage 2 Software;Test DataStorage 2 Type;Test DataStorage 2 Result;Test DataStorage 2 Power cycle count;Test DataStorage 2 Lifetime (days);Test DataStorage 2 Power on hours;DataStorage 3;DataStorage 3 Manufacturer;DataStorage 3 Model;DataStorage 3 Serial Number;DataStorage 3 Size (MB);Erasure DataStorage 3;Erasure DataStorage 3 Serial Number;Erasure DataStorage 3 Size (MB);Erasure DataStorage 3 Software;Erasure DataStorage 3 Result;Erasure DataStorage 3 Certificate URL;Erasure DataStorage 3 Type;Erasure DataStorage 3 Method;Erasure DataStorage 3 Elapsed (hours);Erasure DataStorage 3 Date;Erasure DataStorage 3 Steps;Erasure DataStorage 3 Steps Start Time;Erasure DataStorage 3 Steps End Time;Benchmark DataStorage 3 Read Speed (MB/s);Benchmark DataStorage 3 Writing speed (MB/s);Test DataStorage 3 Software;Test DataStorage 3 Type;Test DataStorage 3 Result;Test DataStorage 3 Power cycle count;Test DataStorage 3 Lifetime (days);Test DataStorage 3 Power on hours;DataStorage 4;DataStorage 4 Manufacturer;DataStorage 4 Model;DataStorage 4 Serial Number;DataStorage 4 Size (MB);Erasure DataStorage 4;Erasure DataStorage 4 Serial Number;Erasure DataStorage 4 Size (MB);Erasure DataStorage 4 Software;Erasure DataStorage 4 Result;Erasure DataStorage 4 Certificate URL;Erasure DataStorage 4 Type;Erasure DataStorage 4 Method;Erasure DataStorage 4 Elapsed (hours);Erasure DataStorage 4 Date;Erasure DataStorage 4 Steps;Erasure DataStorage 4 Steps Start Time;Erasure DataStorage 4 Steps End Time;Benchmark DataStorage 4 Read Speed (MB/s);Benchmark DataStorage 4 Writing speed (MB/s);Test DataStorage 4 Software;Test DataStorage 4 Type;Test DataStorage 4 Result;Test DataStorage 4 Power cycle count;Test DataStorage 4 Lifetime (days);Test DataStorage 4 Power on hours;Motherboard 1;Motherboard 1 Manufacturer;Motherboard 1 Model;Motherboard 1 Serial Number;Display 1;Display 1 Manufacturer;Display 1 Model;Display 1 Serial Number;GraphicCard 1;GraphicCard 1 Manufacturer;GraphicCard 1 Model;GraphicCard 1 Serial Number;GraphicCard 1 Memory (MB);GraphicCard 2;GraphicCard 2 Manufacturer;GraphicCard 2 Model;GraphicCard 2 Serial Number;GraphicCard 2 Memory (MB);NetworkAdapter 1;NetworkAdapter 1 Manufacturer;NetworkAdapter 1 Model;NetworkAdapter 1 Serial Number;NetworkAdapter 2;NetworkAdapter 2 Manufacturer;NetworkAdapter 2 Model;NetworkAdapter 2 Serial Number;SoundCard 1;SoundCard 1 Manufacturer;SoundCard 1 Model;SoundCard 1 Serial Number;SoundCard 2;SoundCard 2 Manufacturer;SoundCard 2 Model;SoundCard 2 Serial Number;Device Rate;Device Range;Processor Rate;Processor Range;RAM Rate;RAM Range;Data Storage Rate;Data Storage Range;Price;Benchmark RamSysbench (points) -O48N2;;http://localhost/devices/O48N2;;named;O48N2;FooOrg;;;;;;;laptop-asustek_computer_inc-1001pxd-b8oaas048285-14:da:e9:42:f6:7b;Laptop;Netbook;b8oaas048285;1001pxd;asustek computer inc.;Fri Nov 26 14:29:39 2021;Workbench 11.0a2;2021-11-26 14:29:39.966467+01:00;;;;intel atom cpu n455 @ 2.66ghz;1024;238475;Processor 6: model intel atom cpu n455 @ 2.66ghz, S/N None;intel corp.;intel atom cpu n455 @ 2.66ghz;;1;2.667;6666.24;164.0803;;;;;;;;;RamModule 10: model None, S/N None;;;;1024;667;;;;;;;;;;;;;;;;;;;HardDrive 11: model hts54322, S/N e2024242cv86mm;hitachi;hts54322;e2024242cv86mm;238475;harddrive-hitachi-hts54322-e2024242cv86mm;e2024242cv86mm;238475;Workbench 11.0a2;Success;;EraseBasic;Shred;1:16:49;2021-11-26 14:29:39.927141+01:00;✓ – StepRandom 1:16:49;2018-07-03 11:15:22.257059+02:00;2018-07-03 12:32:11.843190+02:00;66.2;21.8;Workbench 11.0a2;Short;Failure;;;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Motherboard 12: model 1001pxd, S/N eee0123456720;asustek computer inc.;1001pxd;eee0123456720;;;;;GraphicCard 7: model atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller, S/N None;intel corporation;atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller;;256;;;;;;NetworkAdapter 4: model ar9285 wireless network adapter, S/N 74:2f:68:8b:fd:c9;qualcomm atheros;ar9285 wireless network adapter;74:2f:68:8b:fd:c9;NetworkAdapter 5: model ar8152 v2.0 fast ethernet, S/N 14:da:e9:42:f6:7b;qualcomm atheros;ar8152 v2.0 fast ethernet;14:da:e9:42:f6:7b;SoundCard 8: model nm10/ich7 family high definition audio controller, S/N None;intel corporation;nm10/ich7 family high definition audio controller;;SoundCard 9: model usb 2.0 uvc vga webcam, S/N 0x0001;azurewave;usb 2.0 uvc vga webcam;0x0001;1.75;LOW;1.55;LOW;1.53;LOW;3.76;HIGH;52.50 €;15.7188 -J2MA2;;http://localhost/devices/J2MA2;;named;J2MA2;FooOrg;;;;;;;laptop-asustek_computer_inc-1001pxd-b8oaas048287-14:da:e9:42:f6:7c;Laptop;Netbook;b8oaas048287;1001pxd;asustek computer inc.;Fri Nov 26 14:29:40 2021;Workbench 11.0b11;2021-11-26 14:29:40.289858+01:00;;;;intel atom cpu n455 @ 1.66ghz;2048;558558;Processor 17: model intel atom cpu n455 @ 1.66ghz, S/N None;intel corp.;intel atom cpu n455 @ 1.66ghz;;1;1.667;6666.24;164.0803;;;;;;;;;RamModule 21: model None, S/N None;;;;1024;667;RamModule 22: model 48594d503131325336344350362d53362020, S/N 4f43487b;hynix semiconductor;48594d503131325336344350362d53362020;4f43487b;1024;667;;;;;;;;;;;;;HardDrive 23: model hts54322, S/N e2024242cv86hj;hitachi;hts54322;e2024242cv86hj;238475;harddrive-hitachi-hts54322-e2024242cv86hj;e2024242cv86hj;238475;Workbench 11.0b11;Success;;EraseBasic;Shred;1:16:49;2021-11-26 14:29:40.244699+01:00;✓ – StepRandom 1:16:49;2018-07-03 11:15:22.257059+02:00;2018-07-03 12:32:11.843190+02:00;66.2;21.8;Workbench 11.0b11;Extended;Failure;;;0;DataStorage 24: model wdc wd1600bevt-2, S/N wd-wx11a80w7430;western digital;wdc wd1600bevt-2;wd-wx11a80w7430;160041;datastorage-western_digital-wdc_wd1600bevt-2-wd-wx11a80w7430;wd-wx11a80w7430;160041;Workbench 11.0b11;Failure;;EraseBasic;Shred;0:45:36;2021-11-26 14:29:40.246908+01:00;✓ – StepRandom 0:45:36;2019-10-23 09:49:54.410830+02:00;2019-10-23 10:35:31.400587+02:00;41.6;17.3;Workbench 11.0b11;Short;Success;5293;195 days, 12:00:00;4692;SolidStateDrive 25: model wdc wd1600bevt-2, S/N wd-wx11a80w7430;western digital;wdc wd1600bevt-2;wd-wx11a80w7430;160042;solidstatedrive-western_digital-wdc_wd1600bevt-2-wd-wx11a80w7430;wd-wx11a80w7430;160042;Workbench 11.0b11;Success;;EraseSectors;Badblocks;1:46:03;2021-11-26 14:29:40.250841+01:00;✓ – StepRandom 0:46:03,✓ – StepZero 1:00:00;2019-08-19 18:48:19.690458+02:00,2019-08-19 19:34:22.690458+02:00;2019-08-19 19:34:22.930562+02:00,2019-08-19 20:34:22.930562+02:00;41.1;17.1;Workbench 11.0b11;Short;Success;5231;194 days, 17:00:00;4673;;;;;;;;;;;;;;;;;;;;;;;;;;;Motherboard 26: model 1001pxd, S/N eee0123456789;asustek computer inc.;1001pxd;eee0123456789;;"auo ""auo""";auo lcd monitor;;GraphicCard 18: model atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller, S/N None;intel corporation;atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller;;256;;;;;;NetworkAdapter 15: model ar9285 wireless network adapter, S/N 74:2f:68:8b:fd:c8;qualcomm atheros;ar9285 wireless network adapter;74:2f:68:8b:fd:c8;NetworkAdapter 16: model ar8152 v2.0 fast ethernet, S/N 14:da:e9:42:f6:7c;qualcomm atheros;ar8152 v2.0 fast ethernet;14:da:e9:42:f6:7c;SoundCard 19: model nm10/ich7 family high definition audio controller, S/N None;intel corporation;nm10/ich7 family high definition audio controller;;SoundCard 20: model usb 2.0 uvc vga webcam, S/N 0x0001;azurewave;usb 2.0 uvc vga webcam;0x0001;1.72;LOW;1.31;LOW;1.99;LOW;3.97;HIGH;51.60 €;15.7188 +O48N2;;http://localhost/devices/O48N2;;named;O48N2;FooOrg;;;;;;;laptop-asustek_computer_inc-1001pxd-b8oaas048285-14:da:e9:42:f6:7b;Laptop;Netbook;b8oaas048285;1001pxd;asustek computer inc.;Tue Mar 29 18:07:38 2022;Workbench 11.0a2;2022-03-29 18:07:38.213834+02:00;;;;intel atom cpu n455 @ 2.66ghz;1024;238475;Processor 6: model intel atom cpu n455 @ 2.66ghz, S/N None;intel corp.;intel atom cpu n455 @ 2.66ghz;;1;2.667;6666.24;164.0803;;;;;;;;;RamModule 10: model None, S/N None;;;;1024;667;;;;;;;;;;;;;;;;;;;HardDrive 11: model hts54322, S/N e2024242cv86mm;hitachi;hts54322;e2024242cv86mm;238475;harddrive-hitachi-hts54322-e2024242cv86mm;e2024242cv86mm;238475;Workbench 11.0a2;Success;;EraseBasic;Shred;1:16:49;2022-03-29 18:07:38.175413+02:00;✓ – StepRandom 1:16:49;2018-07-03 11:15:22.257059+02:00;2018-07-03 12:32:11.843190+02:00;66.2;21.8;Workbench 11.0a2;Short;Failure;;;0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Motherboard 12: model 1001pxd, S/N eee0123456720;asustek computer inc.;1001pxd;eee0123456720;;;;;GraphicCard 7: model atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller, S/N None;intel corporation;atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller;;256;;;;;;NetworkAdapter 4: model ar9285 wireless network adapter, S/N 74:2f:68:8b:fd:c9;qualcomm atheros;ar9285 wireless network adapter;74:2f:68:8b:fd:c9;NetworkAdapter 5: model ar8152 v2.0 fast ethernet, S/N 14:da:e9:42:f6:7b;qualcomm atheros;ar8152 v2.0 fast ethernet;14:da:e9:42:f6:7b;SoundCard 8: model nm10/ich7 family high definition audio controller, S/N None;intel corporation;nm10/ich7 family high definition audio controller;;SoundCard 9: model usb 2.0 uvc vga webcam, S/N 0x0001;azurewave;usb 2.0 uvc vga webcam;0x0001;;;;;;;;;;15.7188 +J2MA2;;http://localhost/devices/J2MA2;;named;J2MA2;FooOrg;;;;;;;laptop-asustek_computer_inc-1001pxd-b8oaas048287-14:da:e9:42:f6:7c;Laptop;Netbook;b8oaas048287;1001pxd;asustek computer inc.;Tue Mar 29 18:07:38 2022;Workbench 11.0b11;2022-03-29 18:07:38.572111+02:00;;;;intel atom cpu n455 @ 1.66ghz;2048;558558;Processor 17: model intel atom cpu n455 @ 1.66ghz, S/N None;intel corp.;intel atom cpu n455 @ 1.66ghz;;1;1.667;6666.24;164.0803;;;;;;;;;RamModule 21: model None, S/N None;;;;1024;667;RamModule 22: model 48594d503131325336344350362d53362020, S/N 4f43487b;hynix semiconductor;48594d503131325336344350362d53362020;4f43487b;1024;667;;;;;;;;;;;;;HardDrive 23: model hts54322, S/N e2024242cv86hj;hitachi;hts54322;e2024242cv86hj;238475;harddrive-hitachi-hts54322-e2024242cv86hj;e2024242cv86hj;238475;Workbench 11.0b11;Success;;EraseBasic;Shred;1:16:49;2022-03-29 18:07:38.522879+02:00;✓ – StepRandom 1:16:49;2018-07-03 11:15:22.257059+02:00;2018-07-03 12:32:11.843190+02:00;66.2;21.8;Workbench 11.0b11;Extended;Failure;;;0;DataStorage 24: model wdc wd1600bevt-2, S/N wd-wx11a80w7430;western digital;wdc wd1600bevt-2;wd-wx11a80w7430;160041;datastorage-western_digital-wdc_wd1600bevt-2-wd-wx11a80w7430;wd-wx11a80w7430;160041;Workbench 11.0b11;Failure;;EraseBasic;Shred;0:45:36;2022-03-29 18:07:38.525693+02:00;✓ – StepRandom 0:45:36;2019-10-23 09:49:54.410830+02:00;2019-10-23 10:35:31.400587+02:00;41.6;17.3;Workbench 11.0b11;Short;Success;5293;195 days, 12:00:00;4692;SolidStateDrive 25: model wdc wd1600bevt-2, S/N wd-wx11a80w7430;western digital;wdc wd1600bevt-2;wd-wx11a80w7430;160042;solidstatedrive-western_digital-wdc_wd1600bevt-2-wd-wx11a80w7430;wd-wx11a80w7430;160042;Workbench 11.0b11;Success;;EraseSectors;Badblocks;1:46:03;2022-03-29 18:07:38.530684+02:00;✓ – StepRandom 0:46:03,✓ – StepZero 1:00:00;2019-08-19 18:48:19.690458+02:00,2019-08-19 19:34:22.690458+02:00;2019-08-19 19:34:22.930562+02:00,2019-08-19 20:34:22.930562+02:00;41.1;17.1;Workbench 11.0b11;Short;Success;5231;194 days, 17:00:00;4673;;;;;;;;;;;;;;;;;;;;;;;;;;;Motherboard 26: model 1001pxd, S/N eee0123456789;asustek computer inc.;1001pxd;eee0123456789;;"auo ""auo""";auo lcd monitor;;GraphicCard 18: model atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller, S/N None;intel corporation;atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller;;256;;;;;;NetworkAdapter 15: model ar9285 wireless network adapter, S/N 74:2f:68:8b:fd:c8;qualcomm atheros;ar9285 wireless network adapter;74:2f:68:8b:fd:c8;NetworkAdapter 16: model ar8152 v2.0 fast ethernet, S/N 14:da:e9:42:f6:7c;qualcomm atheros;ar8152 v2.0 fast ethernet;14:da:e9:42:f6:7c;SoundCard 19: model nm10/ich7 family high definition audio controller, S/N None;intel corporation;nm10/ich7 family high definition audio controller;;SoundCard 20: model usb 2.0 uvc vga webcam, S/N 0x0001;azurewave;usb 2.0 uvc vga webcam;0x0001;;;;;;;;;;15.7188 diff --git a/tests/files/snapshot-error-timestamp.json b/tests/files/snapshot-error-timestamp.json new file mode 100644 index 00000000..0ce04100 --- /dev/null +++ b/tests/files/snapshot-error-timestamp.json @@ -0,0 +1,3379 @@ +{ + "data": { + "dmidecode": "# dmidecode 3.3\nGetting SMBIOS data from sysfs.\nSMBIOS 2.6 present.\n36 structures occupying 1653 bytes.\nTable at 0x000E80B0.\n\nHandle 0x0000, DMI type 0, 24 bytes\nBIOS Information\n\tVendor: Acer\n\tVersion: V3.05(DDR2)\n\tRelease Date: 08/12/2010\n\tROM Size: 2 MB\n\tCharacteristics:\n\t\tPCI is supported\n\t\tBIOS is upgradeable\n\t\tBIOS shadowing is allowed\n\t\tBoot from CD is supported\n\t\tSelectable boot is supported\n\t\tBIOS ROM is socketed\n\t\tEDD is supported\n\t\tJapanese floppy for NEC 9800 1.2 MB is supported (int 13h)\n\t\tJapanese floppy for Toshiba 1.2 MB is supported (int 13h)\n\t\t5.25\"/360 kB floppy services are supported (int 13h)\n\t\t5.25\"/1.2 MB floppy services are supported (int 13h)\n\t\t3.5\"/720 kB floppy services are supported (int 13h)\n\t\t3.5\"/2.88 MB floppy services are supported (int 13h)\n\t\t8042 keyboard services are supported (int 9h)\n\t\tCGA/mono video services are supported (int 10h)\n\t\tACPI is supported\n\t\tUSB legacy is supported\n\t\tTargeted content distribution is supported\n\tBIOS Revision: 5.220\n\nHandle 0x0001, DMI type 1, 27 bytes\nSystem Information\n\tManufacturer: Acer\n\tProduct Name: AOHAPPY\n\tVersion: V3.05(DDR2)\n\tSerial Number: LUSEA0D010038879A01601\n\tUUID: 364ee69c-9c82-9cb1-2111-88ae1da6f3d0\n\tWake-up Type: Power Switch\n\tSKU Number: NetTopSku\n\tFamily: Intel_Mobile\n\nHandle 0x0002, DMI type 2, 16 bytes\nBase Board Information\n\tManufacturer: Acer\n\tProduct Name: AOHAPPY\n\tVersion: V3.05(DDR2)\n\tSerial Number: Base Board Serial Number\n\tAsset Tag: Base Board Asset Tag\n\tFeatures:\n\t\tBoard is a hosting board\n\t\tBoard is replaceable\n\tLocation In Chassis: Base Board Chassis Location\n\tChassis Handle: 0x0003\n\tType: Motherboard\n\tContained Object Handles: 0\n\nHandle 0x0003, DMI type 3, 22 bytes\nChassis Information\n\tManufacturer: Acer\n\tType: Notebook\n\tLock: Not Present\n\tVersion: V3.05(DDR2)\n\tSerial Number: Chassis Serial Number\n\tAsset Tag: \n\tBoot-up State: Safe\n\tPower Supply State: Safe\n\tThermal State: Safe\n\tSecurity Status: None\n\tOEM Information: 0x00000000\n\tHeight: Unspecified\n\tNumber Of Power Cords: 1\n\tContained Elements: 0\n\tSKU Number: Not Specified\n\nHandle 0x0004, DMI type 9, 17 bytes\nSystem Slot Information\n\tDesignation: J7\n\tType: x1 PCI Express\n\tCurrent Usage: Available\n\tLength: Other\n\tID: 0\n\tCharacteristics:\n\t\tPME signal is supported\n\t\tHot-plug devices are supported\n\nHandle 0x0005, DMI type 11, 5 bytes\nOEM Strings\n\tString 1: EFI Software for PineTrail \n\tString 2: String2 for Original Equipment Manufacturer\n\tString 3: String3 for Original Equipment Manufacturer\n\tString 4: String4 for Original Equipment Manufacturer\n\tString 5: String5 for Original Equipment Manufacturer\n\nHandle 0x0006, DMI type 12, 5 bytes\nSystem Configuration Options\n\tOption 1: String1 for Type12 Equipment Manufacturer\n\tOption 2: String2 for Type12 Equipment Manufacturer\n\tOption 3: String3 for Type12 Equipment Manufacturer\n\tOption 4: String4 for Type12 Equipment Manufacturer\n\nHandle 0x0007, DMI type 21, 7 bytes\nBuilt-in Pointing Device\n\tType: Touch Pad\n\tInterface: PS/2\n\tButtons: 4\n\nHandle 0x0008, DMI type 32, 20 bytes\nSystem Boot Information\n\tStatus: No errors detected\n\nHandle 0x0009, DMI type 129, 5 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\t81 05 09 00 4F\n\tStrings:\n\t\tem Test 1\n\t\tOem Test 2\n\nHandle 0x000A, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J20\n\tInternal Connector Type: None\n\tExternal Reference Designator: Keyboard\n\tExternal Connector Type: PS/2\n\tPort Type: Keyboard Port\n\nHandle 0x000B, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J22\n\tInternal Connector Type: None\n\tExternal Reference Designator: Mouse\n\tExternal Connector Type: PS/2\n\tPort Type: Mouse Port\n\nHandle 0x000C, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J9\n\tInternal Connector Type: None\n\tExternal Reference Designator: SD Card Slot\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000D, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J14\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000E, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J16\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x000F, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J18\n\tInternal Connector Type: None\n\tExternal Reference Designator: USB\n\tExternal Connector Type: Access Bus (USB)\n\tPort Type: USB\n\nHandle 0x0010, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J8\n\tInternal Connector Type: None\n\tExternal Reference Designator: Network\n\tExternal Connector Type: RJ-45\n\tPort Type: Network Port\n\nHandle 0x0011, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: U11\n\tInternal Connector Type: On Board IDE\n\tExternal Reference Designator: OnBoard Primary IDE\n\tExternal Connector Type: None\n\tPort Type: Other\n\nHandle 0x0012, DMI type 8, 9 bytes\nPort Connector Information\n\tInternal Reference Designator: J5\n\tInternal Connector Type: None\n\tExternal Reference Designator: CRT\n\tExternal Connector Type: DB-15 female\n\tPort Type: Video Port\n\nHandle 0x0013, DMI type 40, 18 bytes\nAdditional Information 1\n\tReferenced Handle: 0x0004\n\tReferenced Offset: 0x05\n\tString: PCIExpressx16\n\tValue: 0xaa\nAdditional Information 2\n\tReferenced Handle: 0x0000\n\tReferenced Offset: 0x05\n\tString: Compiler Version: VC 9.0\n\tValue: 0x05dc\n\nHandle 0x0014, DMI type 41, 11 bytes\nOnboard Device\n\tReference Designation: 82567LM Gigabit Network Connection\n\tType: Ethernet\n\tStatus: Enabled\n\tType Instance: 1\n\tBus Address: 0000:00:00.1\n\nHandle 0x0015, DMI type 16, 15 bytes\nPhysical Memory Array\n\tLocation: System Board Or Motherboard\n\tUse: System Memory\n\tError Correction Type: None\n\tMaximum Capacity: 4 GB\n\tError Information Handle: No Error\n\tNumber Of Devices: 2\n\nHandle 0x0016, DMI type 17, 28 bytes\nMemory Device\n\tArray Handle: 0x0015\n\tError Information Handle: 0x0017\n\tTotal Width: 64 bits\n\tData Width: 64 bits\n\tSize: 1 GB\n\tForm Factor: SODIMM\n\tSet: None\n\tLocator: DIMM0\n\tBank Locator: BANK 0\n\tType: DDR2\n\tType Detail: Synchronous\n\tSpeed: 667 MT/s\n\tManufacturer: AD00000000000000\n\tSerial Number: 4F43487B\n\tAsset Tag: Unknown\n\tPart Number: 48594D503131325336344350362D53362020\n\tRank: Unknown\n\nHandle 0x0017, DMI type 18, 23 bytes\n32-bit Memory Error Information\n\tType: OK\n\tGranularity: Unknown\n\tOperation: Unknown\n\tVendor Syndrome: Unknown\n\tMemory Array Address: Unknown\n\tDevice Address: Unknown\n\tResolution: Unknown\n\nHandle 0x0018, DMI type 6, 12 bytes\nMemory Module Information\n\tSocket Designation: DIMM0\n\tBank Connections: None\n\tCurrent Speed: 1 ns\n\tType: Unknown DIMM\n\tInstalled Size: 1024 MB (Single-bank Connection)\n\tEnabled Size: 1024 MB (Single-bank Connection)\n\tError Status: OK\n\nHandle 0x0019, DMI type 20, 19 bytes\nMemory Device Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0003FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Device Handle: 0x0016\n\tMemory Array Mapped Address Handle: 0x001B\n\tPartition Row Position: 1\n\nHandle 0x001A, DMI type 18, 23 bytes\n32-bit Memory Error Information\n\tType: OK\n\tGranularity: Unknown\n\tOperation: Unknown\n\tVendor Syndrome: Unknown\n\tMemory Array Address: Unknown\n\tDevice Address: Unknown\n\tResolution: Unknown\n\nHandle 0x001B, DMI type 19, 15 bytes\nMemory Array Mapped Address\n\tStarting Address: 0x00000000000\n\tEnding Address: 0x0003FFFFFFF\n\tRange Size: 1 GB\n\tPhysical Array Handle: 0x0015\n\tPartition Width: 0\n\nHandle 0x001C, DMI type 5, 20 bytes\nMemory Controller Information\n\tError Detecting Method: None\n\tError Correcting Capabilities:\n\t\tUnknown\n\t\tNone\n\tSupported Interleave: One-way Interleave\n\tCurrent Interleave: One-way Interleave\n\tMaximum Memory Module Size: 4096 MB\n\tMaximum Total Memory Size: 8192 MB\n\tSupported Speeds:\n\t\tOther\n\tSupported Memory Types:\n\t\tOther\n\tMemory Module Voltage: Unknown\n\tAssociated Memory Slots: 2\n\t\t0x0018\n\t\t0x0018\n\tEnabled Error Correcting Capabilities:\n\t\tNone\n\nHandle 0x001D, DMI type 4, 42 bytes\nProcessor Information\n\tSocket Designation: CPU\n\tType: Central Processor\n\tFamily: Pentium M\n\tManufacturer: Intel(R) Corporation\n\tID: CA 06 01 00 FF FB E9 BF\n\tSignature: Type 0, Family 6, Model 28, Stepping 10\n\tFlags:\n\t\tFPU (Floating-point unit on-chip)\n\t\tVME (Virtual mode extension)\n\t\tDE (Debugging extension)\n\t\tPSE (Page size extension)\n\t\tTSC (Time stamp counter)\n\t\tMSR (Model specific registers)\n\t\tPAE (Physical address extension)\n\t\tMCE (Machine check exception)\n\t\tCX8 (CMPXCHG8 instruction supported)\n\t\tAPIC (On-chip APIC hardware supported)\n\t\tSEP (Fast system call)\n\t\tMTRR (Memory type range registers)\n\t\tPGE (Page global enable)\n\t\tMCA (Machine check architecture)\n\t\tCMOV (Conditional move instruction supported)\n\t\tPAT (Page attribute table)\n\t\tCLFSH (CLFLUSH instruction supported)\n\t\tDS (Debug store)\n\t\tACPI (ACPI supported)\n\t\tMMX (MMX technology supported)\n\t\tFXSR (FXSAVE and FXSTOR instructions supported)\n\t\tSSE (Streaming SIMD extensions)\n\t\tSSE2 (Streaming SIMD extensions 2)\n\t\tSS (Self-snoop)\n\t\tHTT (Multi-threading)\n\t\tTM (Thermal monitor supported)\n\t\tPBE (Pending break enabled)\n\tVersion: Intel(R) Atom(TM) CPU N450 @ 1.66GHz\n\tVoltage: 1.6 V\n\tExternal Clock: 667 MHz\n\tMax Speed: 1666 MHz\n\tCurrent Speed: 1666 MHz\n\tStatus: Populated, Enabled\n\tUpgrade: Socket 478\n\tL1 Cache Handle: 0x001F\n\tL2 Cache Handle: 0x001E\n\tL3 Cache Handle: Not Provided\n\tSerial Number: Not Specified\n\tAsset Tag: FFFF\n\tPart Number: Not Specified\n\tCore Count: 1\n\tCore Enabled: 1\n\tThread Count: 2\n\tCharacteristics:\n\t\t64-bit capable\n\nHandle 0x001E, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: Unknown\n\tConfiguration: Enabled, Not Socketed, Level 2\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 512 kB\n\tMaximum Size: 512 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Unified\n\tAssociativity: 8-way Set-associative\n\nHandle 0x001F, DMI type 7, 19 bytes\nCache Information\n\tSocket Designation: Unknown\n\tConfiguration: Enabled, Not Socketed, Level 1\n\tOperational Mode: Write Back\n\tLocation: Internal\n\tInstalled Size: 32 kB\n\tMaximum Size: 32 kB\n\tSupported SRAM Types:\n\t\tSynchronous\n\tInstalled SRAM Type: Synchronous\n\tSpeed: Unknown\n\tError Correction Type: Single-bit ECC\n\tSystem Type: Instruction\n\tAssociativity: 8-way Set-associative\n\nHandle 0x0020, DMI type 170, 62 bytes\nAcer Hotkey Function\n\tFunction bitmap for Communication Button: 0x0001\n\t\tWiFi: Yes\n\t\t3G: No\n\t\tWiMAX: No\n\t\tBluetooth: No\n\tFunction bitmap for Application Button: 0x0008\n\tFunction bitmap for Media Button: 0x0007\n\tFunction bitmap for Display Button: 0x000c\n\tFunction bitmap for Others Button: 0x0002\n\tCommunication Function Key Number: 3\n\nHandle 0x0021, DMI type 172, 6 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tAC 06 21 00 01 00\n\nHandle 0x0022, DMI type 171, 19 bytes\nOEM-specific Type\n\tHeader and Data:\n\t\tAB 13 22 00 02 69 19 60 20 05 86 80 D8 27 07 86\n\t\t80 83 00\n\nHandle 0x0023, DMI type 127, 4 bytes\nEnd Of Table\n\n", + "hwinfo": "01: None 00.0: 10105 BIOS\n [Created at bios.186]\n Unique ID: rdCR.lZF+r4EgHp4\n Hardware Class: bios\n BIOS Keyboard LED Status:\n Scroll Lock: off\n Num Lock: off\n Caps Lock: off\n Serial Port 0: 0x3f8\n Base Memory: 639 kB\n PnP BIOS: SST2400\n BIOS: extended read supported\n SMBIOS Version: 2.6\n BIOS Info: #0\n Vendor: \"Acer\"\n Version: \"V3.05(DDR2)\"\n Date: \"08/12/2010\"\n Start Address: 0x00000\n ROM Size: 2048 kB\n Features: 0x0403000000004bfb9880\n PCI supported\n BIOS flashable\n BIOS shadowing allowed\n CD boot supported\n Selectable boot supported\n BIOS ROM socketed\n EDD spec supported\n 1.2MB NEC 9800 Japanese Floppy supported\n 1.2MB Toshiba Japanese Floppy supported\n 360kB Floppy supported\n 1.2MB Floppy supported\n 720kB Floppy supported\n 2.88MB Floppy supported\n 8042 Keyboard Services supported\n CGA/Mono Video supported\n ACPI supported\n USB Legacy supported\n System Info: #1\n Manufacturer: \"Acer\"\n Product: \"AOHAPPY\"\n Version: \"V3.05(DDR2)\"\n Serial: \"LUSEA0D010038879A01601\"\n UUID: 364ee69c-9c82-9cb1-2111-88ae1da6f3d0\n Wake-up: 0x06 (Power Switch)\n Board Info: #2\n Manufacturer: \"Acer\"\n Product: \"AOHAPPY\"\n Version: \"V3.05(DDR2)\"\n Serial: \"Base Board Serial Number\"\n Asset Tag: \"Base Board Asset Tag\"\n Type: 0x0a (Motherboard)\n Features: 0x09\n Hosting Board\n Replaceable\n Location: \"Base Board Chassis Location\"\n Chassis: #3\n Chassis Info: #3\n Manufacturer: \"Acer\"\n Version: \"V3.05(DDR2)\"\n Serial: \"Chassis Serial Number\"\n Type: 0x0a (Notebook)\n Bootup State: 0x03 (Safe)\n Power Supply State: 0x03 (Safe)\n Thermal State: 0x03 (Safe)\n Security Status: 0x03 (None)\n System Slot: #4\n Designation: \"J7\"\n Type: 0xa5 (Other)\n Bus Width: 0x08 (Other)\n Status: 0x03 (Available)\n Length: 0x01 (Other)\n Slot ID: 0\n Characteristics: 0x0300 (PME#, Hot-Plug)\n OEM Strings: #5\n EFI Software for PineTrail\n String2 for Original Equipment Manufacturer\n String3 for Original Equipment Manufacturer\n String4 for Original Equipment Manufacturer\n String5 for Original Equipment Manufacturer\n System Config Options (Jumpers & Switches) #6:\n String1 for Type12 Equipment Manufacturer\n String2 for Type12 Equipment Manufacturer\n String3 for Type12 Equipment Manufacturer\n String4 for Type12 Equipment Manufacturer\n Pointing Device: #7\n Type: 0x07 (Touch Pad)\n Interface: 0x04 (PS/2)\n Buttons: 4\n Type 32 Record: #8\n Data 00: 20 14 08 00 00 00 00 00 00 00 00 00 00 00 00 00\n Data 10: 00 00 00 00\n Type 129 Record: #9\n Data 00: 81 05 09 00 4f\n String 1: \"em Test 1\"\n String 2: \"Oem Test 2\"\n Port Connector: #10\n Type: 0x0d (Keyboard Port)\n Internal Designator: \"J20\"\n External Designator: \"Keyboard\"\n External Connector: 0x0f (PS/2)\n Port Connector: #11\n Type: 0x0e (Mouse Port)\n Internal Designator: \"J22\"\n External Designator: \"Mouse\"\n External Connector: 0x0f (PS/2)\n Port Connector: #12\n Type: 0x10 (USB)\n Internal Designator: \"J9\"\n External Designator: \"SD Card Slot\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #13\n Type: 0x10 (USB)\n Internal Designator: \"J14\"\n External Designator: \"USB\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #14\n Type: 0x10 (USB)\n Internal Designator: \"J16\"\n External Designator: \"USB\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #15\n Type: 0x10 (USB)\n Internal Designator: \"J18\"\n External Designator: \"USB\"\n External Connector: 0x12 (Access Bus [USB])\n Port Connector: #16\n Type: 0x1f (Network Port)\n Internal Designator: \"J8\"\n External Designator: \"Network\"\n External Connector: 0x0b (RJ-45)\n Port Connector: #17\n Type: 0xff (Other)\n Internal Designator: \"U11\"\n Internal Connector: 0x16 (On Board IDE)\n External Designator: \"OnBoard Primary IDE\"\n Port Connector: #18\n Type: 0x1c (Video Port)\n Internal Designator: \"J5\"\n External Designator: \"CRT\"\n External Connector: 0x07 (DB-15 pin female)\n Type 40 Record: #19\n Data 00: 28 12 13 00 02 06 04 00 05 01 aa 07 00 00 05 02\n Data 10: dc 05\n String 1: \"PCIExpressx16\"\n String 2: \"Compiler Version: VC 9.0\"\n Type 41 Record: #20\n Data 00: 29 0b 14 00 01 85 01 00 00 00 01\n String 1: \"82567LM Gigabit Network Connection\"\n Physical Memory Array: #21\n Use: 0x03 (System memory)\n Location: 0x03 (Motherboard)\n Slots: 2\n Max. Size: 4 GB\n ECC: 0x03 (None)\n Error Info: No Error\n Memory Device: #22\n Location: \"DIMM0\"\n Bank: \"BANK 0\"\n Manufacturer: \"AD00000000000000\"\n Serial: \"4F43487B\"\n Asset Tag: \"Unknown\"\n Part Number: \"48594D503131325336344350362D53362020\"\n Memory Array: #21\n Error Info: #23\n Form Factor: 0x0d (SODIMM)\n Type: 0x13 (Other)\n Type Detail: 0x0080 (Synchronous)\n Data Width: 64 bits\n Size: 1 GB\n Speed: 667 MHz\n 32bit-Memory Error Info: #23\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Type 6 Record: #24\n Data 00: 06 0c 18 00 01 ff 01 02 01 0a 0a 00\n String 1: \"DIMM0\"\n Memory Device Mapping: #25\n Memory Device: #22\n Array Mapping: #27\n Row: 1\n Interleave Pos: 0\n Interleaved Depth: 0\n Start Address: 0x00000000\n End Address: 0x40000000\n 32bit-Memory Error Info: #26\n Type: 0x03 (OK)\n Granularity: 0x02 (Unknown)\n Operation: 0x02 (Unknown)\n Memory Array Mapping: #27\n Memory Array: #21\n Partition Width: 0\n Start Address: 0x00000000\n End Address: 0x40000000\n Type 5 Record: #28\n Data 00: 05 14 1c 00 03 06 03 03 0c 01 00 01 00 00 02 18\n Data 10: 00 18 00 04\n Processor Info: #29\n Socket: \"CPU\"\n Socket Type: 0x0f (Socket 478)\n Socket Status: Populated\n Type: 0x03 (CPU)\n Family: 0xb9 (Other)\n Manufacturer: \"Intel(R) Corporation\"\n Version: \"Intel(R) Atom(TM) CPU N450 @ 1.66GHz\"\n Asset Tag: \"FFFF\"\n Processor ID: 0xbfe9fbff000106ca\n Status: 0x01 (Enabled)\n Voltage: 1.6 V\n External Clock: 667 MHz\n Max. Speed: 1666 MHz\n Current Speed: 1666 MHz\n L1 Cache: #31\n L2 Cache: #30\n Cache Info: #30\n Designation: \"Unknown\"\n Level: L2\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x05 (Unified)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 512 kB\n Current Size: 512 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Cache Info: #31\n Designation: \"Unknown\"\n Level: L1\n State: Enabled\n Mode: 0x01 (Write Back)\n Location: 0x00 (Internal, Not Socketed)\n ECC: 0x05 (Single-bit)\n Type: 0x03 (Instruction)\n Associativity: 0x07 (8-way Set-Associative)\n Max. Size: 32 kB\n Current Size: 32 kB\n Supported SRAM Types: 0x0020 (Synchronous)\n Current SRAM Type: 0x0020 (Synchronous)\n Type 170 Record: #32\n Data 00: aa 3e 20 00 01 00 08 00 07 00 0c 00 02 00 03 02\n Data 10: 41 08 23 02 08 00 41 02 04 00 49 02 01 00 4a 02\n Data 20: 02 00 61 02 08 00 62 02 04 00 63 02 01 00 64 02\n Data 30: 02 00 81 02 04 00 85 02 02 00 82 02 08 00\n Type 172 Record: #33\n Data 00: ac 06 21 00 01 00\n Type 171 Record: #34\n Data 00: ab 13 22 00 02 69 19 60 20 05 86 80 d8 27 07 86\n Data 10: 80 83 00\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n02: None 00.0: 10107 System\n [Created at sys.64]\n Unique ID: rdCR.n_7QNeEnh23\n Hardware Class: system\n Model: \"System\"\n Formfactor: \"laptop\"\n Driver Info #0:\n Driver Status: thermal,fan are not active\n Driver Activation Cmd: \"modprobe thermal; modprobe fan\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n03: None 00.0: 10104 FPU\n [Created at misc.191]\n Unique ID: rdCR.EMpH5pjcahD\n Hardware Class: unknown\n Model: \"FPU\"\n I/O Ports: 0xf0-0xff (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n04: None 00.0: 0801 DMA controller (8237)\n [Created at misc.205]\n Unique ID: rdCR.f5u1ucRm+H9\n Hardware Class: unknown\n Model: \"DMA controller\"\n I/O Ports: 0x00-0xcf7 (rw)\n I/O Ports: 0xc0-0xdf (rw)\n I/O Ports: 0x80-0x8f (rw)\n DMA: 4\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n05: None 00.0: 0800 PIC (8259)\n [Created at misc.218]\n Unique ID: rdCR.8uRK7LxiIA2\n Hardware Class: unknown\n Model: \"PIC\"\n I/O Ports: 0x20-0x21 (rw)\n I/O Ports: 0xa0-0xa1 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n06: None 00.0: 0900 Keyboard controller\n [Created at misc.250]\n Unique ID: rdCR.9N+EecqykME\n Hardware Class: unknown\n Model: \"Keyboard controller\"\n I/O Port: 0x60 (rw)\n I/O Port: 0x64 (rw)\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n07: None 00.0: 10400 PS/2 Controller\n [Created at misc.303]\n Unique ID: rdCR.DziBbWO85o5\n Hardware Class: unknown\n Model: \"PS/2 Controller\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n10: None 00.0: 10102 Main Memory\n [Created at memory.74]\n Unique ID: rdCR.CxwsZFjVASF\n Hardware Class: memory\n Model: \"Main Memory\"\n Memory Range: 0x00000000-0x3c54efff (rw)\n Memory Size: 960 MB\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n11: PCI 1f.2: 0106 SATA controller (AHCI 1.0)\n [Created at pci.386]\n Unique ID: w7Y8.D2p8kvfIMi4\n SysFS ID: /devices/pci0000:00/0000:00:1f.2\n SysFS BusID: 0000:00:1f.2\n Hardware Class: storage\n Model: \"Intel NM10/ICH7 Family SATA Controller [AHCI mode]\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27c1 \"NM10/ICH7 Family SATA Controller [AHCI mode]\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"ahci\"\n Driver Modules: \"ahci\"\n I/O Ports: 0x60b8-0x60bf (rw)\n I/O Ports: 0x60cc-0x60cf (rw)\n I/O Ports: 0x60b0-0x60b7 (rw)\n I/O Ports: 0x60c8-0x60cb (rw)\n I/O Ports: 0x60a0-0x60af (rw)\n Memory Range: 0x58204000-0x582043ff (rw,non-prefetchable)\n IRQ: 26 (447 events)\n Module Alias: \"pci:v00008086d000027C1sv00001025sd00000349bc01sc06i01\"\n Driver Info #0:\n Driver Status: ahci is active\n Driver Activation Cmd: \"modprobe ahci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n12: PCI 1c.0: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: z8Q3._3VzjoUPJG5\n SysFS ID: /devices/pci0000:00/0000:00:1c.0\n SysFS BusID: 0000:00:1c.0\n Hardware Class: bridge\n Model: \"Intel NM10/ICH7 Family PCI Express Port 1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27d0 \"NM10/ICH7 Family PCI Express Port 1\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 24 (no events)\n Module Alias: \"pci:v00008086d000027D0sv00001025sd00000349bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n13: PCI 1d.3: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: eEx1._hf+eJmJdO5\n SysFS ID: /devices/pci0000:00/0000:00:1d.3\n SysFS BusID: 0000:00:1d.3\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #4\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27cb \"NM10/ICH7 Family USB UHCI Controller #4\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6020-0x603f (rw)\n IRQ: 22 (5486 events)\n Module Alias: \"pci:v00008086d000027CBsv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n14: PCI 1f.0: 0601 ISA bridge\n [Created at pci.386]\n Unique ID: BUZT.79IsqZc8gE8\n SysFS ID: /devices/pci0000:00/0000:00:1f.0\n SysFS BusID: 0000:00:1f.0\n Hardware Class: bridge\n Model: \"Intel NM10 Family LPC Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27bc \"NM10 Family LPC Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Module Alias: \"pci:v00008086d000027BCsv00001025sd00000349bc06sc01i00\"\n Driver Info #0:\n Driver Status: lpc_ich is active\n Driver Activation Cmd: \"modprobe lpc_ich\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n15: PCI 200.0: 0280 Network controller\n [Created at pci.386]\n Unique ID: B35A.b2hGE10yl_2\n Parent ID: qTvu.0vNThxjpM16\n SysFS ID: /devices/pci0000:00/0000:00:1c.1/0000:02:00.0\n SysFS BusID: 0000:02:00.0\n Hardware Class: network\n Model: \"Intel Centrino Wireless-N 1000 BGN\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x0083 \"Centrino Wireless-N 1000 [Condor Peak]\"\n SubVendor: pci 0x8086 \"Intel Corporation\"\n SubDevice: pci 0x1305 \"Centrino Wireless-N 1000 BGN\"\n Memory Range: 0x56000000-0x56001fff (rw,non-prefetchable)\n IRQ: 17 (3 events)\n Module Alias: \"pci:v00008086d00000083sv00008086sd00001305bc02sc80i00\"\n Driver Info #0:\n Driver Status: iwlwifi is active\n Driver Activation Cmd: \"modprobe iwlwifi\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #23 (PCI bridge)\n\n16: PCI 1d.1: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: vayM.ysmVhAXvZd4\n SysFS ID: /devices/pci0000:00/0000:00:1d.1\n SysFS BusID: 0000:00:1d.1\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #2\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27c9 \"NM10/ICH7 Family USB UHCI Controller #2\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6060-0x607f (rw)\n IRQ: 20 (no events)\n Module Alias: \"pci:v00008086d000027C9sv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n17: PCI 100.0: 0200 Ethernet controller\n [Created at pci.386]\n Unique ID: rBUF.AfcciKaOfeA\n Parent ID: z8Q3._3VzjoUPJG5\n SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0\n SysFS BusID: 0000:01:00.0\n Hardware Class: network\n Model: \"Qualcomm Atheros AR8152 v1.1 Fast Ethernet\"\n Vendor: pci 0x1969 \"Qualcomm Atheros\"\n Device: pci 0x2060 \"AR8152 v1.1 Fast Ethernet\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0xc1\n Driver: \"atl1c\"\n Driver Modules: \"atl1c\"\n Device File: eth0\n Memory Range: 0x57000000-0x5703ffff (rw,non-prefetchable)\n I/O Ports: 0x5000-0x5fff (rw)\n IRQ: 28 (27 events)\n HW Address: 88:ae:1d:a6:f3:d0\n Permanent HW Address: 88:ae:1d:a6:f3:d0\n Link detected: yes\n Module Alias: \"pci:v00001969d00002060sv00001025sd00000349bc02sc00i00\"\n Driver Info #0:\n Driver Status: atl1c is active\n Driver Activation Cmd: \"modprobe atl1c\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #12 (PCI bridge)\n\n18: PCI 02.1: 0380 Display controller\n [Created at pci.386]\n Unique ID: ruGf.O1P126g_eh2\n SysFS ID: /devices/pci0000:00/0000:00:02.1\n SysFS BusID: 0000:00:02.1\n Hardware Class: graphics card\n Model: \"Intel Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0xa012 \"Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Memory Range: 0x58100000-0x5817ffff (rw,non-prefetchable)\n Module Alias: \"pci:v00008086d0000A012sv00001025sd00000349bc03sc80i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n19: PCI 1b.0: 0403 Audio device\n [Created at pci.386]\n Unique ID: u1Nb.ZCVQnTUjxO7\n SysFS ID: /devices/pci0000:00/0000:00:1b.0\n SysFS BusID: 0000:00:1b.0\n Hardware Class: sound\n Model: \"Intel NM10/ICH7 Family High Definition Audio Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27d8 \"NM10/ICH7 Family High Definition Audio Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"snd_hda_intel\"\n Driver Modules: \"snd_hda_intel\"\n Memory Range: 0x58200000-0x58203fff (rw,non-prefetchable)\n IRQ: 27 (319 events)\n Module Alias: \"pci:v00008086d000027D8sv00001025sd00000349bc04sc03i00\"\n Driver Info #0:\n Driver Status: snd_hda_intel is active\n Driver Activation Cmd: \"modprobe snd_hda_intel\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n20: PCI 1e.0: 0604 PCI bridge (Subtractive decode)\n [Created at pci.386]\n Unique ID: 6NW+.SZEhIj3ISCE\n SysFS ID: /devices/pci0000:00/0000:00:1e.0\n SysFS BusID: 0000:00:1e.0\n Hardware Class: bridge\n Model: \"Intel 82801 Mobile PCI Bridge\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x2448 \"82801 Mobile PCI Bridge\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0xe2\n Module Alias: \"pci:v00008086d00002448sv00001025sd00000349bc06sc04i01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n21: PCI 1f.3: 0c05 SMBus\n [Created at pci.386]\n Unique ID: nS1_.lKifNMuDxy7\n SysFS ID: /devices/pci0000:00/0000:00:1f.3\n SysFS BusID: 0000:00:1f.3\n Hardware Class: unknown\n Model: \"Intel NM10/ICH7 Family SMBus Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27da \"NM10/ICH7 Family SMBus Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"i801_smbus\"\n Driver Modules: \"i2c_i801\"\n I/O Ports: 0x6000-0x601f (rw)\n IRQ: 17 (3 events)\n Module Alias: \"pci:v00008086d000027DAsv00001025sd00000349bc0Csc05i00\"\n Driver Info #0:\n Driver Status: i2c_i801 is active\n Driver Activation Cmd: \"modprobe i2c_i801\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n22: PCI 00.0: 0600 Host bridge\n [Created at pci.386]\n Unique ID: qLht.PdlOCWxMAH1\n SysFS ID: /devices/pci0000:00/0000:00:00.0\n SysFS BusID: 0000:00:00.0\n Hardware Class: bridge\n Model: \"Intel Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0xa010 \"Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Module Alias: \"pci:v00008086d0000A010sv00001025sd00000349bc06sc00i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n23: PCI 1c.1: 0604 PCI bridge (Normal decode)\n [Created at pci.386]\n Unique ID: qTvu.0vNThxjpM16\n SysFS ID: /devices/pci0000:00/0000:00:1c.1\n SysFS BusID: 0000:00:1c.1\n Hardware Class: bridge\n Model: \"Intel NM10/ICH7 Family PCI Express Port 2\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27d2 \"NM10/ICH7 Family PCI Express Port 2\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"pcieport\"\n IRQ: 25 (no events)\n Module Alias: \"pci:v00008086d000027D2sv00001025sd00000349bc06sc04i00\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n24: PCI 1d.2: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: mvRC.THjFAlec505\n SysFS ID: /devices/pci0000:00/0000:00:1d.2\n SysFS BusID: 0000:00:1d.2\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #3\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27ca \"NM10/ICH7 Family USB UHCI Controller #3\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6040-0x605f (rw)\n IRQ: 21 (no events)\n Module Alias: \"pci:v00008086d000027CAsv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n25: PCI 1d.0: 0c03 USB Controller (UHCI)\n [Created at pci.386]\n Unique ID: 1GTX.RSqlCcPC2F4\n SysFS ID: /devices/pci0000:00/0000:00:1d.0\n SysFS BusID: 0000:00:1d.0\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB UHCI Controller #1\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27c8 \"NM10/ICH7 Family USB UHCI Controller #1\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"uhci_hcd\"\n Driver Modules: \"uhci_hcd\"\n I/O Ports: 0x6080-0x609f (rw)\n IRQ: 18 (no events)\n Module Alias: \"pci:v00008086d000027C8sv00001025sd00000349bc0Csc03i00\"\n Driver Info #0:\n Driver Status: uhci-hcd is active\n Driver Activation Cmd: \"modprobe uhci-hcd\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n26: PCI 02.0: 0300 VGA compatible controller (VGA)\n [Created at pci.386]\n Unique ID: _Znp.ta1P8GNKN4D\n SysFS ID: /devices/pci0000:00/0000:00:02.0\n SysFS BusID: 0000:00:02.0\n Hardware Class: graphics card\n Model: \"Intel Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0xa011 \"Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Driver: \"i915\"\n Driver Modules: \"i915\"\n Memory Range: 0x58180000-0x581fffff (rw,non-prefetchable)\n I/O Ports: 0x60c0-0x60c7 (rw)\n Memory Range: 0x40000000-0x4fffffff (ro,non-prefetchable)\n Memory Range: 0x58000000-0x580fffff (rw,non-prefetchable)\n Memory Range: 0x000c0000-0x000dffff (rw,non-prefetchable,disabled)\n IRQ: 16 (12 events)\n I/O Ports: 0x3c0-0x3df (rw)\n Module Alias: \"pci:v00008086d0000A011sv00001025sd00000349bc03sc00i00\"\n Driver Info #0:\n Driver Status: i915 is active\n Driver Activation Cmd: \"modprobe i915\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n27: PCI 1d.7: 0c03 USB Controller (EHCI)\n [Created at pci.386]\n Unique ID: 5YuN.+6CxPyMngcA\n SysFS ID: /devices/pci0000:00/0000:00:1d.7\n SysFS BusID: 0000:00:1d.7\n Hardware Class: usb controller\n Model: \"Intel NM10/ICH7 Family USB2 EHCI Controller\"\n Vendor: pci 0x8086 \"Intel Corporation\"\n Device: pci 0x27cc \"NM10/ICH7 Family USB2 EHCI Controller\"\n SubVendor: pci 0x1025 \"Acer Incorporated [ALI]\"\n SubDevice: pci 0x0349 \n Revision: 0x02\n Driver: \"ehci-pci\"\n Driver Modules: \"ehci_pci\"\n Memory Range: 0x58204400-0x582047ff (rw,non-prefetchable)\n IRQ: 22 (5486 events)\n Module Alias: \"pci:v00008086d000027CCsv00001025sd00000349bc0Csc03i20\"\n Driver Info #0:\n Driver Status: ehci-hcd is active\n Driver Activation Cmd: \"modprobe ehci-hcd\"\n Driver Info #1:\n Driver Status: ehci_pci is active\n Driver Activation Cmd: \"modprobe ehci_pci\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n28: None 00.0: 10002 LCD Monitor\n [Created at monitor.125]\n Unique ID: rdCR.FRpzZ4yUQ5E\n Parent ID: _Znp.ta1P8GNKN4D\n Hardware Class: monitor\n Model: \"AUO LCD Monitor\"\n Vendor: AUO \"AUO\"\n Device: eisa 0x61d2 \n Resolution: 1024x600@60Hz\n Size: 222x125 mm\n Year of Manufacture: 2009\n Week of Manufacture: 0\n Detailed Timings #0:\n Resolution: 1024x600\n Horizontal: 1024 1072 1104 1338 (+48 +80 +314) -hsync\n Vertical: 600 602 608 620 (+2 +8 +20) -vsync\n Frequencies: 49.80 MHz, 37.22 kHz, 60.03 Hz\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #26 (VGA compatible controller)\n\n29: SCSI 400.0: 10600 Disk\n [Created at block.245]\n Unique ID: UfPf.SfDWpy4s409\n Parent ID: 5YuN.+6CxPyMngcA\n SysFS ID: /class/block/sdb\n SysFS BusID: 4:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1d.7/usb5/5-1/5-1:1.0/host4/target4:0:0/4:0:0:0\n Hardware Class: disk\n Model: \"Generic Flash Disk\"\n Vendor: usb 0x058f \"Generic\"\n Device: usb 0x6387 \"Flash Disk\"\n Revision: \"8.07\"\n Serial ID: \"87396259\"\n Driver: \"usb-storage\", \"sd\"\n Driver Modules: \"usb_storage\", \"sd_mod\"\n Device File: /dev/sdb (/dev/sg1)\n Device Files: /dev/sdb, /dev/disk/by-id/usb-Generic_Flash_Disk_87396259-0:0, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:1:1.0-scsi-0:0:0:0\n Device Number: block 8:16-8:31 (char 21:1)\n BIOS id: 0x80\n Geometry (Logical): CHS 7680/64/32\n Size: 15728640 sectors a 512 bytes\n Capacity: 7 GB (8053063680 bytes)\n Speed: 480 Mbps\n Geometry (BIOS Legacy): CHS 1023/64/32\n Module Alias: \"usb:v058Fp6387d0100dc00dsc00dp00ic08isc06ip50in00\"\n Driver Info #0:\n Driver Status: uas is active\n Driver Activation Cmd: \"modprobe uas\"\n Driver Info #1:\n Driver Status: usb_storage is active\n Driver Activation Cmd: \"modprobe usb_storage\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #27 (USB Controller)\n\n30: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: h4pj.SE1wIdpsiiC\n Parent ID: UfPf.SfDWpy4s409\n SysFS ID: /class/block/sdb/sdb1\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb1\n Device Files: /dev/sdb1, /dev/disk/by-id/usb-Generic_Flash_Disk_87396259-0:0-part1, /dev/disk/by-partuuid/466fdc5f-01, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:1:1.0-scsi-0:0:0:0-part1, /dev/disk/by-uuid/2022-04-09-10-43-11-00, /dev/disk/by-label/DEBIAN_CUSTOM\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #29 (Disk)\n\n31: None 00.0: 11300 Partition\n [Created at block.434]\n Unique ID: 8G3o.SE1wIdpsiiC\n Parent ID: UfPf.SfDWpy4s409\n SysFS ID: /class/block/sdb/sdb2\n Hardware Class: partition\n Model: \"Partition\"\n Device File: /dev/sdb2\n Device Files: /dev/sdb2, /dev/disk/by-uuid/33F4-648F, /dev/disk/by-partuuid/466fdc5f-02, /dev/disk/by-id/usb-Generic_Flash_Disk_87396259-0:0-part2, /dev/disk/by-path/pci-0000:00:1d.7-usb-0:1:1.0-scsi-0:0:0:0-part2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #29 (Disk)\n\n32: IDE 00.0: 10600 Disk\n [Created at block.245]\n Unique ID: 3OOL.UDy1GyFdcg9\n Parent ID: w7Y8.D2p8kvfIMi4\n SysFS ID: /class/block/sda\n SysFS BusID: 0:0:0:0\n SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0\n Hardware Class: disk\n Model: \"WDC WD1600BEVT-2\"\n Vendor: \"WDC\"\n Device: \"WD1600BEVT-2\"\n Revision: \"1A01\"\n Serial ID: \"WD-WX11A80W7430\"\n Driver: \"ahci\", \"sd\"\n Driver Modules: \"ahci\", \"sd_mod\"\n Device File: /dev/sda\n Device Files: /dev/sda, /dev/disk/by-path/pci-0000:00:1f.2-ata-1, /dev/disk/by-id/ata-WDC_WD1600BEVT-22A23T0_WD-WX11A80W7430, /dev/disk/by-path/pci-0000:00:1f.2-ata-1.0, /dev/disk/by-id/wwn-0x50014ee60062fb13\n Device Number: block 8:0-8:15\n BIOS id: 0x81\n Geometry (Logical): CHS 19457/255/63\n Size: 312581808 sectors a 512 bytes\n Capacity: 149 GB (160041885696 bytes)\n Geometry (BIOS EDD): CHS 310101/16/63\n Size (BIOS EDD): 312581808 sectors\n Geometry (BIOS Legacy): CHS 1023/255/63\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #11 (SATA controller)\n\n34: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: uIhY.RTX9xWW_uz4\n Parent ID: mvRC.THjFAlec505\n SysFS ID: /devices/pci0000:00/0000:00:1d.2/usb3/3-0:1.0\n SysFS BusID: 3-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.2\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #24 (USB Controller)\n\n35: USB 00.1: 0000 Unclassified device\n [Created at usb.122]\n Unique ID: FEYD.t657xhWJSc1\n Parent ID: 2XnU.9T1GDCLyFd9\n SysFS ID: /devices/pci0000:00/0000:00:1d.7/usb5/5-4/5-4:1.1\n SysFS BusID: 5-4:1.1\n Hardware Class: unknown\n Model: \"ALi Gateway Webcam\"\n Hotplug: USB\n Vendor: usb 0x0402 \"ALi Corp.\"\n Device: usb 0x9665 \"Gateway Webcam\"\n Revision: \"0.09\"\n Driver: \"uvcvideo\"\n Driver Modules: \"uvcvideo\"\n Speed: 480 Mbps\n Module Alias: \"usb:v0402p9665d0009dcEFdsc02dp01ic0Eisc02ip00in01\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #38 (Hub)\n\n36: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: zPk0.CCckIHJirFC\n Parent ID: eEx1._hf+eJmJdO5\n SysFS ID: /devices/pci0000:00/0000:00:1d.3/usb4/4-0:1.0\n SysFS BusID: 4-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.3\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #13 (USB Controller)\n\n37: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: k4bc.v+N+B0xY+P6\n Parent ID: 1GTX.RSqlCcPC2F4\n SysFS ID: /devices/pci0000:00/0000:00:1d.0/usb1/1-0:1.0\n SysFS BusID: 1-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.0\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #25 (USB Controller)\n\n38: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: 2XnU.9T1GDCLyFd9\n Parent ID: 5YuN.+6CxPyMngcA\n SysFS ID: /devices/pci0000:00/0000:00:1d.7/usb5/5-0:1.0\n SysFS BusID: 5-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 2.0 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0002 \"2.0 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.7\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 480 Mbps\n Module Alias: \"usb:v1D6Bp0002d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #27 (USB Controller)\n\n40: USB 00.0: 10a00 Hub\n [Created at usb.122]\n Unique ID: pBe4.gkSaZmjGyhD\n Parent ID: vayM.ysmVhAXvZd4\n SysFS ID: /devices/pci0000:00/0000:00:1d.1/usb2/2-0:1.0\n SysFS BusID: 2-0:1.0\n Hardware Class: hub\n Model: \"Linux Foundation 1.1 root hub\"\n Hotplug: USB\n Vendor: usb 0x1d6b \"Linux Foundation\"\n Device: usb 0x0001 \"1.1 root hub\"\n Revision: \"5.10\"\n Serial ID: \"0000:00:1d.1\"\n Driver: \"hub\"\n Driver Modules: \"usbcore\"\n Speed: 12 Mbps\n Module Alias: \"usb:v1D6Bp0001d0510dc09dsc00dp00ic09isc00ip00in00\"\n Driver Info #0:\n Driver Status: usbcore is active\n Driver Activation Cmd: \"modprobe usbcore\"\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #16 (USB Controller)\n\n41: PS/2 00.0: 10800 Keyboard\n [Created at input.226]\n Unique ID: nLyy.+49ps10DtUF\n Hardware Class: keyboard\n Model: \"AT Translated Set 2 keyboard\"\n Vendor: 0x0001 \n Device: 0x0001 \"AT Translated Set 2 keyboard\"\n Compatible to: int 0x0211 0x0001\n Device File: /dev/input/event0\n Device Files: /dev/input/event0, /dev/input/by-path/platform-i8042-serio-0-event-kbd\n Device Number: char 13:64\n Driver Info #0:\n XkbRules: xfree86\n XkbModel: pc104\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n42: PS/2 00.0: 10500 PS/2 Mouse\n [Created at input.249]\n Unique ID: AH6Q.ZHI3OT7LsxA\n Hardware Class: mouse\n Model: \"SynPS/2 Synaptics TouchPad\"\n Vendor: 0x0002 \n Device: 0x0007 \"SynPS/2 Synaptics TouchPad\"\n Compatible to: int 0x0210 0x0002\n Device File: /dev/input/mice (/dev/input/mouse0)\n Device Files: /dev/input/mice, /dev/input/mouse0, /dev/input/event6, /dev/input/by-path/platform-i8042-serio-1-event-mouse, /dev/input/by-path/platform-i8042-serio-1-mouse\n Device Number: char 13:63 (char 13:32)\n Driver Info #0:\n Buttons: 2\n Wheels: 0\n XFree86 Protocol: explorerps/2\n GPM Protocol: exps2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n43: None 00.0: 10103 CPU\n [Created at cpu.465]\n Unique ID: rdCR.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.28.10 \"Intel(R) Atom(TM) CPU N450 @ 1.66GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,lm,constant_tsc,arch_perfmon,pebs,bts,nopl,cpuid,aperfmperf,pni,dtes64,monitor,ds_cpl,est,tm2,ssse3,cx16,xtpr,pdcm,movbe,lahf_lm,dtherm\n Clock: 1661 MHz\n BogoMips: 3325.46\n Cache: 512 kb\n Units/Processor: 2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n44: None 01.0: 10103 CPU\n [Created at cpu.465]\n Unique ID: wkFv.j8NaKXDZtZ6\n Hardware Class: cpu\n Arch: X86-64\n Vendor: \"GenuineIntel\"\n Model: 6.28.10 \"Intel(R) Atom(TM) CPU N450 @ 1.66GHz\"\n Features: fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,lm,constant_tsc,arch_perfmon,pebs,bts,nopl,cpuid,aperfmperf,pni,dtes64,monitor,ds_cpl,est,tm2,ssse3,cx16,xtpr,pdcm,movbe,lahf_lm,dtherm\n Clock: 1657 MHz\n BogoMips: 3325.46\n Cache: 512 kb\n Units/Processor: 2\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n45: None 00.0: 10700 Loopback\n [Created at net.126]\n Unique ID: ZsBS.GQNx7L4uPNA\n SysFS ID: /class/net/lo\n Hardware Class: network interface\n Model: \"Loopback network interface\"\n Device File: lo\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n\n46: None 00.0: 10701 Ethernet\n [Created at net.126]\n Unique ID: usDW.ndpeucax6V1\n Parent ID: rBUF.AfcciKaOfeA\n SysFS ID: /class/net/eth0\n SysFS Device Link: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0\n Hardware Class: network interface\n Model: \"Ethernet network interface\"\n Driver: \"atl1c\"\n Driver Modules: \"atl1c\"\n Device File: eth0\n HW Address: 88:ae:1d:a6:f3:d0\n Permanent HW Address: 88:ae:1d:a6:f3:d0\n Link detected: yes\n Config Status: cfg=new, avail=yes, need=no, active=unknown\n Attached to: #17 (Ethernet controller)\n", + "lshw": { + "capabilities": { + "dmi-2.6": "DMI version 2.6", + "smbios-2.6": "SMBIOS version 2.6", + "smp": "Symmetric Multi-Processing", + "vsyscall32": "32-bit processes" + }, + "children": [ + { + "children": [ + { + "capabilities": { + "acpi": "ACPI", + "bootselect": "Selectable boot path", + "cdboot": "Booting from CD-ROM/DVD", + "edd": "Enhanced Disk Drive extensions", + "int10video": "INT10 CGA/Mono video", + "int13floppy1200": "5.25\" 1.2MB floppy", + "int13floppy2880": "3.5\" 2.88MB floppy", + "int13floppy360": "5.25\" 360KB floppy", + "int13floppy720": "3.5\" 720KB floppy", + "int13floppynec": "NEC 9800 floppy", + "int13floppytoshiba": "Toshiba floppy", + "int9keyboard": "i8042 keyboard controller", + "pci": "PCI bus", + "shadowing": "BIOS shadowing", + "socketedrom": "BIOS ROM is socketed", + "upgrade": "BIOS EEPROM can be upgraded", + "usb": "USB legacy emulation" + }, + "capacity": 2097152, + "claimed": true, + "class": "memory", + "date": "08/12/2010", + "description": "BIOS", + "id": "firmware", + "physid": "0", + "size": 1048576, + "units": "bytes", + "vendor": "Acer", + "version": "V3.05(DDR2)" + }, + { + "children": [ + { + "claimed": true, + "class": "memory", + "clock": 667000000, + "description": "SODIMM DDR2 Synchronous 667 MHz (1.5 ns)", + "handle": "DMI:0016", + "id": "bank", + "physid": "0", + "product": "48594D503131325336344350362D53362020", + "serial": "4F43487B", + "size": 1073741824, + "slot": "DIMM0", + "units": "bytes", + "vendor": "Hynix Semiconductor (Hyundai Electronics)", + "width": 64 + } + ], + "claimed": true, + "class": "memory", + "description": "System Memory", + "handle": "DMI:0015", + "id": "memory", + "physid": "15", + "size": 1073741824, + "slot": "System board or motherboard", + "units": "bytes" + }, + { + "businfo": "cpu@0", + "capabilities": { + "acpi": "thermal control (ACPI)", + "aperfmperf": true, + "apic": "on-chip advanced programmable interrupt controller (APIC)", + "arch_perfmon": true, + "bts": true, + "clflush": true, + "cmov": "conditional move instruction", + "constant_tsc": true, + "cpufreq": "CPU Frequency scaling", + "cpuid": true, + "cx16": true, + "cx8": "compare and exchange 8-byte", + "de": "debugging extensions", + "ds_cpl": true, + "dtes64": true, + "dtherm": true, + "dts": "debug trace and EMON store MSRs", + "est": true, + "fpu": "mathematical co-processor", + "fpu_exception": "FPU exceptions reporting", + "fxsr": "fast floating point save/restore", + "ht": "HyperThreading", + "lahf_lm": true, + "lm": "64bits extensions (x86-64)", + "mca": "machine check architecture", + "mce": "machine check exceptions", + "mmx": "multimedia extensions (MMX)", + "monitor": true, + "movbe": true, + "msr": "model-specific registers", + "mtrr": "memory type range registers", + "nopl": true, + "nx": "no-execute bit (NX)", + "pae": "4GB+ memory addressing (Physical Address Extension)", + "pat": "page attribute table", + "pbe": "pending break event", + "pdcm": true, + "pebs": true, + "pge": "page global enable", + "pni": true, + "pse": "page size extensions", + "sep": "fast system calls", + "ss": "self-snoop", + "sse": "streaming SIMD extensions (SSE)", + "sse2": "streaming SIMD extensions (SSE2)", + "ssse3": true, + "syscall": "fast system calls", + "tm": "thermal interrupt and status", + "tm2": true, + "tsc": "time stamp counter", + "vme": "virtual mode extensions", + "wp": true, + "x86-64": "64bits extensions (x86-64)", + "xtpr": true + }, + "capacity": 1666000000, + "children": [ + { + "capabilities": { + "internal": "Internal", + "synchronous": "Synchronous", + "unified": "Unified cache", + "write-back": "Write-back" + }, + "capacity": 524288, + "claimed": true, + "class": "memory", + "configuration": { + "level": "2" + }, + "description": "L2 cache", + "handle": "DMI:001E", + "id": "cache:0", + "physid": "1e", + "size": 524288, + "slot": "Unknown", + "units": "bytes" + }, + { + "capabilities": { + "instruction": "Instruction cache", + "internal": "Internal", + "synchronous": "Synchronous", + "write-back": "Write-back" + }, + "capacity": 32768, + "claimed": true, + "class": "memory", + "configuration": { + "level": "1" + }, + "description": "L1 cache", + "handle": "DMI:001F", + "id": "cache:1", + "physid": "1f", + "size": 32768, + "slot": "Unknown", + "units": "bytes" + } + ], + "claimed": true, + "class": "processor", + "clock": 667000000, + "configuration": { + "cores": "1", + "enabledcores": "1", + "threads": "2" + }, + "description": "CPU", + "handle": "DMI:001D", + "id": "cpu", + "physid": "1d", + "product": "Intel(R) Atom(TM) CPU N450 @ 1.66GHz", + "size": 1465839000, + "slot": "CPU", + "units": "Hz", + "vendor": "Intel Corp.", + "version": "6.28.10", + "width": 64 + }, + { + "businfo": "pci@0000:00:00.0", + "children": [ + { + "businfo": "pci@0000:00:02.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "fb": "framebuffer", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "rom": "extension ROM", + "vga_controller": true + }, + "claimed": true, + "class": "display", + "clock": 33000000, + "configuration": { + "depth": "32", + "driver": "i915", + "latency": "0", + "resolution": "1024,600" + }, + "description": "VGA compatible controller", + "handle": "PCI:0000:00:02.0", + "id": "display:0", + "logicalname": "/dev/fb0", + "physid": "2", + "product": "Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller", + "vendor": "Intel Corporation", + "version": "00", + "width": 32 + }, + { + "businfo": "pci@0000:00:02.1", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "pm": "Power Management" + }, + "class": "display", + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "description": "Display controller", + "handle": "PCI:0000:00:02.1", + "id": "display:1", + "physid": "2.1", + "product": "Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller", + "vendor": "Intel Corporation", + "version": "00", + "width": 32 + }, + { + "businfo": "pci@0000:00:1b.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "children": [ + { + "capabilities": { + "pci": "PCI" + }, + "claimed": true, + "class": "input", + "id": "input:0", + "logicalname": [ + "input11", + "/dev/input/event10" + ], + "physid": "0", + "product": "HDA Digital PCBeep" + }, + { + "claimed": true, + "class": "input", + "id": "input:1", + "logicalname": [ + "input12", + "/dev/input/event11" + ], + "physid": "1", + "product": "HDA Intel Mic" + }, + { + "claimed": true, + "class": "input", + "id": "input:2", + "logicalname": [ + "input13", + "/dev/input/event12" + ], + "physid": "2", + "product": "HDA Intel Headphone" + } + ], + "claimed": true, + "class": "multimedia", + "clock": 33000000, + "configuration": { + "driver": "snd_hda_intel", + "latency": "0" + }, + "description": "Audio device", + "handle": "PCI:0000:00:1b.0", + "id": "multimedia", + "logicalname": [ + "card0", + "/dev/snd/controlC0", + "/dev/snd/hwC0D0", + "/dev/snd/pcmC0D0c", + "/dev/snd/pcmC0D0p" + ], + "physid": "1b", + "product": "NM10/ICH7 Family High Definition Audio Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 64 + }, + { + "businfo": "pci@0000:00:1c.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "normal_decode": true, + "pci": true, + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "children": [ + { + "businfo": "pci@0000:01:00.0", + "capabilities": { + "100bt": "100Mbit/s", + "100bt-fd": "100Mbit/s (full duplex)", + "10bt": "10Mbit/s", + "10bt-fd": "10Mbit/s (full duplex)", + "autonegotiation": "Auto-negotiation", + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "ethernet": true, + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "physical": "Physical interface", + "pm": "Power Management", + "tp": "twisted pair", + "vpd": "Vital Product Data" + }, + "capacity": 100000000, + "claimed": true, + "class": "network", + "clock": 33000000, + "configuration": { + "autonegotiation": "on", + "broadcast": "yes", + "driver": "atl1c", + "driverversion": "5.10.0-13-amd64", + "duplex": "full", + "ip": "192.168.4.46", + "latency": "0", + "link": "yes", + "multicast": "yes", + "port": "twisted pair", + "speed": "100Mbit/s" + }, + "description": "Ethernet interface", + "handle": "PCI:0000:01:00.0", + "id": "network", + "logicalname": "eth0", + "physid": "0", + "product": "AR8152 v1.1 Fast Ethernet", + "serial": "88:ae:1d:a6:f3:d0", + "size": 100000000, + "units": "bit/s", + "vendor": "Qualcomm Atheros", + "version": "c1", + "width": 64 + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "description": "PCI bridge", + "handle": "PCIBUS:0000:01", + "id": "pci:0", + "physid": "1c", + "product": "NM10/ICH7 Family PCI Express Port 1", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1c.1", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "normal_decode": true, + "pci": true, + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "children": [ + { + "businfo": "pci@0000:02:00.0", + "capabilities": { + "cap_list": "PCI capabilities listing", + "msi": "Message Signalled Interrupts", + "pciexpress": "PCI Express", + "pm": "Power Management" + }, + "class": "network", + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "description": "Network controller", + "handle": "PCI:0000:02:00.0", + "id": "network", + "physid": "0", + "product": "Centrino Wireless-N 1000 [Condor Peak]", + "vendor": "Intel Corporation", + "version": "00", + "width": 64 + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "configuration": { + "driver": "pcieport" + }, + "description": "PCI bridge", + "handle": "PCIBUS:0000:02", + "id": "pci:1", + "physid": "1c.1", + "product": "NM10/ICH7 Family PCI Express Port 2", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.0", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@1", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:1:1", + "id": "usbhost", + "logicalname": "usb1", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.0", + "id": "usb:0", + "physid": "1d", + "product": "NM10/ICH7 Family USB UHCI Controller #1", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.1", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@2", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:2:1", + "id": "usbhost", + "logicalname": "usb2", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.1", + "id": "usb:1", + "physid": "1d.1", + "product": "NM10/ICH7 Family USB UHCI Controller #2", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.2", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@3", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:3:1", + "id": "usbhost", + "logicalname": "usb3", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.2", + "id": "usb:2", + "physid": "1d.2", + "product": "NM10/ICH7 Family USB UHCI Controller #3", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.3", + "capabilities": { + "bus_master": "bus mastering", + "uhci": "Universal Host Controller Interface (USB1)" + }, + "children": [ + { + "businfo": "usb@4", + "capabilities": { + "usb-1.10": "USB 1.1" + }, + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "2", + "speed": "12Mbit/s" + }, + "handle": "USB:4:1", + "id": "usbhost", + "logicalname": "usb4", + "physid": "1", + "product": "UHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 uhci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "uhci_hcd", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.3", + "id": "usb:3", + "physid": "1d.3", + "product": "NM10/ICH7 Family USB UHCI Controller #4", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1d.7", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "debug": "Debug port", + "ehci": "Enhanced Host Controller Interface (USB2)", + "pm": "Power Management" + }, + "children": [ + { + "businfo": "usb@5", + "capabilities": { + "usb-2.00": "USB 2.0" + }, + "children": [ + { + "businfo": "usb@5:1", + "capabilities": { + "emulated": "Emulated device", + "scsi": "SCSI", + "usb-2.00": "USB 2.0" + }, + "children": [ + { + "businfo": "scsi@4:0.0.0", + "capabilities": { + "removable": "support is removable" + }, + "children": [ + { + "capabilities": { + "partitioned": "Partitioned disk", + "partitioned:dos": "MS-DOS partition table" + }, + "children": [ + { + "capabilities": { + "boot": "Contains boot code", + "fat": "Windows FAT", + "initialized": "initialized volume", + "primary": "Primary partition" + }, + "claimed": true, + "class": "volume", + "configuration": { + "FATs": "2", + "filesystem": "fat" + }, + "description": "Windows FAT volume", + "dev": "8:18", + "id": "volume", + "logicalname": "/dev/sdb2", + "physid": "2", + "serial": "33f4-648f", + "size": 18446744073709549568, + "vendor": "mkfs.fat", + "version": "FAT16" + } + ], + "claimed": true, + "class": "disk", + "configuration": { + "signature": "466fdc5f" + }, + "dev": "8:16", + "id": "medium", + "logicalname": "/dev/sdb", + "physid": "0", + "size": 8053063680, + "units": "bytes" + } + ], + "claimed": true, + "class": "disk", + "configuration": { + "ansiversion": "4", + "logicalsectorsize": "512", + "sectorsize": "512" + }, + "description": "SCSI Disk", + "dev": "8:16", + "handle": "SCSI:04:00:00:00", + "id": "disk", + "logicalname": "/dev/sdb", + "physid": "0.0.0", + "product": "Flash Disk", + "serial": "87396259", + "size": 8053063680, + "units": "bytes", + "vendor": "Generic", + "version": "8.07" + } + ], + "claimed": true, + "class": "storage", + "configuration": { + "driver": "usb-storage", + "maxpower": "200mA", + "speed": "480Mbit/s" + }, + "description": "Mass storage device", + "handle": "USB:5:2", + "id": "usb:0", + "logicalname": "scsi4", + "physid": "1", + "product": "Mass Storage", + "serial": "87396259", + "vendor": "Generic", + "version": "1.00" + }, + { + "businfo": "usb@5:4", + "capabilities": { + "usb": "USB", + "usb-2.00": "USB 2.0" + }, + "claimed": true, + "class": "multimedia", + "configuration": { + "driver": "uvcvideo", + "maxpower": "500mA", + "speed": "480Mbit/s" + }, + "description": "Video", + "handle": "USB:5:3", + "id": "usb:1", + "logicalname": [ + "input10", + "/dev/input/event9" + ], + "physid": "4", + "product": "1.3M WebCam: 1.3M WebCam", + "vendor": "XPA970VW0", + "version": "0.09" + } + ], + "claimed": true, + "class": "bus", + "configuration": { + "driver": "hub", + "slots": "8", + "speed": "480Mbit/s" + }, + "handle": "USB:5:1", + "id": "usbhost", + "logicalname": "usb5", + "physid": "1", + "product": "EHCI Host Controller", + "vendor": "Linux 5.10.0-13-amd64 ehci_hcd", + "version": "5.10" + } + ], + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "ehci-pci", + "latency": "0" + }, + "description": "USB controller", + "handle": "PCI:0000:00:1d.7", + "id": "usb:4", + "physid": "1d.7", + "product": "NM10/ICH7 Family USB2 EHCI Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1e.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "pci": true, + "subtractive_decode": true + }, + "claimed": true, + "class": "bridge", + "clock": 33000000, + "description": "PCI bridge", + "handle": "PCIBUS:0000:05", + "id": "pci:2", + "physid": "1e", + "product": "82801 Mobile PCI Bridge", + "vendor": "Intel Corporation", + "version": "e2", + "width": 32 + }, + { + "businfo": "pci@0000:00:1f.0", + "capabilities": { + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "isa": true + }, + "children": [ + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "system", + "configuration": { + "driver": "system" + }, + "id": "pnp00:00", + "physid": "0", + "product": "PnP device PNP0c02" + }, + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "system", + "configuration": { + "driver": "rtc_cmos" + }, + "id": "pnp00:01", + "physid": "1", + "product": "PnP device PNP0b00" + }, + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "input", + "configuration": { + "driver": "i8042 kbd" + }, + "id": "pnp00:02", + "physid": "2", + "product": "PnP device PNP0303" + }, + { + "capabilities": { + "pnp": true + }, + "claimed": true, + "class": "generic", + "configuration": { + "driver": "i8042 aux" + }, + "id": "pnp00:03", + "physid": "3", + "product": "PnP device SYN1b1c" + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "configuration": { + "latency": "0" + }, + "description": "ISA bridge", + "handle": "PCI:0000:00:1f.0", + "id": "isa", + "physid": "1f", + "product": "NM10 Family LPC Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1f.2", + "capabilities": { + "ahci_1.0": true, + "bus_master": "bus mastering", + "cap_list": "PCI capabilities listing", + "emulated": "Emulated device", + "msi": "Message Signalled Interrupts", + "pm": "Power Management", + "sata": true + }, + "children": [ + { + "businfo": "scsi@0:0.0.0", + "claimed": true, + "class": "disk", + "configuration": { + "ansiversion": "5", + "logicalsectorsize": "512", + "sectorsize": "512" + }, + "description": "ATA Disk", + "dev": "8:0", + "handle": "SCSI:00:00:00:00", + "id": "disk", + "logicalname": "/dev/sda", + "physid": "0.0.0", + "product": "WDC WD1600BEVT-2", + "serial": "WD-WX11A80W7430", + "size": 160041885696, + "units": "bytes", + "vendor": "Western Digital", + "version": "1A01" + } + ], + "claimed": true, + "class": "storage", + "clock": 66000000, + "configuration": { + "driver": "ahci", + "latency": "0" + }, + "description": "SATA controller", + "handle": "PCI:0000:00:1f.2", + "id": "sata", + "logicalname": "scsi0", + "physid": "1f.2", + "product": "NM10/ICH7 Family SATA Controller [AHCI mode]", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + }, + { + "businfo": "pci@0000:00:1f.3", + "claimed": true, + "class": "bus", + "clock": 33000000, + "configuration": { + "driver": "i801_smbus", + "latency": "0" + }, + "description": "SMBus", + "handle": "PCI:0000:00:1f.3", + "id": "serial", + "physid": "1f.3", + "product": "NM10/ICH7 Family SMBus Controller", + "vendor": "Intel Corporation", + "version": "02", + "width": 32 + } + ], + "claimed": true, + "class": "bridge", + "clock": 33000000, + "description": "Host bridge", + "handle": "PCIBUS:0000:00", + "id": "pci", + "physid": "100", + "product": "Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge", + "vendor": "Intel Corporation", + "version": "00", + "width": 32 + } + ], + "claimed": true, + "class": "bus", + "description": "Motherboard", + "handle": "DMI:0002", + "id": "core", + "physid": "0", + "product": "AOHAPPY", + "serial": "Base Board Serial Number", + "slot": "Base Board Chassis Location", + "vendor": "Acer", + "version": "V3.05(DDR2)" + }, + { + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + }, + "claimed": true, + "class": "input", + "id": "input:0", + "logicalname": [ + "input0", + "/dev/input/event0", + "input0::capslock", + "input0::numlock", + "input0::scrolllock" + ], + "physid": "1", + "product": "AT Translated Set 2 keyboard" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:1", + "logicalname": [ + "input2", + "/dev/input/event1" + ], + "physid": "2", + "product": "Power Button" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:2", + "logicalname": [ + "input3", + "/dev/input/event2" + ], + "physid": "3", + "product": "Sleep Button" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:3", + "logicalname": [ + "input4", + "/dev/input/event3" + ], + "physid": "4", + "product": "Lid Switch" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:4", + "logicalname": [ + "input5", + "/dev/input/event4" + ], + "physid": "5", + "product": "Power Button" + }, + { + "capabilities": { + "i8042": "i8042 PC AT keyboard controller" + }, + "claimed": true, + "class": "input", + "id": "input:5", + "logicalname": [ + "input6", + "/dev/input/event6", + "/dev/input/mouse0" + ], + "physid": "6", + "product": "SynPS/2 Synaptics TouchPad" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:6", + "logicalname": [ + "input7", + "/dev/input/event5" + ], + "physid": "7", + "product": "Video Bus" + }, + { + "capabilities": { + "isa": "ISA bus" + }, + "claimed": true, + "class": "input", + "id": "input:7", + "logicalname": [ + "input8", + "/dev/input/event7" + ], + "physid": "8", + "product": "PC Speaker" + }, + { + "capabilities": { + "platform": true + }, + "claimed": true, + "class": "input", + "id": "input:8", + "logicalname": [ + "input9", + "/dev/input/event8" + ], + "physid": "9", + "product": "Acer WMI hotkeys" + } + ], + "claimed": true, + "class": "system", + "configuration": { + "boot": "normal", + "chassis": "notebook", + "family": "Intel_Mobile", + "sku": "NetTopSku", + "uuid": "364ee69c-9c82-9cb1-2111-88ae1da6f3d0" + }, + "description": "Notebook", + "handle": "DMI:0001", + "id": "workbench-live", + "product": "AOHAPPY (NetTopSku)", + "serial": "LUSEA0D010038879A01601", + "vendor": "Acer", + "version": "V3.05(DDR2)", + "width": 64 + }, + "lspci": "00:00.0 Host bridge: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\n\tSubsystem: Acer Incorporated [ALI] Atom Processor D4xx/D5xx/N4xx/N5xx DMI Bridge\n\tControl: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- \n\n00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller (prog-if 00 [VGA controller])\n\tSubsystem: Acer Incorporated [ALI] Atom Processor D4xx/D5xx/N4xx/N5xx Integrated Graphics Controller\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #0, PowerLimit 6.500W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn+ PwrFlt- MRL- PresDet+ CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-\n\t\tAddress: fee01004 Data: 4021\n\tCapabilities: [90] Subsystem: Acer Incorporated [ALI] NM10/ICH7 Family PCI Express Port 1\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=01 ComponentID=02 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1c.1 PCI bridge: Intel Corporation NM10/ICH7 Family PCI Express Port 2 (rev 02) (prog-if 00 [Normal decode])\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [40] Express (v1) Root Port (Slot+), MSI 00\n\t\tDevCap:\tMaxPayload 128 bytes, PhantFunc 0\n\t\t\tExtTag- RBE-\n\t\tDevCtl:\tCorrErr- NonFatalErr- FatalErr- UnsupReq-\n\t\t\tRlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-\n\t\t\tMaxPayload 128 bytes, MaxReadReq 128 bytes\n\t\tDevSta:\tCorrErr+ NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-\n\t\tLnkCap:\tPort #2, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us\n\t\t\tClockPM- Surprise- LLActRep+ BwNot- ASPMOptComp-\n\t\tLnkCtl:\tASPM Disabled; RCB 64 bytes, Disabled- CommClk+\n\t\t\tExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-\n\t\tLnkSta:\tSpeed 2.5GT/s (ok), Width x1 (ok)\n\t\t\tTrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-\n\t\tSltCap:\tAttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+\n\t\t\tSlot #1, PowerLimit 6.500W; Interlock- NoCompl-\n\t\tSltCtl:\tEnable: AttnBtn+ PwrFlt- MRL- PresDet+ CmdCplt- HPIrq- LinkChg-\n\t\t\tControl: AttnInd Unknown, PwrInd Unknown, Power- Interlock-\n\t\tSltSta:\tStatus: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-\n\t\t\tChanged: MRL- PresDet- LinkState-\n\t\tRootCap: CRSVisible-\n\t\tRootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible-\n\t\tRootSta: PME ReqID 0000, PMEStatus- PMEPending-\n\tCapabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-\n\t\tAddress: fee02004 Data: 4022\n\tCapabilities: [90] Subsystem: Acer Incorporated [ALI] NM10/ICH7 Family PCI Express Port 2\n\tCapabilities: [a0] Power Management version 2\n\t\tFlags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)\n\t\tStatus: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-\n\tCapabilities: [100 v1] Virtual Channel\n\t\tCaps:\tLPEVC=0 RefClk=100ns PATEntryBits=1\n\t\tArb:\tFixed+ WRR32- WRR64- WRR128-\n\t\tCtrl:\tArbSelect=Fixed\n\t\tStatus:\tInProgress-\n\t\tVC0:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable+ ID=0 ArbSelect=Fixed TC/VC=01\n\t\t\tStatus:\tNegoPending- InProgress-\n\t\tVC1:\tCaps:\tPATOffset=00 MaxTimeSlots=1 RejSnoopTrans-\n\t\t\tArb:\tFixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-\n\t\t\tCtrl:\tEnable- ID=0 ArbSelect=Fixed TC/VC=00\n\t\t\tStatus:\tNegoPending- InProgress-\n\tCapabilities: [180 v1] Root Complex Link\n\t\tDesc:\tPortNumber=02 ComponentID=02 EltType=Config\n\t\tLink0:\tDesc:\tTargetPort=00 TargetComponent=02 AssocRCRB- LinkType=MemMapped LinkValid+\n\t\t\tAddr:\t00000000fed1c001\n\tKernel driver in use: pcieport\n\n00:1d.0 USB controller: Intel Corporation NM10/ICH7 Family USB UHCI Controller #1 (rev 02) (prog-if 00 [UHCI])\n\tSubsystem: Acer Incorporated [ALI] NM10/ICH7 Family USB UHCI Controller\n\tControl: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- Reset- FastB2B-\n\t\tPriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-\n\tCapabilities: [50] Subsystem: Acer Incorporated [ALI] 82801 Mobile PCI Bridge\n\n00:1f.0 ISA bridge: Intel Corporation NM10 Family LPC Controller (rev 02)\n\tSubsystem: Acer Incorporated [ALI] NM10 Family LPC Controller\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-\n\tStatus: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- \n\tKernel modules: lpc_ich\n\n00:1f.2 SATA controller: Intel Corporation NM10/ICH7 Family SATA Controller [AHCI mode] (rev 02) (prog-if 01 [AHCI 1.0])\n\tSubsystem: Acer Incorporated [ALI] NM10/ICH7 Family SATA Controller [AHCI mode]\n\tControl: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+\n\tStatus: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- SERR- TAbort- SERR- TAbort- SERR- TAbort- SERR- tuple: return tuple( - ( - e['type'], - [c['serialNumber'] for c in e['components']] - ) + (e['type'], [c['serialNumber'] for c in e['components']]) for e in user.get_many(res=Action, resources=actions, key='id') ) @@ -198,15 +217,19 @@ def test_snapshot_component_add_remove(user: UserClient): pc1, _ = user.get(res=m.Device, item=pc1_devicehub_id) update1_pc1 = pc1['updated'] # Parent contains components - assert tuple(c['serialNumber'] for c in pc1['components']) == ('p1c1s', 'p1c2s', 'p1c3s') + assert tuple(c['serialNumber'] for c in pc1['components']) == ( + 'p1c1s', + 'p1c2s', + 'p1c3s', + ) # Components contain parent assert all(c['parent'] == pc1_id for c in pc1['components']) # pc has three actions: Snapshot, BenchmarkProcessor and RateComputer - assert len(pc1['actions']) == 3 + assert len(pc1['actions']) == 2 assert pc1['actions'][1]['type'] == Snapshot.t # p1c1s has Snapshot p1c1s, _ = user.get(res=m.Device, item=pc1['components'][0]['devicehubID']) - assert tuple(e['type'] for e in p1c1s['actions']) == ('Snapshot', 'RateComputer') + assert tuple(e['type'] for e in p1c1s['actions']) == ('Snapshot',) # We register a new device # It has the processor of the first one (p1c2s) @@ -228,23 +251,32 @@ def test_snapshot_component_add_remove(user: UserClient): # PC1 assert tuple(c['serialNumber'] for c in pc1['components']) == ('p1c1s', 'p1c3s') assert all(c['parent'] == pc1_id for c in pc1['components']) - assert tuple(e['type'] for e in pc1['actions']) == ('BenchmarkProcessor', 'Snapshot', 'RateComputer', 'Remove') + assert tuple(e['type'] for e in pc1['actions']) == ( + 'BenchmarkProcessor', + 'Snapshot', + 'Remove', + ) # PC2 assert tuple(c['serialNumber'] for c in pc2['components']) == ('p1c2s', 'p2c1s') assert all(c['parent'] == pc2_id for c in pc2['components']) - assert tuple(e['type'] for e in pc2['actions']) == ('Snapshot', 'RateComputer') + assert tuple(e['type'] for e in pc2['actions']) == ('Snapshot',) # p1c2s has two Snapshots, a Remove and an Add p1c2s, _ = user.get(res=m.Device, item=pc2['components'][0]['devicehubID']) assert tuple(e['type'] for e in p1c2s['actions']) == ( - 'BenchmarkProcessor', 'Snapshot', 'RateComputer', 'Snapshot', 'Remove', 'RateComputer' + 'BenchmarkProcessor', + 'Snapshot', + 'Snapshot', + 'Remove', ) # We register the first device again, but removing motherboard # and moving processor from the second device to the first. # We have created 1 Remove (from PC2's processor back to PC1) # PC 0: p1c2s, p1c3s. PC 1: p2c1s - s3 = yaml2json('3-first-device-but-removing-motherboard-and-adding-processor-from-2.snapshot') - snapshot_and_check(user, s3, ('Remove', 'RateComputer'), perform_second_snapshot=False) + s3 = yaml2json( + '3-first-device-but-removing-motherboard-and-adding-processor-from-2.snapshot' + ) + snapshot_and_check(user, s3, ('Remove',), perform_second_snapshot=False) pc1, _ = user.get(res=m.Device, item=pc1_devicehub_id) pc2, _ = user.get(res=m.Device, item=pc2_devicehub_id) # Check if the update_timestamp is updated @@ -260,54 +292,49 @@ def test_snapshot_component_add_remove(user: UserClient): # id, type, components, snapshot ('BenchmarkProcessor', []), # first BenchmarkProcessor ('Snapshot', ['p1c1s', 'p1c2s', 'p1c3s']), # first Snapshot1 - ('RateComputer', ['p1c1s', 'p1c2s', 'p1c3s']), ('Remove', ['p1c2s']), # Remove Processor in Snapshot2 ('Snapshot', ['p1c2s', 'p1c3s']), # This Snapshot3 - ('RateComputer', ['p1c2s', 'p1c3s']) ) # PC2 assert tuple(c['serialNumber'] for c in pc2['components']) == ('p2c1s',) assert all(c['parent'] == pc2_id for c in pc2['components']) assert tuple(e['type'] for e in pc2['actions']) == ( 'Snapshot', # Second Snapshot - 'RateComputer', - 'Remove' # the processor we added in 2. + 'Remove', # the processor we added in 2. ) # p1c2s has Snapshot, Remove and Add p1c2s, _ = user.get(res=m.Device, item=pc1['components'][0]['devicehubID']) assert tuple(get_actions_info(p1c2s['actions'])) == ( ('BenchmarkProcessor', []), # first BenchmarkProcessor ('Snapshot', ['p1c1s', 'p1c2s', 'p1c3s']), # First Snapshot to PC1 - ('RateComputer', ['p1c1s', 'p1c2s', 'p1c3s']), ('Snapshot', ['p1c2s', 'p2c1s']), # Second Snapshot to PC2 ('Remove', ['p1c2s']), # ...which caused p1c2s to be removed form PC1 - ('RateComputer', ['p1c2s', 'p2c1s']), ('Snapshot', ['p1c2s', 'p1c3s']), # The third Snapshot to PC1 ('Remove', ['p1c2s']), # ...which caused p1c2 to be removed from PC2 - ('RateComputer', ['p1c2s', 'p1c3s']) ) # We register the first device but without the processor, # adding a graphic card and adding a new component - s4 = yaml2json('4-first-device-but-removing-processor.snapshot-and-adding-graphic-card') - snapshot4 = snapshot_and_check(user, s4, ('RateComputer',), perform_second_snapshot=False) + s4 = yaml2json( + '4-first-device-but-removing-processor.snapshot-and-adding-graphic-card' + ) pc1, _ = user.get(res=m.Device, item=pc1_devicehub_id) pc2, _ = user.get(res=m.Device, item=pc2_devicehub_id) # Check if the update_timestamp is updated update3_pc2 = pc2['updated'] update4_pc1 = pc1['updated'] - assert not update4_pc1 in [update1_pc1, update2_pc1, update3_pc1] + assert update4_pc1 in [update1_pc1, update2_pc1, update3_pc1] assert update3_pc2 == update2_pc2 # PC 0: p1c3s, p1c4s. PC1: p2c1s - assert {c['serialNumber'] for c in pc1['components']} == {'p1c3s'} + assert {c['serialNumber'] for c in pc1['components']} == {'p1c2s', 'p1c3s'} assert all(c['parent'] == pc1_id for c in pc1['components']) # This last Action only - assert get_actions_info(pc1['actions'])[-1] == ('RateComputer', ['p1c3s']) # PC2 # We haven't changed PC2 assert tuple(c['serialNumber'] for c in pc2['components']) == ('p2c1s',) assert all(c['parent'] == pc2_id for c in pc2['components']) + @pytest.mark.mvp def test_snapshot_post_without_hid(user: UserClient): """Tests the post snapshot endpoint (validation, etc), data correctness, @@ -338,15 +365,16 @@ def test_snapshot_tag_inner_tag(user: UserClient, tag_id: str, app: Devicehub): b = yaml2json('basic.snapshot') b['device']['tags'] = [{'type': 'Tag', 'id': tag_id}] - snapshot_and_check(user, b, - action_types=(RateComputer.t, BenchmarkProcessor.t, VisualTest.t)) + snapshot_and_check(user, b, action_types=(BenchmarkProcessor.t, VisualTest.t)) with app.app_context(): tag = Tag.query.all()[0] # type: Tag assert tag.device_id == 3, 'Tag should be linked to the first device' @pytest.mark.mvp -def test_snapshot_tag_inner_tag_mismatch_between_tags_and_hid(user: UserClient, tag_id: str): +def test_snapshot_tag_inner_tag_mismatch_between_tags_and_hid( + user: UserClient, tag_id: str +): """Ensures one device cannot 'steal' the tag from another one.""" pc1 = yaml2json('basic.snapshot') pc1['device']['tags'] = [{'type': 'Tag', 'id': tag_id}] @@ -396,7 +424,7 @@ def test_snapshot_component_containing_components(user: UserClient): 'type': 'Processor', 'serialNumber': 'foo', 'manufacturer': 'bar', - 'model': 'baz' + 'model': 'baz', } user.post(json_encode(s), res=Snapshot, status=ValidationError) @@ -435,13 +463,15 @@ def test_not_remove_ram_in_same_computer(user: UserClient): snap1, _ = user.post(json_encode(s), res=Snapshot) s['uuid'] = '74caa7eb-2bad-4333-94f6-6f1b031d0774' - s['components'].append({ - "actions": [], - "manufacturer": "Intel Corporation", - "model": "NM10/ICH7 Family High Definition Audio Controller", - "serialNumber": "mp2pc", - "type": "SoundCard" - }) + s['components'].append( + { + "actions": [], + "manufacturer": "Intel Corporation", + "model": "NM10/ICH7 Family High Definition Audio Controller", + "serialNumber": "mp2pc", + "type": "SoundCard", + } + ) dev1 = m.Device.query.filter_by(id=snap1['device']['id']).one() ram1 = [x.id for x in dev1.components if x.type == 'RamModule'][0] snap2, _ = user.post(json_encode(s), res=Snapshot) @@ -455,28 +485,6 @@ def test_not_remove_ram_in_same_computer(user: UserClient): assert dev1.components == dev2.components -@pytest.mark.mvp -def test_ereuse_price(user: UserClient): - """Tests a Snapshot with EraseSectors and the resulting privacy - properties. - - This tests ensures that only the last erasure is picked up, as - erasures have always custom endTime value set. - """ - s = yaml2json('erase-sectors.snapshot') - assert s['components'][0]['actions'][0]['endTime'] == '2018-06-01T09:12:06+02:00' - s['device']['type'] = 'Server' - snapshot = snapshot_and_check(user, s, action_types=( - EraseSectors.t, - BenchmarkDataStorage.t, - BenchmarkProcessor.t, - RateComputer.t, - EreusePrice.t - ), perform_second_snapshot=False) - ereuse_price = snapshot['actions'][-1] - assert len(ereuse_price) > 0 - - @pytest.mark.mvp def test_erase_privacy_standards_endtime_sort(user: UserClient): """Tests a Snapshot with EraseSectors and the resulting privacy @@ -487,33 +495,48 @@ def test_erase_privacy_standards_endtime_sort(user: UserClient): """ s = yaml2json('erase-sectors.snapshot') assert s['components'][0]['actions'][0]['endTime'] == '2018-06-01T09:12:06+02:00' - snapshot = snapshot_and_check(user, s, action_types=( - EraseSectors.t, - BenchmarkDataStorage.t, - BenchmarkProcessor.t, - RateComputer.t, - EreusePrice.t - ), perform_second_snapshot=False) + snapshot = snapshot_and_check( + user, + s, + action_types=( + EraseSectors.t, + BenchmarkDataStorage.t, + BenchmarkProcessor.t, + ), + perform_second_snapshot=False, + ) # Perform a new snapshot changing the erasure time, as if # it is a new erasure performed after. erase = next(e for e in snapshot['actions'] if e['type'] == EraseSectors.t) assert erase['endTime'] == '2018-06-01T07:12:06+00:00' s['uuid'] = uuid4() s['components'][0]['actions'][0]['endTime'] = '2018-06-01T07:14:00+00:00' - snapshot = snapshot_and_check(user, s, action_types=( - EraseSectors.t, - BenchmarkDataStorage.t, - BenchmarkProcessor.t, - RateComputer.t, - EreusePrice.t - ), perform_second_snapshot=False) + snapshot = snapshot_and_check( + user, + s, + action_types=( + EraseSectors.t, + BenchmarkDataStorage.t, + BenchmarkProcessor.t, + ), + perform_second_snapshot=False, + ) # The actual test storage = next(e for e in snapshot['components'] if e['type'] == SolidStateDrive.t) - storage, _ = user.get(res=m.Device, item=storage['devicehubID']) # Let's get storage actions too + storage, _ = user.get( + res=m.Device, item=storage['devicehubID'] + ) # Let's get storage actions too # order: endTime ascending # erasure1/2 have an user defined time and others actions endTime = created - erasure1, erasure2, benchmark_hdd1, _snapshot1, _, _, benchmark_hdd2, _snapshot2 = storage['actions'][:8] + ( + erasure1, + erasure2, + benchmark_hdd1, + _snapshot1, + benchmark_hdd2, + _snapshot2, + ) = storage['actions'][:8] assert erasure1['type'] == erasure2['type'] == 'EraseSectors' assert benchmark_hdd1['type'] == benchmark_hdd2['type'] == 'BenchmarkDataStorage' assert _snapshot1['type'] == _snapshot2['type'] == 'Snapshot' @@ -555,8 +578,7 @@ def test_test_data_storage(user: UserClient): s = file('erase-sectors-2-hdd.snapshot') snapshot, _ = user.post(res=Snapshot, data=s) incidence_test = next( - ev for ev in snapshot['actions'] - if ev.get('reallocatedSectorCount', None) == 15 + ev for ev in snapshot['actions'] if ev.get('reallocatedSectorCount', None) == 15 ) assert incidence_test['severity'] == 'Error' @@ -584,22 +606,24 @@ def assert_similar_components(components1: List[dict], components2: List[dict]): assert_similar_device(c1, c2) -def snapshot_and_check(user: UserClient, - input_snapshot: dict, - action_types: Tuple[str, ...] = tuple(), - perform_second_snapshot=True) -> dict: +def snapshot_and_check( + user: UserClient, + input_snapshot: dict, + action_types: Tuple[str, ...] = tuple(), + perform_second_snapshot=True, +) -> dict: """Performs a Snapshot and then checks if the result is ok: - - There have been performed the types of actions and in the same - order as described in the passed-in ``action_types``. - - The inputted devices are similar to the resulted ones. - - There is no Remove action after the first Add. - - All input components are now inside the parent device. + - There have been performed the types of actions and in the same + order as described in the passed-in ``action_types``. + - The inputted devices are similar to the resulted ones. + - There is no Remove action after the first Add. + - All input components are now inside the parent device. - Optionally, it can perform a second Snapshot which should - perform an exact result, except for the actions. + Optionally, it can perform a second Snapshot which should + perform an exact result, except for the actions. - :return: The last resulting snapshot. + :return: The last resulting snapshot. """ snapshot, _ = user.post(res=Snapshot, data=json_encode(input_snapshot)) assert all(e['type'] in action_types for e in snapshot['actions']) @@ -610,18 +634,22 @@ def snapshot_and_check(user: UserClient, if action['type'] == 'Add': found_add = True if found_add: - assert action['type'] != 'Receive', 'All Remove actions must be before the Add ones' + assert ( + action['type'] != 'Receive' + ), 'All Remove actions must be before the Add ones' assert input_snapshot['device'] assert_similar_device(input_snapshot['device'], snapshot['device']) if input_snapshot.get('components', None): assert_similar_components(input_snapshot['components'], snapshot['components']) - assert all(c['parent'] == snapshot['device']['id'] for c in snapshot['components']), \ - 'Components must be in their parent' + assert all( + c['parent'] == snapshot['device']['id'] for c in snapshot['components'] + ), 'Components must be in their parent' if perform_second_snapshot: if 'uuid' in input_snapshot: input_snapshot['uuid'] = uuid4() - return snapshot_and_check(user, input_snapshot, action_types, - perform_second_snapshot=False) + return snapshot_and_check( + user, input_snapshot, action_types, perform_second_snapshot=False + ) else: return snapshot @@ -642,12 +670,12 @@ def test_erase_changing_hdd_between_pcs(user: UserClient): db.session.commit() assert dev2.components[1].actions[2].parent == dev1 - doc1, response = user.get(res=documents.DocumentDef.t, - item='erasures/{}'.format(dev1.id), - accept=ANY) - doc2, response = user.get(res=documents.DocumentDef.t, - item='erasures/{}'.format(dev2.id), - accept=ANY) + doc1, response = user.get( + res=documents.DocumentDef.t, item='erasures/{}'.format(dev1.id), accept=ANY + ) + doc2, response = user.get( + res=documents.DocumentDef.t, item='erasures/{}'.format(dev2.id), accept=ANY + ) assert 'dev1' in doc2 assert 'dev2' in doc2 @@ -667,10 +695,9 @@ def test_pc_2(user: UserClient): snapshot, _ = user.post(res=Snapshot, data=s) - @pytest.mark.mvp def test_save_snapshot_in_file(app: Devicehub, user: UserClient): - """ This test check if works the function save_snapshot_in_file """ + """This test check if works the function save_snapshot_in_file""" snapshot_no_hid = yaml2json('basic.snapshot.nohid') tmp_snapshots = app.config['TMP_SNAPSHOTS'] path_dir_base = os.path.join(tmp_snapshots, user.user['email'], 'errors') @@ -696,7 +723,7 @@ def test_save_snapshot_in_file(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_action_no_snapshot_without_save_file(app: Devicehub, user: UserClient): - """ This test check if the function save_snapshot_in_file not work when we + """This test check if the function save_snapshot_in_file not work when we send one other action different to snapshot """ s = file('laptop-hp_255_g3_notebook-hewlett-packard-cnd52270fw.snapshot') @@ -712,9 +739,10 @@ def test_action_no_snapshot_without_save_file(app: Devicehub, user: UserClient): assert os.path.exists(tmp_snapshots) == False + @pytest.mark.mvp def test_save_snapshot_with_debug(app: Devicehub, user: UserClient): - """ This test check if works the function save_snapshot_in_file """ + """This test check if works the function save_snapshot_in_file""" snapshot_file = yaml2json('basic.snapshot.with_debug') debug = snapshot_file['debug'] user.post(res=Snapshot, data=json_encode(snapshot_file)) @@ -738,7 +766,7 @@ def test_save_snapshot_with_debug(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_backup_snapshot_with_errors(app: Devicehub, user: UserClient): - """ This test check if the file snapshot is create when some snapshot is wrong """ + """This test check if the file snapshot is create when some snapshot is wrong""" tmp_snapshots = app.config['TMP_SNAPSHOTS'] path_dir_base = os.path.join(tmp_snapshots, user.user['email'], 'errors') snapshot_no_hid = yaml2json('basic.snapshot.badly_formed') @@ -763,7 +791,7 @@ def test_backup_snapshot_with_errors(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_snapshot_failed_missing_cpu_benchmark(app: Devicehub, user: UserClient): - """ This test check if the file snapshot is create when some snapshot is wrong """ + """This test check if the file snapshot is create when some snapshot is wrong""" tmp_snapshots = app.config['TMP_SNAPSHOTS'] path_dir_base = os.path.join(tmp_snapshots, user.user['email'], 'errors') snapshot_error = yaml2json('failed.snapshot.500.missing-cpu-benchmark') @@ -788,7 +816,7 @@ def test_snapshot_failed_missing_cpu_benchmark(app: Devicehub, user: UserClient) @pytest.mark.mvp def test_snapshot_failed_missing_hdd_benchmark(app: Devicehub, user: UserClient): - """ This test check if the file snapshot is create when some snapshot is wrong """ + """This test check if the file snapshot is create when some snapshot is wrong""" tmp_snapshots = app.config['TMP_SNAPSHOTS'] path_dir_base = os.path.join(tmp_snapshots, user.user['email'], 'errors') snapshot_error = yaml2json('failed.snapshot.500.missing-hdd-benchmark') @@ -813,7 +841,7 @@ def test_snapshot_failed_missing_hdd_benchmark(app: Devicehub, user: UserClient) @pytest.mark.mvp def test_snapshot_not_failed_null_chassis(app: Devicehub, user: UserClient): - """ This test check if the file snapshot is create when some snapshot is wrong """ + """This test check if the file snapshot is create when some snapshot is wrong""" tmp_snapshots = app.config['TMP_SNAPSHOTS'] path_dir_base = os.path.join(tmp_snapshots, user.user['email'], 'errors') snapshot_error = yaml2json('desktop-9644w8n-lenovo-0169622.snapshot') @@ -831,7 +859,7 @@ def test_snapshot_not_failed_null_chassis(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_snapshot_failed_missing_chassis(app: Devicehub, user: UserClient): - """ This test check if the file snapshot is create when some snapshot is wrong """ + """This test check if the file snapshot is create when some snapshot is wrong""" tmp_snapshots = app.config['TMP_SNAPSHOTS'] path_dir_base = os.path.join(tmp_snapshots, user.user['email'], 'errors') snapshot_error = yaml2json('failed.snapshot.422.missing-chassis') @@ -856,7 +884,7 @@ def test_snapshot_failed_missing_chassis(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_snapshot_failed_end_time_bug(app: Devicehub, user: UserClient): - """ This test check if the end_time = 0001-01-01 00:00:00+00:00 + """This test check if the end_time = 0001-01-01 00:00:00+00:00 and then we get a /devices, this create a crash """ snapshot_file = file('asus-end_time_bug88.snapshot') @@ -870,9 +898,10 @@ def test_snapshot_failed_end_time_bug(app: Devicehub, user: UserClient): tmp_snapshots = app.config['TMP_SNAPSHOTS'] shutil.rmtree(tmp_snapshots) + @pytest.mark.mvp def test_snapshot_not_failed_end_time_bug(app: Devicehub, user: UserClient): - """ This test check if the end_time != 0001-01-01 00:00:00+00:00 + """This test check if the end_time != 0001-01-01 00:00:00+00:00 and then we get a /devices, this create a crash """ snapshot_file = yaml2json('asus-end_time_bug88.snapshot') @@ -891,7 +920,7 @@ def test_snapshot_not_failed_end_time_bug(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_snapshot_bug_smallint_hdd(app: Devicehub, user: UserClient): - """ This test check if the end_time != 0001-01-01 00:00:00+00:00 + """This test check if the end_time != 0001-01-01 00:00:00+00:00 and then we get a /devices, this create a crash """ snapshot_file = file('asus-eee-1000h.snapshot.bug1857') @@ -907,7 +936,7 @@ def test_snapshot_bug_smallint_hdd(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_snapshot_mobil(app: Devicehub, user: UserClient): - """ This test check if the end_time != 0001-01-01 00:00:00+00:00 + """This test check if the end_time != 0001-01-01 00:00:00+00:00 and then we get a /devices, this create a crash """ snapshot_file = file('mobil') @@ -921,8 +950,183 @@ def test_snapshot_mobil(app: Devicehub, user: UserClient): @pytest.mark.mvp def test_bug_141(user: UserClient): """This test check one bug that create a problem when try to up one snapshot - with a big number in the parameter command_timeout of the DataStorage + with a big number in the parameter command_timeout of the DataStorage """ dev = file('2021-5-4-13-41_time_out_test_datastorage') user.post(dev, res=Snapshot) + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_wb_lite(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + + snapshot = file_json( + "2022-03-31_17h18m51s_ZQMPKKX51K67R68VO2X9RNZL08JPL_snapshot.json" + ) + body, res = user.post(snapshot, uri="/api/inventory/") + + ssd = [x for x in body['components'] if x['type'] == 'SolidStateDrive'][0] + + assert body['device']['manufacturer'] == 'lenovo' + # assert body['wbid'] == "LXVC" + assert ssd['serialNumber'] == 's35anx0j401001' + assert res.status == '201 CREATED' + assert '00:28:f8:a6:d5:7e' in body['device']['hid'] + + dev = m.Device.query.filter_by(id=body['device']['id']).one() + assert dev.actions[0].power_on_hours == 6032 + errors = SnapshotErrors.query.filter().all() + assert errors == [] + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_wb_lite_qemu(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + + snapshot = file_json( + "2022-04-01_06h28m54s_YKPZ27NJ2NMRO4893M4L5NRZV5YJ1_snapshot.json" + ) + # body, res = user.post(snapshot, res=Snapshot) + body, res = user.post(snapshot, uri="/api/inventory/") + + assert body['wbid'] == "YKPZ27NJ2NMRO4893M4L5NRZV5YJ1" + assert res.status == '201 CREATED' + + dev = m.Device.query.filter_by(id=body['device']['id']).one() + assert dev.manufacturer == 'qemu' + assert dev.model == 'standard' + assert dev.serial_number is None + assert dev.hid is None + assert dev.actions[0].power_on_hours == 0 + assert dev.actions[1].power_on_hours == 0 + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_wb_lite_old_snapshots(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + wb_dir = Path(__file__).parent.joinpath('files/wb_lite/') + for f in os.listdir(wb_dir): + file_name = "wb_lite/{}".format(f) + snapshot_11 = file_json(file_name) + if not snapshot_11.get('debug'): + continue + lshw = snapshot_11['debug']['lshw'] + hwinfo = snapshot_11['debug']['hwinfo'] + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'wbid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + 'data': { + 'lshw': lshw, + 'hwinfo': hwinfo, + 'smart': [], + 'dmidecode': '', + 'lspci': '', + }, + } + + body11, res = user.post(snapshot_11, res=Snapshot) + bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + components11 = [] + componentsLite = [] + for c in body11.get('components', []): + if c['type'] in ["HardDrive", "SolidStateDrive"]: + continue + components11.append({c.get('model'), c['type'], c.get('manufacturer')}) + for c in bodyLite.get('components', []): + componentsLite.append({c.get('model'), c['type'], c.get('manufacturer')}) + + try: + assert body11['device'].get('hid') == bodyLite['device'].get('hid') + if body11['device'].get('hid'): + assert body11['device']['id'] == bodyLite['device']['id'] + assert body11['device'].get('serialNumber') == bodyLite['device'].get( + 'serialNumber' + ) + assert body11['device'].get('model') == bodyLite['device'].get('model') + assert body11['device'].get('manufacturer') == bodyLite['device'].get( + 'manufacturer' + ) + + # wbLite can find more components than wb11 + assert len(components11) <= len(componentsLite) + for c in components11: + assert c in componentsLite + except Exception as err: + # import pdb; pdb.set_trace() + raise err + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_errors(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_11 = file_json('snapshotErrors.json') + lshw = snapshot_11['debug']['lshw'] + hwinfo = snapshot_11['debug']['hwinfo'] + snapshot_lite = { + 'timestamp': snapshot_11['endTime'], + 'type': 'Snapshot', + 'uuid': str(uuid.uuid4()), + 'wbid': 'MLKO1', + 'software': 'Workbench', + 'version': '2022.03.00', + "schema_api": "1.0.0", + 'data': { + 'lshw': lshw, + 'hwinfo': hwinfo, + 'smart': [], + 'dmidecode': '', + 'lspci': '', + }, + } + + assert SnapshotErrors.query.all() == [] + body11, res = user.post(snapshot_11, res=Snapshot) + assert SnapshotErrors.query.all() == [] + bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + assert len(SnapshotErrors.query.all()) == 2 + + assert body11['device'].get('hid') == bodyLite['device'].get('hid') + assert body11['device']['id'] == bodyLite['device']['id'] + assert body11['device'].get('serialNumber') == bodyLite['device'].get( + 'serialNumber' + ) + assert body11['device'].get('model') == bodyLite['device'].get('model') + assert body11['device'].get('manufacturer') == bodyLite['device'].get( + 'manufacturer' + ) + components11 = [] + componentsLite = [] + for c in body11['components']: + if c['type'] == "HardDrive": + continue + components11.append({c['model'], c['type'], c['manufacturer']}) + for c in bodyLite['components']: + componentsLite.append({c['model'], c['type'], c['manufacturer']}) + + assert len(components11) == len(componentsLite) + for c in components11: + assert c in componentsLite + + +@pytest.mark.mvp +@pytest.mark.usefixtures(conftest.app_context.__name__) +def test_snapshot_errors_timestamp(user: UserClient): + """This test check the minimum validation of json that come from snapshot""" + snapshot_lite = file_json('snapshot-error-timestamp.json') + + bodyLite, res = user.post(snapshot_lite, uri="/api/inventory/") + assert res.status_code == 201 + assert len(SnapshotErrors.query.all()) == 1 + error = SnapshotErrors.query.all()[0] + assert snapshot_lite['wbid'] == error.wbid + assert user.user['id'] == str(error.owner_id) diff --git a/tests/test_workbench.py b/tests/test_workbench.py index 2eb161a1..e91a4107 100644 --- a/tests/test_workbench.py +++ b/tests/test_workbench.py @@ -41,7 +41,6 @@ def test_workbench_server_condensed(user: UserClient): ('BenchmarkProcessorSysbench', cpu_id), ('StressTest', pc_id), ('EraseSectors', ssd_id), - ('EreusePrice', pc_id), ('BenchmarkRamSysbench', pc_id), ('BenchmarkProcessor', cpu_id), ('Install', ssd_id), @@ -49,7 +48,6 @@ def test_workbench_server_condensed(user: UserClient): ('BenchmarkDataStorage', ssd_id), ('BenchmarkDataStorage', hdd_id), ('TestDataStorage', ssd_id), - ('RateComputer', pc_id) } assert snapshot['closed'] assert snapshot['severity'] == 'Info' @@ -61,10 +59,6 @@ def test_workbench_server_condensed(user: UserClient): assert device['networkSpeeds'] == [1000, 58] assert device['processorModel'] == device['components'][3]['model'] == 'p1-1ml' assert device['ramSize'] == 2048, 'There are 3 RAM: 2 x 1024 and 1 None sizes' - assert device['rate']['closed'] - assert device['rate']['severity'] == 'Info' - assert device['rate']['rating'] == 1 - assert device['rate']['type'] == RateComputer.t # TODO JN why haven't same order in actions on each execution? assert any([ac['type'] in [BenchmarkProcessor.t, BenchmarkRamSysbench.t] for ac in device['actions']]) assert 'tag1' in [x['id'] for x in device['tags']] @@ -145,8 +139,6 @@ def test_real_hp_11(user: UserClient): assert pc['hid'] == 'desktop-hewlett-packard-hp_compaq_8100_elite_sff-czc0408yjg-6c:62:6d:81:22:9f' assert pc['chassis'] == 'Tower' assert set(e['type'] for e in snapshot['actions']) == { - 'EreusePrice', - 'RateComputer', 'BenchmarkDataStorage', 'BenchmarkProcessor', 'BenchmarkProcessorSysbench', @@ -156,7 +148,8 @@ def test_real_hp_11(user: UserClient): 'TestBios', 'VisualTest' } - assert len(list(e['type'] for e in snapshot['actions'])) == 10 + + assert len(list(e['type'] for e in snapshot['actions'])) == 8 assert pc['networkSpeeds'] == [1000, None], 'Device has no WiFi' assert pc['processorModel'] == 'intel core i3 cpu 530 @ 2.93ghz' assert pc['ramSize'] == 8192 @@ -175,6 +168,7 @@ def test_snapshot_real_eee_1001pxd_with_rate(user: UserClient): """Checks the values of the device, components, actions and their relationships of a real pc. """ + # import pdb; pdb.set_trace() s = file('real-eee-1001pxd.snapshot.11') snapshot, _ = user.post(res=em.Snapshot, data=s) pc, _ = user.get(res=Device, item=snapshot['device']['devicehubID']) @@ -186,19 +180,10 @@ def test_snapshot_real_eee_1001pxd_with_rate(user: UserClient): assert pc['hid'] == 'laptop-asustek_computer_inc-1001pxd-b8oaas048286-14:da:e9:42:f6:7c' assert len(pc['tags']) == 1 assert pc['networkSpeeds'] == [100, 0], 'Although it has WiFi we do not know the speed' - assert pc['rate'] - rate = pc['rate'] # assert pc['actions'][0]['appearanceRange'] == 'A' # assert pc['actions'][0]['functionalityRange'] == 'B' # TODO add appearance and functionality Range in device[rate] - assert rate['processorRange'] == 'LOW' - assert rate['ramRange'] == 'LOW' - assert rate['ratingRange'] == 'LOW' - assert rate['ram'] == 1.53 - # TODO add camelCase instead of snake_case - assert rate['dataStorage'] == 3.76 - assert rate['type'] == 'RateComputer' components = snapshot['components'] wifi = components[0] assert wifi['hid'] == 'networkadapter-qualcomm_atheros-' \ @@ -232,7 +217,7 @@ def test_snapshot_real_eee_1001pxd_with_rate(user: UserClient): assert em.BenchmarkRamSysbench.t in action_types assert em.StressTest.t in action_types assert em.Snapshot.t in action_types - assert len(actions) == 8 + assert len(actions) == 6 gpu = components[3] assert gpu['model'] == 'atom processor d4xx/d5xx/n4xx/n5xx integrated graphics controller' assert gpu['manufacturer'] == 'intel corporation' @@ -242,7 +227,7 @@ def test_snapshot_real_eee_1001pxd_with_rate(user: UserClient): assert em.BenchmarkRamSysbench.t in action_types assert em.StressTest.t in action_types assert em.Snapshot.t in action_types - assert len(action_types) == 6 + assert len(action_types) == 4 sound = components[4] assert sound['model'] == 'nm10/ich7 family high definition audio controller' sound = components[5] @@ -264,7 +249,7 @@ def test_snapshot_real_eee_1001pxd_with_rate(user: UserClient): assert em.TestDataStorage.t in action_types assert em.EraseBasic.t in action_types assert em.Snapshot.t in action_types - assert len(action_types) == 9 + assert len(action_types) == 7 erase = next(e for e in hdd['actions'] if e['type'] == em.EraseBasic.t) assert erase['endTime'] assert erase['startTime']