VirtualBox

Ignore:
Timestamp:
Sep 28, 2012 6:36:09 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80986
Message:

Main/Metrics: Missing interface detection (#6345)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/Performance.cpp

    r43453 r43456  
    663663void HostNetworkLoadRaw::preCollect(CollectorHints& /* hints */, uint64_t /* iTick */)
    664664{
     665    if (RT_FAILURE(mRc))
     666    {
     667        ComPtr<IHostNetworkInterface> networkInterface;
     668        ComPtr<IHost> host = getObject();
     669        HRESULT hrc = host->FindHostNetworkInterfaceByName(com::Bstr(mInterfaceName).raw(), networkInterface.asOutParam());
     670        if (SUCCEEDED(hrc))
     671        {
     672            LogRel(("Failed to collect network metrics for %s: %Rrc (%d).", mInterfaceName.c_str(), mRc, mRc));
     673            mRc = VINF_SUCCESS;
     674        }
     675    }
    665676}
    666677
     
    669680    uint64_t rx, tx, speed;
    670681
    671     int rc = mHAL->getRawHostNetworkLoad(mInterfaceName.c_str(), &rx, &tx, &speed);
    672     if (RT_SUCCESS(rc))
     682    mRc = mHAL->getRawHostNetworkLoad(mInterfaceName.c_str(), &rx, &tx, &speed);
     683    if (RT_SUCCESS(mRc))
    673684    {
    674685        uint64_t rxDiff = rx - mRxPrev;
     
    691702        mTxPrev = tx;
    692703    }
     704    else
     705        LogFlowThisFunc(("Failed to collect data: %Rrc (%d)."
     706                         " Will update the list of interfaces...\n", mRc,mRc));
    693707}
    694708
     
    12791293            if (patternMatch((*it).second.c_str(), name.c_str()))
    12801294            {
    1281                 LogFlowThisFunc(("...found!\n"));
     1295                //LogFlowThisFunc(("...found!\n"));
    12821296                return true;
    12831297            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette