Skip to content

Update/add MCB sensors and thresholds - #580

Closed
pawagh1 wants to merge 3 commits into
meta:mainfrom
pawagh1:MCB_Sensor_update
Closed

pawagh1 wants to merge 3 commits into
meta:mainfrom
pawagh1:MCB_Sensor_update

Conversation

@pawagh1

@pawagh1 pawagh1 commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor

This update refines the sensor_service.json configuration for the MCB to align with the latest threshold definitions and to remove deprecated or hidden sensor entries no longer in use.

Key highlights of this update:

  1. Removal of Deprecated Sensors:
    The following sensors were identified as obsolete and have been removed to maintain a clean and relevant sensor configuration:

    • MCB_P12V_BP_ADC0_A
    • MCB_P12V_BP_ADC0_B
  2. Threshold Definition Updates:
    Threshold parameters for existing sensors have been refreshed to the latest defined values. This includes updates to:

    • upperCriticalVal and lowerCriticalVal
    • Newly added maxAlarmVal and minAlarmVal where applicable
      These changes ensure accurate alarm triggering and improved monitoring reliability within expected operational ranges.

No new sensors were added as part of this update. Existing sensor attributes such as slotPath, sysfsPath, pmUnitName, and type remain consistent with previous configurations.

Test Plan:

  1. Confirm all sensors are enabled and reporting valid readings.
  2. Verify all sensor values are within the defined threshold limits.
  3. Ensure removed sensors (MCB_P12V_BP_ADC0_A, MCB_P12V_BP_ADC0_B) are not listed.

@meta-cla

meta-cla Bot commented Oct 9, 2025

Copy link
Copy Markdown

Hi @pawagh1!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@somasun

somasun commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

@pawagh1 - please take care of the CLA. Also, please take a look at other PRs in the repository for examples on detailed Summary and Test Plan.

@meta-cla meta-cla Bot added the CLA Signed label Oct 13, 2025
@meta-cla

meta-cla Bot commented Oct 13, 2025

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@somasun

somasun commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Can you please also add a Summary and TestPlan for this change? You can look at other PRs for examples

@meta-codesync

meta-codesync Bot commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

@somasun has imported this pull request. If you are a Meta employee, you can view this in D85884593.

@somasun

somasun commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

thanks for the test plan @pawagh1

@meta-codesync

meta-codesync Bot commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

@somasun merged this pull request in 0a1933f.

meta-codesync Bot pushed a commit that referenced this pull request Feb 19, 2026
Summary:
**Pre-submission checklist**
- [x] I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running `pip install -r requirements-dev.txt && pre-commit install`
- [x] `pre-commit run`

When building only a specific cmake target to save time, getdeps removes
the "built marker” under `$builddir/installed/fboss/.built-by-getdeps`,
which makes it impossible to subsequently run the unit tests as  without
this file getdeps bails out with `project fboss has not been built`.
What’s more, because of a missing `return` the exit code was 0, which
was confusing.
This fix ensures that the return code is propagated properly and also
improves the cmake test runner to automatically detect missing
executables and build them on the fly. This will not rebuild the test
binaries if they've already been built and are merely stale (because the
source code has changed) but that was already the prior behavior. At
least now it's possible to rebuild a single cmake test target and re-run
the tests in one shot.

Pull Request resolved: #722

Test Plan:
- Manually removed one unit test target, running `getdeps.py test` now can detect the missing test executables, and then rebuild such executables before running the tests
```
[root@5f196107a3a6 fboss]# ls -al /var/FBOSS/tmp_bld_dir/build/fboss/fboss2_cmd_test
-rwxr-xr-x 1 root root 116548584 Feb 17 20:48 /var/FBOSS/tmp_bld_dir/build/fboss/fboss2_cmd_test

[root@5f196107a3a6 fboss]# rm -rf /var/FBOSS/tmp_bld_dir/build/fboss/fboss2_cmd_test

[root@5f196107a3a6 fboss]# ./build/fbcode_builder/getdeps.py test --allow-system-packages --extra-cmake-defines='{"CMAKE_BUILD_TYPE": "MinSizeRel", "CMAKE_CXX_STANDARD": "20"}' --scratch-path /var/FBOSS/tmp_bld_dir --num-jobs 16 --src-dir . fboss
Testing ENV[BOOST_ROOT_1_69_0]: None
Building missing test executables: fboss2_cmd_test
...
+ cd /var/FBOSS/tmp_bld_dir/build/fboss && \
+ /usr/bin/cmake \
+      --build \
+      /var/FBOSS/tmp_bld_dir/build/fboss \
+      --target \
+      fboss2_cmd_test \
+      --config \
+      RelWithDebInfo \
+      -j \
+      16
[1/1] Linking CXX executable fboss2_cmd_test
 ---
...
103/689 Test #110: CmdShowAggregatePortTestFixture.queryClient ......................................................................................................   Passed    0.10 sec
        Start 141: CmdShowRouteDetailsTestFixture.queryClient
104/689 Test #113: CmdShowExampleTestFixture.queryClient ............................................................................................................   Passed    0.09 sec
        Start  94: CmdShowArpTestFixture.queryClient
105/689 Test #126: CmdShowInterfaceErrorsTestFixture.queryClient ....................................................................................................   Passed    0.10 sec
        Start  87: CmdSetPortStateTestFixture.enableOnePort
106/689 Test #129: CmdShowMirrorTestFixture.queryClientWithoutTunnel ................................................................................................   Passed    0.10 sec
        Start 123: CmdShowInterfaceCountersTestFixture.queryClient
...
100% tests passed, 0 tests failed out of 689

Total Test time (real) =  20.93 sec
```

- Confirmed the test executable was actually build, noticed timestamp of such binary is different than before
```
[root@5f196107a3a6 fboss]# ls -al /var/FBOSS/tmp_bld_dir/build/fboss/fboss2_cmd_test
-rwxr-xr-x 1 root root 116548584 Feb 17 22:26 /var/FBOSS/tmp_bld_dir/build/fboss/fboss2_cmd_test
```

- Now run the test command again when all the test binaries exist without any issue
```
[root@5f196107a3a6 fboss]# ./build/fbcode_builder/getdeps.py test --allow-system-packages --extra-cmake-defines='{"CMAKE_BUILD_TYPE": "MinSizeRel", "CMAKE_CXX_STANDARD": "20"}' --scratch-path /var/FBOSS/tmp_bld_dir --num-jobs 16 --src-dir . fboss
Testing ENV[BOOST_ROOT_1_69_0]: None
 ---
...
686/689 Test #578: ThriftStructNodeTestSuite.ThriftStructNodeRemovePathOnThriftMapTest<TestParams<true>> ............................................................   Passed    0.01 sec
687/689 Test #579: ThriftStructNodeTestSuite.ThriftStructNodeRemovePathOnThriftListTest<TestParams<true>> ...........................................................   Passed    0.01 sec
688/689 Test #580: ThriftStructNodeTestSuite.ThriftStructNodeRemovePathOnThriftSetTest<TestParams<true>> ............................................................   Passed    0.01 sec
689/689 Test #550: ThriftStructNodeTests.ThriftStructNodeSetAlreadyPublished ........................................................................................   Passed    0.18 sec

100% tests passed, 0 tests failed out of 689

Total Test time (real) =  21.00 sec
```

Reviewed By: bigfootjon

Differential Revision: D93524014

Pulled By: joseph5wu

fbshipit-source-id: d58055430e181f4efa6901985b7b2e7de4626a11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants