VirtualBox

Changeset 94181 in vbox for trunk


Ignore:
Timestamp:
Mar 11, 2022 4:55:03 PM (3 years ago)
Author:
vboxsync
Message:

doc/manual,FE/VBoxManage: Convert bandwidthctl command to refentry documentation, bugref:9186

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/Config.kmk

    r94179 r94181  
    6565        man_VBoxManage-adoptstate.xml \
    6666        man_VBoxManage-closemedium.xml \
    67         man_VBoxManage-storagectl.xml
     67        man_VBoxManage-storagectl.xml \
     68        man_VBoxManage-bandwidthctl.xml
    6869
    6970## List of user manual XML files.
  • trunk/doc/manual/en_US/man_VBoxManage-bandwidthctl.xml

    r92984 r94181  
    2020<refentry id="vboxmanage-bandwidthctl" lang="en">
    2121  <refentryinfo>
    22     <pubdate>September 2019</pubdate>
     22    <pubdate>$Date$</pubdate>
    2323    <title>VBoxManage bandwidthctl</title>
    2424  </refentryinfo>
     
    3232    <refname>VBoxManage-bandwidthctl</refname>
    3333    <refpurpose>manage bandwidth groups</refpurpose>
    34     <refclass>Oracle VM VirtualBox</refclass>
     34    <refclass>&product-name;</refclass>
    3535  </refnamediv>
    3636
  • trunk/doc/manual/en_US/user_VBoxManage.xml

    r94180 r94181  
    927927  <xi:include href="user_man_VBoxManage-storagectl.xml"    xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    928928
    929   <sect1 id="vboxmanage-bandwidthctl">
    930 
    931     <title>VBoxManage bandwidthctl</title>
    932 
    933     <para>
    934       This command creates, deletes, modifies, and shows bandwidth
    935       groups of the given virtual machine.
    936     </para>
    937 
    938 <screen>VBoxManage bandwidthctl    &lt;uuid|vmname&gt;
    939                            add &lt;name&gt; --type disk|network --limit &lt;MBps&gt;[k|m|g|K|M|G] |
    940                            set &lt;name&gt; --limit &lt;MBps&gt;[k|m|g|K|M|G] |
    941                            remove &lt;name&gt; |
    942                            list [--machinereadable]</screen>
    943 
    944     <para>
    945       The following subcommands are available:
    946     </para>
    947 
    948     <itemizedlist>
    949 
    950       <listitem>
    951         <para>
    952           <command>add</command>: Creates a new bandwidth group of a
    953           given type.
    954         </para>
    955       </listitem>
    956 
    957       <listitem>
    958         <para>
    959           <command>set</command>: Modifies the limit for an existing
    960           bandwidth group.
    961         </para>
    962       </listitem>
    963 
    964       <listitem>
    965         <para>
    966           <command>remove</command>: Deletes a bandwidth group.
    967         </para>
    968       </listitem>
    969 
    970       <listitem>
    971         <para>
    972           <command>list</command>: Shows all bandwidth groups defined
    973           for the given VM. Use the
    974           <computeroutput>--machinereadable</computeroutput> option to
    975           produce the same output, but in machine readable format. This
    976           is of the form: name="value" on a line by line basis.
    977         </para>
    978       </listitem>
    979 
    980     </itemizedlist>
    981 
    982     <para>
    983       The parameters are as follows:
    984     </para>
    985 
    986     <variablelist>
    987 
    988       <varlistentry>
    989         <term>
    990           <computeroutput>uuid|vmname</computeroutput>
    991         </term>
    992 
    993         <listitem>
    994           <para>
    995             The VM UUID or VM Name. Mandatory.
    996           </para>
    997         </listitem>
    998       </varlistentry>
    999 
    1000       <varlistentry>
    1001         <term>
    1002           <computeroutput>--name</computeroutput>
    1003         </term>
    1004 
    1005         <listitem>
    1006           <para>
    1007             Name of the bandwidth group. Mandatory.
    1008           </para>
    1009         </listitem>
    1010       </varlistentry>
    1011 
    1012       <varlistentry>
    1013         <term>
    1014           <computeroutput>--type</computeroutput>
    1015         </term>
    1016 
    1017         <listitem>
    1018           <para>
    1019             Type of the bandwidth group. Mandatory. Two types are
    1020             supported: <computeroutput>disk</computeroutput> and
    1021             <computeroutput>network</computeroutput>. See
    1022             <xref linkend="storage-bandwidth-limit" /> or
    1023             <xref linkend="network_bandwidth_limit" /> for the
    1024             description of a particular type.
    1025           </para>
    1026         </listitem>
    1027       </varlistentry>
    1028 
    1029       <varlistentry>
    1030         <term>
    1031           <computeroutput>--limit</computeroutput>
    1032         </term>
    1033 
    1034         <listitem>
    1035           <para>
    1036             Specifies the limit for the given bandwidth group. This can
    1037             be changed while the VM is running. The default unit is
    1038             megabytes per second. The unit can be changed by specifying
    1039             one of the following suffixes:
    1040             <computeroutput>k</computeroutput> for kilobits per second,
    1041             <computeroutput>m</computeroutput> for megabits per second,
    1042             <computeroutput>g</computeroutput> for gigabits per second,
    1043             <computeroutput>K</computeroutput> for kilobytes per second,
    1044             <computeroutput>M</computeroutput> for megabytes per second,
    1045             <computeroutput>G</computeroutput> for gigabytes per second.
    1046           </para>
    1047         </listitem>
    1048       </varlistentry>
    1049 
    1050     </variablelist>
    1051 
    1052     <note>
    1053       <para>
    1054         The network bandwidth limits apply only to the traffic being
    1055         sent by virtual machines. The traffic being received by VMs is
    1056         unlimited.
    1057       </para>
    1058     </note>
    1059 
    1060     <note>
    1061       <para>
    1062         To remove a bandwidth group it must not be referenced by any
    1063         disks or adapters in the running VM.
    1064       </para>
    1065     </note>
    1066 
    1067   </sect1>
     929  <xi:include href="user_man_VBoxManage-bandwidthctl.xml"  xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    1068930
    1069931  <sect1 id="vboxmanage-showmediuminfo">
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp

    r94179 r94181  
    252252#endif
    253253    { "extpack",            USAGE_S_NEWCMD,      HELP_CMD_EXTPACK, handleExtPack,              0 },
    254     { "bandwidthctl",       USAGE_BANDWIDTHCONTROL, VBMG_CMD_TODO, handleBandwidthControl,     0 },
     254    { "bandwidthctl",       USAGE_S_NEWCMD, HELP_CMD_BANDWIDTHCTL, handleBandwidthControl,     0 },
    255255    { "debugvm",            USAGE_S_NEWCMD,      HELP_CMD_DEBUGVM, handleDebugVM,              0 },
    256256    { "convertfromraw",     USAGE_CONVERTFROMRAW,   VBMG_CMD_TODO, handleConvertFromRaw,       VBMG_CMD_F_NO_COM },
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h

    r94179 r94181  
    132132    USAGE_I_SETHDPARENTUUID,
    133133    USAGE_I_PASSWORDHASH,
    134     USAGE_BANDWIDTHCONTROL,
    135134    USAGE_I_GUESTSTATS,
    136135    USAGE_I_REPAIRHD,
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageBandwidthControl.cpp

    r93705 r94181  
    109109        };
    110110
     111    setCurrentSubcommand(HELP_SCOPE_BANDWIDTHCTL_ADD);
    111112
    112113    Bstr name(a->argv[2]);
     
    158159            default:
    159160            {
    160                 errorGetOpt(USAGE_BANDWIDTHCONTROL, c, &ValueUnion);
     161                errorGetOpt(c, &ValueUnion);
    161162                rc = E_FAIL;
    162163                break;
     
    196197        };
    197198
     199    setCurrentSubcommand(HELP_SCOPE_BANDWIDTHCTL_SET);
    198200
    199201    Bstr name(a->argv[2]);
     
    229231            default:
    230232            {
    231                 errorGetOpt(USAGE_BANDWIDTHCONTROL, c, &ValueUnion);
     233                errorGetOpt(c, &ValueUnion);
    232234                rc = E_FAIL;
    233235                break;
     
    258260static RTEXITCODE handleBandwidthControlRemove(HandlerArg *a, ComPtr<IBandwidthControl> &bwCtrl)
    259261{
     262    setCurrentSubcommand(HELP_SCOPE_BANDWIDTHCTL_REMOVE);
     263
    260264    Bstr name(a->argv[2]);
    261265    CHECK_ERROR2I_RET(bwCtrl, DeleteBandwidthGroup(name.raw()), RTEXITCODE_FAILURE);
     
    276280    };
    277281
     282    setCurrentSubcommand(HELP_SCOPE_BANDWIDTHCTL_LIST);
    278283    VMINFO_DETAILS enmDetails = VMINFO_STANDARD;
    279284
     
    290295                break;
    291296            default:
    292                 return errorGetOpt(USAGE_BANDWIDTHCONTROL, c, &ValueUnion);
     297                return errorGetOpt(c, &ValueUnion);
    293298        }
    294299    }
     
    313318
    314319    if (a->argc < 2)
    315         return errorSyntax(USAGE_BANDWIDTHCONTROL, BWControl::tr("Too few parameters"));
     320        return errorSyntax(BWControl::tr("Too few parameters"));
    316321    else if (a->argc > 7)
    317         return errorSyntax(USAGE_BANDWIDTHCONTROL, BWControl::tr("Too many parameters"));
     322        return errorSyntax(BWControl::tr("Too many parameters"));
    318323
    319324    /* try to find the given machine */
     
    356361    else
    357362    {
    358         errorSyntax(USAGE_BANDWIDTHCONTROL, BWControl::tr("Invalid parameter '%s'"), a->argv[1]);
     363        errorSyntax(BWControl::tr("Invalid parameter '%s'"), a->argv[1]);
    359364        rc = E_FAIL;
    360365    }
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r94179 r94181  
    625625                     "\n", SEP);
    626626
    627     if (enmCommand == USAGE_BANDWIDTHCONTROL || enmCommand == USAGE_S_ALL)
    628         RTStrmPrintf(pStrm,
    629                            "%s bandwidthctl %s    <uuid|vmname>\n"
    630                      "                            add <name> --type disk|network\n"
    631                      "                                --limit <megabytes per second>[k|m|g|K|M|G] |\n"
    632                      "                            set <name>\n"
    633                      "                                --limit <megabytes per second>[k|m|g|K|M|G] |\n"
    634                      "                            remove <name> |\n"
    635                      "                            list [--machinereadable]\n"
    636                      "                            (limit units: k=kilobit, m=megabit, g=gigabit,\n"
    637                      "                                          K=kilobyte, M=megabyte, G=gigabyte)\n"
    638                      "\n", SEP);
    639 
    640627    if (enmCommand == USAGE_SHOWMEDIUMINFO || enmCommand == USAGE_S_ALL)
    641628        RTStrmPrintf(pStrm,
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