.TH "LIGHTNING-PING" "7" "" "" "lightning-ping"
.SH NAME
lightning-ping - Command to check if a node is up\.
.SH SYNOPSIS
\fB ping\fR \fI id\fR [len] [pongbytes]
.SH DESCRIPTION
The \fB ping\fR command checks if the node with \fI id\fR is ready to talk\. It accepts the following parameters:
.RS
.IP \[ bu]
\fI id\fR : A string that represents the node id;
.IP \[ bu]
\fI len\fR : A integer that represents the length of the ping (default 128);
.IP \[ bu]
\fI pongbytes\fR : An integer that represents the length of the reply (default 128)\.
.RE
.SH EXAMPLE JSON REQUEST
.nf
.RS
{
"id": 82,
"method": "ping",
"params": {
"len": 128,
"pongbytes": 128
}
}
.RE
.fi
.SH RETURN VALUE
On success, the command will return an object with a single string\.
.RS
.IP \[ bu]
\fI totlen\fR : A string that represents the answer length of the reply message (including header)
.RE
On failure, one of the following error codes may be returned:
.RS
.IP \[ bu]
-32602: Error in given parameters or unknown peer\.
.RE
.SH EXAMPLE JSON RESPONSE
.nf
.RS
{
"totlen": 132
}
.RE
.fi
.SH AUTHOR
Vincenzo Palazzo \fI <vincenzo.palazzo@protonmail.com\fR > wrote the initial version of this man page, but many others did the hard work of actually implementing this rpc command\.
.SH SEE ALSO
\fB lightning-connect\fR (7)
.SH RESOURCES
Main web site: \fI https://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:eac5506bc761a2a9570a92c7e533b4c6ba72c56c4d69dce773887a9f88ea7ac2