Skip to content

Commands

neo3587 edited this page Oct 17, 2019 · 28 revisions

On most of the explanations, prof_name will be a substitute of any profile name, <parameter> will mean required and [parameter] will mean optional.

Commands list

dupmn profadd <prof_file> [prof_name]

Creates a new profile based on the specifications of the <prof_file>. If the <prof_file> doesn't have a COIN_SERVICE parameter, it will ask to create a service with the COIN_NAME for the main node (optional but recommended).

Parameters:

  • <prof_file> : Name of the file that contains the profile data, check Profile Creation to see the required and optional parameters of the profile file.
  • [prof_name] : Optional. Name that the new profile will have, if no name is given, it will use the COIN_NAME parameter of the profile file.

Usage examples:
(supposing that we have a profile file called AmazingCoin.dmn and COIN_NAME is AmazingCoin)
dupmn profadd AmazingCoin.dmn : now the new profile name will be AmazingCoin
dupmn profadd AmazingCoin.dmn amazing : now the new profile name will be amazing

dupmn profdel <prof_name>

Deletes an already installed profile with dupmn profadd, note that it will delete absolutely everything releated with the profile, included any installed dupe (if there's any installed, it will prompt a message asking if you're sure of deleting the profile).

Parameters:

  • <prof_name> : Name of the profile that will be deleted.

Usage examples:
dupmn profdel prof_name

dupmn install <prof_name> [params...]

Creates a new dupe based on the parameters of the profile, it will show some detailed info of the dupe after the installation is done (IP, port, rpc port, masternode private key, systemctl commands, etc). Created dupes will have a number assigned, using this command again will create another dupe with a higher number assigned.

Parameters:

  • <prof_name> : Name of the profile that will be used to create a new dupe.
  • [params...] : Optional. You can put any of the next parameters (or even some or them all):
    • -i IP, --ip=IP : Set a specific IPv4 or IPv6 for the node, if the IP can't be found in the system or it's already used then it will show a warning after the installation.
    • -r RPC, --rpcport=RPC : Set a specific port instead of letting the script to find one by itself, it must be between 1024 and 49451 and not in use, otherwise the installation will be cancelled.
    • -p KEY, --privkey=KEY : Set a specific masternode private key instead of letting the script to create a new one.
    • -b, --bootstrap : Use a bootstrap during the installation to completely skip the sync process (see dupmn bootstrap command).

Usage examples:

dupmn install prof_name
dupmn install prof_name --bootstrap
dupmn install prof_name -i 123.234.245.189
dupmn install prof_name --ip=2a02:4f8:202:2ec5::3 -p 4ycrW66otZHseJTLUYnAhNZbUqmTg563SMptopudegGaJUSspeQ
dupmn install prof_name -b --ip=123.234.245.189 --privkey=4ycrW66otZHseJTLUYnAhNZbUqmTg563SMptopudegGaJUSspeQ --rpcport=12333

dupmn reinstall <prof_name> <node> [params...]

Reinstalls a created dupe, works at the same way as dupmn install, the masternode private key won't change unless the optional parameter --privkey=PRIVATE_KEY is used.

Parameters:

  • <prof_name> : Name of the profile that will be used to reinstall the dupe.
  • <node> : Number of the dupe to reinstall.
  • [params...] : Optional. You can put any of the next parameters (or even some or them all):
    • -i IP, --ip=IP : Set a specific IPv4 or IPv6 for the node, if the IP can't be found in the system or it's already used then it will show a warning after the reinstallation.
    • -r RPC, --rpcport=RPC : Set a specific port instead of letting the script to find one by itself, it must be between 1024 and 49451 and not in use, otherwise the reinstallation will be cancelled.
    • -p KEY, --privkey=KEY : Set a specific masternode private key instead of letting the script to create a new one.
    • -b, --bootstrap : Use a bootstrap during the reinstallation to completely skip the sync process (see dupmn bootstrap command).

Usage examples:

dupmn reinstall prof_name 1
dupmn reinstall prof_name 2 --bootstrap
dupmn reinstall prof_name 3 -i 123.234.245.189
dupmn reinstall prof_name 1 --ip=2a02:4f8:202:2ec5::3 -p 4ycrW66otZHseJTLUYnAhNZbUqmTg563SMptopudegGaJUSspeQ
dupmn reinstall prof_name 2 -b --ip=123.234.245.189 --privkey=4ycrW66otZHseJTLUYnAhNZbUqmTg563SMptopudegGaJUSspeQ --rpcport=12333

dupmn uninstall <prof_name> <node...|all>

Uninstalls a created dupe, all the dupes with a higher number assigned (if there are any) will be pushed to fit the hole made by the uninstallation (uninstalling the dupe 1, will make the dupe 2 to become the 1, the 3 to become the 2, the 4 to become the 3, etc).

Parameters:

  • <prof_name> : Name of the profile used to uninstall the dupe.
  • <node...|all> : Number of the dupe/s that will be uninstalled. Optionally you can put all instead of a number to uninstall all the dupes of the profile.

Usage examples:
dupmn uninstall prof_name 1
dupmn uninstall prof_name 2
dupmn uninstall prof_name 1 3 4
dupmn uninstall prof_name all

dupmn bootstrap <prof_name> <node_1> <node_2>

Makes a copy of the blockchain from the node_1 to the node_2, so the node_2 gets instantly synced (also it's useful if the selected dupe is in the wrong chain, so it gets the right chain). Both nodes will be temporary stopped during the copy process and reactivated (unless they were already stopped) when the process is done. You can use the main node too (number 0), but requires it to be stopped or to have a COIN_SERVICE parameter in the profile.

Parameters:

  • <prof_name> : Name of the profile used for the bootstrap.
  • <node_1> : Number of the node that will be used to make a copy.
  • <node_2> : Number of the node that will receive a copy of the blockchain.

Usage examples:
dupmn bootstrap prof_name 0 1 : copy main node chain to dupe 1 dupmn bootstrap prof_name 1 2 : copy dupe 1 chain to dupe 2
dupmn bootstrap prof_name 1 0 : copy dupe 1 chain to main node

dupmn iplist

Shows the IPv4 and IPv6 addresses of the VPS, their netmask and the interface where they belong.

dupmn ipadd <ip> <netmask> [interface]

Adds a new IP with the given parameters, note that you may be limited by the VPS provider, your interfaces can be seen with dupmn iplist.

Parameters:

  • <ip> : An IPv4 or IPv6.
  • <netmask> : The netmask, represented as a number (from 0 to 32 for IPv4 or 0 to 128 for IPv6) or as a IP-like (ex: 255.255.255.0).
  • [interface] : Interface name (usually eth0 or ens3), not required if there's just one available interface.

Usage Examples
dupmn ipadd 194.58.1.76 24 eth0
dupmn ipadd 194.58.1.76 255.255.255.0 ens3
dupmn ipadd 2001:db8:fe80::1 64 eth0

dupmn ipdel <ip> <netmask> [interface]

Deletes an IP with the given parameters, you can check your current IPs with dupmn iplist.

Parameters:

  • <ip> : An IPv4 or IPv6.
  • <netmask> : The netmask, represented as a number (from 0 to 32 for IPv4 or 0 to 128 for IPv6) or as a IP-like (ex: 255.255.255.0).
  • [interface] : Interface name (usually eth0 or ens3), not required if there's just one available interface.

Usage Examples
dupmn ipdel 194.58.1.76 24 eth0
dupmn ipdel 194.58.1.76 255.255.255.0 ens3
dupmn ipdel 2001:db8:fe80::1 64 eth0

dupmn rpcchange <prof_name> <node> [port]

Changes the rpc port of a dupe, this is only in case that by chance it causes a conflict with another application/node that uses the same port.
Note: The rpc port is the one used to send commands to the wallet, not the one used to get communicated with the network.
Note 2: only the ports within the range between 1024 and 49451 will be used, ports from 0 to 1023 are reserved and from 49452 to 65535 are ephemeral.

Parameters:

  • <prof_name> : Name of the profile used for the rpc port change.
  • <node> : Number of the dupe that will have the port changed.
  • [port] : Optional. Number of the port that the dupe will be use, if no port is provided, it will look for an available port.

Usage examples:
dupmn rpcchange prof_name 1
dupmn rpcchange prof_name 1 12333

dupmn systemctlall <prof_name> <command>

Applies a systemctl command to all the dupes services, if the profile has the COIN_SERVICE parameter, it will be applied to the main node too.

Parameters:

  • <prof_name> : Name of the profile used to apply a command.
  • <command> : The command that will be applied.

Usage examples:
dupmn systemctlall prof_name start
dupmn systemctlall prof_name stop
dupmn systemctlall prof_name restart

dupmn list [prof_names...] [params...]

Shows the count of created dupes of each added profile.

Parameters:

  • [prof_names...] : Optional. If a profile name is provided, it will show a extended info list (MN is online, MN status, IP:PORT, rpc port and privkey) of every MN that uses this profile, you can put multiple profile names.
  • [params...] : Optional. You can put any of the next parameters (or even some or them all):
    • -a, --all : Use all the available params below.
    • -o, --online : Show if the node is active or not.
    • -b, --blockcount : Show the current block number.
    • -s, --status : Show the masternode status message.
    • -i, --ip : Show the ip and port.
    • -r, --rpcport : Show the rpc port.
    • -p, --privkey : Show the masternode private key.

Usage example:
dupmn list
dupmn list prof_name
dupmn list prof_name_1 prof_name_2
dupmn list --all
dupmn list prof_name -a
dupmn list prof_name_1 prof_name_2 --ip --status
dupmn list prof_name_1 prof_name_2 prof_name_3 -i -s

dupmn swapfile <size_in_mbytes>

Creates a swapfile (virtual memory file in the hard disk) to avoid Out-Of-Memory errors if there's not enough RAM to handle all the hosted dupes.

Parameters:

  • <size_in_mbytes> : Size in MB that the swapfile will have (if the value is 0, the swapfile will be deleted).

Usage example:
dupmn swapfile 512 : 512MB swapfile
dupmn swapfile 1024 : 1GB swapfile

dupmn checkmem

Shows the RAM usage (in %) of each node group.

dupmn help

Shows all the available commands.

dupmn update

Checks if there's a available update of the dupmn script and updates it if it's the case.