This documentation relates to an earlier version of JeraSoft VCS.
View User Guide 3.24 or visit our current documentation home page.
Skip to end of metadata
Go to start of metadata
On this page

This section describes shell tools required for management of the system at the very system level. All these tools are shipped with the VCS distributive. You need to use SSH or direct access to the server in order to run any of these tools. Please notice that most of given tools require "root" access and show inline help when run without arguments.


Please use these tools only if you have clear understanding of what you are doing. Misuse of the tools may cause improper function of the system. 

Requirements Checker

The tool is aimed to check minimal requirements and security recommendations at your server before and after installation. 


The tool should be run under "root" permissions without any arguments. When the tool is run it will perform a list of checks and show results for each of them. Use it:

  1. Before installation of the VCS to check minimal hardware and software requirements. At this stage you may download the tool separately from the VCS.
  2. After installation of the VCS to check security recommendations. Usually you will need to tune your firewall settings according to the JeraSoft Billing First Steps.

Please Note!

The tool checks only minimal requirements. Real hardware requirements highly depend on your traffic and deployment model.

Services Manager

The tool is used for managing the VCS Services. It allows you to correctly start, stop, get status of the VCS Services like RADIUS Server, SIP Server, Calculator, etc.

/usr/local/vcs/bin/service <service-name> <action> [<options>]

The tool should be run under "root" or "vcs" user. Service manager takes 2 arguments:

Short name of the service. Run the tool without arguments to get list of the services at your system. 

Action to perform, one of the following:

  • start - start the service
  • stop - stop the service
  • restart - stop and then start the service
  • reload - force config re-read without restart
  • status - return current status of the tool

Additionally you may pass next options:

Specify the VCS location. Only if different from /usr/local/vcs.
Specify user the VCS runs under. Only if different from "vcs".


For your convenience there are some examples below:

Restart RADIUS Server
/usr/local/vcs/bin/service bbradiusd restart
Start Files Downloader
/usr/local/vcs/bin/service files_downloader start
Get status of SIP Server
/usr/local/vcs/bin/bbsipd status

The tool also complies with LSB Init Scripts standard. It allows you to analyse exit code of each action in case of automated usage.

Cluster Manager

The tool is used to manage cluster. It allows to init the cluster, add more slaves, promote slave to master, etc. 

/usr/local/vcs/bin/cluster <command> [<options>]

The tool requires "root" permissions. Cluster Manager takes command as mandatory argument and additional options. Some of commands may be run only on Master and others only on Slave. All extra options for the commands are explained below in the corresponding subsection.

Master: Add new Slave

The command is run on the Master and used for:

  • first time initialisation of the cluster;
  • addition of the new slave node to the cluster;
  • addition of the old master to work as slave after failover.

/usr/local/vcs/bin/cluster init --master-ip=<IP-of-master> --slave-ip=<IP-of-slave> [<extra-options>]

This command encapsulates 4 sub-commands:

  • configuration of the Master to ship replication logs (init-master)
  • configuration of the Master to accept connections from the Slave (init-master-access)
  • configuration of the Slave to receive replication logs (init-slave)
  • show status of the cluster (status).

Each of this commands may be performed separately if you know exactly what you need.

Slave: Promote to Master

The command is run on the Slave and used to promote current Slave to Master

/usr/local/vcs/bin/cluster promote [<extra-options>]

The command is used for failover. After you fix old Master you may add it as new Slave using "init" command.

In case when you have more than 2 nodes in cluster, you need to re-init all other slaves from this new Master.

Slave: Sync Files

The command is run on the Slave and used to synchronise files from the Master. The command is mostly used in crontab for auto-sync.

/usr/local/vcs/bin/cluster sync-files --master-ip=<IP-of-master> [<extra-options>]

During initialisation of the cluster tool adds this command to the crontab (/etc/cron.d/vcs-cluster) at the Slave node. 

Cluster Status

The command may be run on any node and used to get status of the cluster. 

/usr/local/vcs/bin/cluster status

When command is run on the Master it shows type of the node and attached Slaves, that are up to date:

Status: MASTER
Slave: <ip-address> [xlog: <last-xlog>]

When command is run on the Slave it shows type of the node and status of synchronisation.

Status: SLAVE [in-sync]

In case when the Slave is not in synchronisation (NOT-in-sync) with the Master you need to re-initialise.

Options Reference

Some of commands may require additional options:

OptionDescriptionDefaultUse with
IP Address of the master server
init, sync-files
SSH Port at the master server
init, sync-files
Path to PostgreSQL data folder
IP Address of the slave server
SSH Port at the slave server
Login to the slave server
Path of PostgreSQL data folder
same as at master
Path to the VCS location
init, promote, sync-files
Show status in JSON format 
  • No labels