VirtualBox

Changeset 61347 in vbox


Ignore:
Timestamp:
May 31, 2016 4:32:35 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107642
Message:

Main: reduce the occurrence of certain messages to max 1/minute

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

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

    r60054 r61347  
    725725        if (SUCCEEDED(hrc))
    726726        {
    727             LogRel(("Failed to collect network metrics for %s: %Rrc (%d).\n", mInterfaceName.c_str(), mRc, mRc));
     727            static uint64_t s_tsLogRelLast;
     728            uint64_t tsNow = RTTimeSystemMilliTS();
     729            if (tsNow - s_tsLogRelLast > RT_MS_1MIN)
     730            {
     731                s_tsLogRelLast = tsNow;
     732                LogRel(("Failed to collect network metrics for %s: %Rrc (%d). Max one msg/min.\n", mInterfaceName.c_str(), mRc, mRc));
     733            }
    728734            mRc = VINF_SUCCESS;
    729735        }
  • trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp

    r61086 r61347  
    402402            if (ksAdapter == 0)
    403403            {
    404                 LogRel(("Failed to get network statistics for %s\n", name));
     404                static uint64_t s_tsLogRelLast;
     405                uint64_t tsNow = RTTimeSystemMilliTS();
     406                if (tsNow - s_tsLogRelLast > RT_MS_1MIN)
     407                {
     408                    s_tsLogRelLast = tsNow;
     409                    LogRel(("Failed to get network statistics for %s. Max one msg/min.\n", name));
     410                }
    405411                return VERR_INTERNAL_ERROR;
    406412            }
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