VirtualBox

Ignore:
Timestamp:
Mar 26, 2009 11:12:53 PM (16 years ago)
Author:
vboxsync
Message:

VirtualBox: Add statistics for SCSI controllers in frontend

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp

    r17669 r18358  
    228228            << QString ("/Devices/SATA/Port%1/ReadBytes").arg (i)
    229229            << QString ("/Devices/SATA/Port%1/WrittenBytes").arg (i);
     230    }
     231
     232    /* SCSI HD statistics: */
     233    for (int i = 0; i < 16; ++ i)
     234    {
     235        /* Names */
     236        mNamesMap [QString ("/Devices/SCSI/%1/ReadBytes").arg (i)]
     237            = tr ("Data Read");
     238        mNamesMap [QString ("/Devices/SCSI/%1/WrittenBytes").arg (i)]
     239            = tr ("Data Written");
     240
     241        /* Units */
     242        mUnitsMap [QString ("/Devices/SCSI/%1/ReadBytes").arg (i)] = "B";
     243        mUnitsMap [QString ("/Devices/SCSI/%1/WrittenBytes").arg (i)] = "B";
     244
     245        /* Belongs to */
     246        mLinksMap [QString ("SCSI%1").arg (i)] = QStringList()
     247            << QString ("/Devices/SCSI/%1/ReadBytes").arg (i)
     248            << QString ("/Devices/SCSI/%1/WrittenBytes").arg (i);
    230249    }
    231250
     
    500519        }
    501520
     521        /* @todo Rework if more than one additional
     522         * controller is allowed.
     523         */
     524        const QString scsiCtl = QString("SCSI");
     525
     526        if (!m.GetStorageControllerByName(scsiCtl).isNull())
     527        {
     528            /* SCSI Hard Disks */
     529            for (int i = 0; i < 16; ++ i)
     530            {
     531                if (!m.GetHardDisk(scsiCtl, i, 0).isNull())
     532                {
     533                    hdStat += formatHardDisk (scsiCtl, i, 0,
     534                                              QString ("SCSI%1").arg (i));
     535                    hdStat += paragraph;
     536                }
     537            }
     538        }
     539
    502540        /* If there are no Hard Disks */
    503541        if (hdStat.isNull())
Note: See TracChangeset for help on using the changeset viewer.

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