# Node Operation Commands

These commands will get access to the information that belongs to the Miyabi node. All commands are online commands.

# get info

# Usage

Usage: miyabi-cli getinfo [Options]

Options:
  --help  Show help information

# Functionality

General command that returns the node status and information. The height here is the current height of the connected node, which could be lower or higher due to network latency.

# Example

$ ./miyabi-cli getinfo
{"name":"026beca06739461a20249fd4b24cf27542013624d18710bc418e8de10d6ef68568","version":"3.1.1","status":"Running","startTime":"2022-06-21T17:59:46.1688632+09:00","height":1,"mempoolSize":0,"identity":"026beca06739461a20249fd4b24cf27542013624d18710bc418e8de10d6ef68568","networkIdentity":"03ea7014d880a711d82cb41a53f2df6138739f4fb904aca2fa22998d4efe9db7be","role":"Consensus","connections":[],"dbStats":"\n** DB Stats **\nUptime(secs): 7.2 total, 5.4 interval\nCumulative writes: 2 writes, 115 keys, 2 commit groups, 0.7 writes per commit group, ingest: 0.00 GB, 0.00 MB/s\nCumulative WAL: 2 writes, 0 syncs, 2.00 writes per sync, written: 0.00 GB, 0.00 MB/s\nCumulative stall: 00:00:0.000 H:M:S, 0.0 percent\nInterval writes: 1 writes, 24 keys, 1 commit groups, 0.5 writes per commit group, ingest: 0.00 MB, 0.00 MB/s\nInterval WAL: 1 writes, 0 syncs, 1.00 writes per sync, written: 0.00 MB, 0.00 MB/s\nInterval stall: 00:00:0.000 H:M:S, 0.0 percent\n","extensions":["Miyabi.BLS","Miyabi.Binary","Miyabi.Asset","Miyabi.Entity","Miyabi.Contract","Miyabi.NFT","Miyabi.PrivateData"]}

# get all info

# Usage

Usage: miyabi-cli getallinfo [Options]

Options:
  --help  Show help information

# Functionality

General command that returns the brief information of all nodes in the sdk config (hosts).

# Example

$ ./miyabi-cli --config cli_config.json getallinfo
name                                                                host (rpc)               status   height  mempool  address       role
------------------------------------------------------------------  -----------------------  -------  ------  -------  ------------  ---------
026beca06739461a20249fd4b24cf27542013624d18710bc418e8de10d6ef68568  https://127.0.0.1:9010/  Running  28      0        026beca06739  Consensus
02fce59e2dd0015bbb34da445f6c3a4ac2254a1b90ffa9c66fbd8621bf0c1a6deb  https://127.0.0.1:9011/  Running  28      0        02fce59e2dd0  Consensus
025e50e24dd813cc8fe1a7566074cbff7cf9b80f9782d0360d570f92e4975b1532  https://127.0.0.1:9012/  Running  27      0        025e50e24dd8  App
033abce4dbb0e1c60dd5bdc86d769d9830ef0a3dc874f0ceb57390d90cc710a1ea  https://127.0.0.1:9013/  Running  28      0        033abce4dbb0  App
02c7aa830580dd915de7f4700cc44c2aff3a303aa31715db406c1e1c56525266d9  https://127.0.0.1:9014/  Running  28      0        02c7aa830580  App

# get consensus credentials

# Usage

Usage: miyabi-cli getconsensuscredentials [Options]

Options:
  --help                Show help information
  -h|--height <number>  Height

# Functionality

General command that returns all consensus nodes credentials for a specific height. If -h is not specified, the command directly returns the credentials of the current height of the connected node.

# Example


$ ./miyabi-cli getconsensuscredentials
{"members":["026beca06739461a20249fd4b24cf27542013624d18710bc418e8de10d6ef68568"],"quorumCredentials":[]} 

# get peer count

# Usage

Usage: miyabi-cli getpeercount [Options]

Options:
  --help  Show help information

# Functionality

General command that returns the number of nodes that the current node is connected to.

# Example


$ ./miyabi-cli getpeercount
4

# get peers

# Usage

Usage: miyabi-cli getpeers [Options]

Options:
  --help  Show help information

# Functionality

General command that returns the credentials of nodes that the current node is connected to

# Example


$ ./miyabi-cli getpeers
["033abce4dbb0e1c60dd5bdc86d769d9830ef0a3dc874f0ceb57390d90cc710a1ea","025e50e24dd813cc8fe1a7566074cbff7cf9b80f9782d0360d570f92e4975b1532","02fce59e2dd0015bbb34da445f6c3a4ac2254a1b90ffa9c66fbd8621bf0c1a6deb"]

# get performance

# Usage

Usage: miyabi-cli getperformance [Options]

Options:
  --help  Show help information

# Functionality

General command that gets the performance data of the node

# Example


$ ./miyabi-cli getperformance
{"statsStartHeight":462,"txPerBlock":{"max":83,"min":1,"avg":1.5526315789473695,"movAvg":1.0000170307924798,"sum":1475},"tps":{"max":41,"min":0,"avg":0.12539515279241306,"movAvg":1.6851953691384713E-05},"confTimeMs":{"max":339080371,"min":328,"avg":5182371.995785031,"movAvg":2099849.951629233}}

# get node config

# Usage

Usage: miyabi-cli getnodeconfig [Options]

Options:
  --help  Show help information

# Functionality

Admin command that gets the current node configuration of the node. Must specify the admin endpoint in the config and specify the client certificate by -cc.

# Example


$ ./miyabi-cli --host https://localhost:8000 -ins -cc admin.p12 getnodeconfig
{"bindings":["0.0.0.0:3820"],"initialNodes":[],"nodeAdmin":"03046bf1185537b4fc97fd8eab74c5e08cbe306aa7c394de812a8c1b6abcc2e5a4","sslKeyStorePath":"c:\\ssl.p12","consensusKeyStorePath":"c:\\consensuskey.p12","dbConfig":{"baseLocation":"c:\\_configs\\node_000","storageCacheSizeMb":64,"storageCompressedCacheSizeMb":64,"storagePointLookupBlockCacheSizeMb":8},"generalWebApiConfig":{"webApiEndPoint":"https://+:9010/","serverKeyStorePath":"c:\\server.p12"},"adminWebApiConfig":{"webApiEndPoint":"https://+:8000/","serverKeyStorePath":"c:\\server.p12"},"consensus":{"timeout":"00:00:10","interval":"00:00:04"},"busyWaitTransactions":false,"waitForTx":"00:00:00","memoryPoolCapacity":1048576,"maxGetBlockSize":5,"maxBlockDepth":100,"extensions":[]}