How to enable/disable bandwidth auto-suspension for several VPS in SolusVM?

Applicable to:

  • SolusVM

Question

How to enable bandwidth auto suspension for several VPS/nodes simultaneously in SolusVM?

Answer

This is possible only through direct change to SolusVM database:

  1. Access SolusVM Master node over SSH.

  2. Create backup of SolusVM Master database.

  3. Execute command below to enable bandwidth auto-suspension for all VPS of node with NODE_ID=29:

    # echo "update vservers set bwsuspend=1 where nodeid=29;" | awk -F: '{ system("MYSQL_PWD='"'"'" $3 "'"'"' mysql -u " $2 " "$1) }' /usr/local/solusvm/includes/solusvm.conf

    NODE_ID of a node can be found in SolusVM > Nodes > ID column.

    How to find NODE_ID

    NODEIDPNG.PNG

  4. Execute command below to enable bandwidth auto-suspension for specific VPS with ID 1224 and 1227:

    # echo "update vservers set bwsuspend=1 where vserverid in (1224,1227);" | awk -F: '{ system("MYSQL_PWD='"'"'" $3 "'"'"' mysql -u " $2 " "$1) }' /usr/local/solusvm/includes/solusvm.conf

    ID of VPS can be found in SolusVM > Virtual Servers > ID column.

    How to find ID

    VMID.PNG

To disable bandwidth auto-suspension change bwsuspend=1 to bwsuspend=0, for example:

# echo "update vservers set bwsuspend=0 where vserverid in (1224,1227);" | awk -F: '{ system("MYSQL_PWD='"'"'" $3 "'"'"' mysql -u " $2 " "$1) }' /usr/local/solusvm/includes/solusvm.conf

Articles in this section

Was this article helpful?
0 out of 0 found this helpful
Share

Comments

0 comments

Please sign in to leave a comment.