Code Monkey home page Code Monkey logo

guard's Introduction

GUARD

Guarding the system against failures by permanently isolating faulty units. guard records contains the permanently isolated components details. GUARD repository provides the libraries and tools to create/list/delete guard records

Building

Need meson and ninja. Alternatively, source an OpenBMC ARM/x86 SDK.

meson build && ninja -C build

To use power system device for guard FRU's.

meson build -Ddevtree=enabled && ninja -C build

To build libguard with verbose level to get required trace.
Supported verbose level:
0 - Emergency, 1 - Alert, 2 - Critical, 3 - Error, 4 - Warning, 5 - Notice, 6 - Info, 7 - Debug
By default verbose level is Error.

meson build -Dverbose=7 && ninja -C build

To run unit tests

Tests can be run in the CI docker container, or with an OpenBMC x86 sdk(see below for x86 steps).

meson -Doe-sdk=enabled -Dtests=enabled build
ninja -C build test

Usage of GUARD tool


guard --help
GUARD Tool
Usage: guard [OPTIONS]

Options:
  -h,--help                Guard CLI tool options
  -c,--create TEXT         Create Guard record, expects physical path as input
  -i,--invalidate FLOAT    Invalidate a single Guard record, expects record id
                           as input
  -I,--invalidate-all      Invalidates all the Guard records
  -l,--list                List all the GUARD'ed resources
  -r,--reset               Erase all the Guard records
  -v,--version             Version of GUARD tool

Note: Physical path can be fetched from device tree, using ATTR_PHYS_DEV_PATH attribute of the corresponding target. Physical path formats supported by guard tool:-

  • physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0
  • /sys-0/node-0/proc-0/mc-0/mi-0/mcc-0
  • sys-0/node-0/proc-0/mc-0/mi-0/mcc-0

Examples

  • To create a guard record.
guard -c sys-0/node-0/proc-0/mc-0/mi-0/mcc-0
Success
  • To list the guard records present in a system.
guard -l
ID       | ERROR    |  Type  | Path 
00000001 | 00000000 | manual | physical:sys-0/node-0/proc-0/mc-0/mi-0/mcc-0
  • To erase all the guard records
guard -r
  • To invalidate a single guard record
guard -i 1
  • To invalidate all the guard records
guard -I

guard's People

Contributors

rameshiyyar avatar devenrao avatar deepakala-k avatar geissonator avatar anoo1 avatar amitay avatar edtanous avatar mzipse avatar swarnendu-r-c avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.