mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Add network traffic graph
This commit is contained in:
parent
9269d0e96e
commit
ce14345a89
13 changed files with 618 additions and 9 deletions
|
|
@ -223,3 +223,17 @@ Value getaddednodeinfo(const Array& params, bool fHelp)
|
|||
return ret;
|
||||
}
|
||||
|
||||
Value getnettotals(const Array& params, bool fHelp)
|
||||
{
|
||||
if (fHelp || params.size() > 0)
|
||||
throw runtime_error(
|
||||
"getnettotals\n"
|
||||
"Returns information about network traffic, including bytes in, bytes out,\n"
|
||||
"and current time.");
|
||||
|
||||
Object obj;
|
||||
obj.push_back(Pair("totalbytesrecv", static_cast< boost::uint64_t>(CNode::GetTotalBytesRecv())));
|
||||
obj.push_back(Pair("totalbytessent", static_cast<boost::uint64_t>(CNode::GetTotalBytesSent())));
|
||||
obj.push_back(Pair("timemillis", static_cast<boost::int64_t>(GetTimeMillis())));
|
||||
return obj;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue