From 93aa449c6cee281454fa6c711d4c66d06c7973ff Mon Sep 17 00:00:00 2001 From: "Artyom V. Poptsov" Date: Tue, 3 Jan 2017 20:47:32 +0300 Subject: doc/api-shell.texi: Add an example for 'loadavg' --- doc/api-shell.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc') diff --git a/doc/api-shell.texi b/doc/api-shell.texi index 49b7225..e16c075 100644 --- a/doc/api-shell.texi +++ b/doc/api-shell.texi @@ -80,4 +80,19 @@ result and a return code. @deffn {Scheme Procedure} loadavg session Get average load of a host using a @var{session}. Return a list of five elements as described in proc(5) man page. + +Example: + +@lisp +(use-modules (ssh session) + (ssh auth) + (ssh shell)) + +(let ((s (make-session #:host "example.org"))) + (connect! s) + (userauth-agent! s) + (loadavg s)) +@result{} ("0.01" "0.05" "0.10" "4/1927" "242011") +@end lisp + @end deffn -- cgit v1.2.3