1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
|
.\" Man page generated from reStructuredText.
.
.TH LABGRID-CLIENT 1 "2017-04-15" "0.0.1" "embedded testing"
.SH NAME
labgrid-client \- labgrid-client interface to control boards
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.sp
\fBlabgrid\-client\fP \fB\-\-help\fP
.sp
\fBlabgrid\-client\fP \-p <place> <command>
.sp
\fBlabgrid\-client\fP \fBplaces|resources\fP
.SH DESCRIPTION
.sp
Labgrid is a scalable infrastructure and test architecture for embedded (linux) systems.
.sp
This is the client to control a boards status and interface with it on remote machines.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-h\fP,\fB \-\-help
display command line help
.TP
.BI \-p \ PLACE\fP,\fB \ \-\-place \ PLACE
specify the place to operate on
.TP
.B \-x\fP,\fB \-\-crossbar\-url
the crossbar url of the coordinator, defaults to \fBws://127.0.0.1:20408/ws\fP
.TP
.BI \-c \ CONFIG\fP,\fB \ \-\-config \ CONFIG
set the configuration file
.TP
.BI \-s \ STATE\fP,\fB \ \-\-state \ STATE
set an initial state before executing a command, requires a configuration
file and strategy
.TP
.B \-d\fP,\fB \-\-debug
enable debugging
.TP
.B \-v\fP,\fB \-\-verbose
increase verbosity
.TP
.BI \-P \ PROXY\fP,\fB \ \-\-proxy \ PROXY
proxy connections over ssh
.UNINDENT
.SH CONFIGURATION FILE
.sp
The configuration file follows the description in \fBlabgrid\-device\-config\fP(5).
.SH ENVIRONMENT VARIABLES
.sp
Various labgrid\-client commands use the following environment variable:
.SS LG_PLACE
.sp
This variable can be used to specify a place without using the \fB\-p\fP option, the \fB\-p\fP option overrides it.
.SS LG_TOKEN
.sp
This variable can be used to specify a reservation for the \fBwait\fP command and
for the \fB+\fP place expansion.
.SS LG_STATE
.sp
This variable can be used to specify a state which the device transitions into
before executing a command. Requires a configuration file and a Strategy
specified for the device.
.SS LG_ENV
.sp
This variable can be used to specify the configuration file to use without
using the \fB\-\-config\fP option, the \fB\-\-config\fP option overrides it.
.SS LG_CROSSBAR
.sp
This variable can be used to set the default crossbar URL (instead of using the
\fB\-x\fP option).
.SS LG_CROSSBAR_REALM
.sp
This variable can be used to set the default crossbar realm to use instead of
\fBrealm1\fP\&.
.SS LG_PROXY
.sp
This variable can be used to specify a SSH proxy hostname which should be used
to connect to the coordinator and any resources which are normally accessed
directly.
.SS LG_HOSTNAME
.sp
Override the hostname used when accessing a resource. Typically only useful for
CI pipelines where the hostname may not be consistent between pipeline stages.
.SS LG_USERNAME
.sp
Override the username used when accessing a resource. Typically only useful for
CI pipelines where the username may not be consistent between pipeline stages.
.SH MATCHES
.sp
Match patterns are used to assign a resource to a specific place. The format is:
exporter/group/cls/name, exporter is the name of the exporting machine, group is
a name defined within the exporter, cls is the class of the exported resource
and name is its name. Wild cards in match patterns are explicitly allowed, *
matches anything.
.SH LABGRID-CLIENT COMMANDS
.sp
\fBmonitor\fP Monitor events from the coordinator
.sp
\fBresources (r)\fP List available resources
.sp
\fBplaces (p)\fP List available places
.sp
\fBwho\fP List acquired places by user
.sp
\fBshow\fP Show a place and related resources
.sp
\fBcreate\fP Add a new place (name supplied by \-p parameter)
.sp
\fBdelete\fP Delete an existing place
.sp
\fBadd\-alias\fP alias Add an alias to a place
.sp
\fBdel\-alias\fP alias Delete an alias from a place
.sp
\fBset\-comment\fP comment Update or set the place comment
.sp
\fBset\-tags\fP comment Set place tags (key=value)
.sp
\fBadd\-match\fP match Add one (or multiple) match pattern(s) to a place, see MATCHES
.sp
\fBdel\-match\fP match Delete one (or multiple) match pattern(s) from a place, see MATCHES
.sp
\fBadd\-named\-match\fP match name Add one match pattern with a name to a place
.sp
\fBacquire (lock)\fP Acquire a place
.sp
\fBallow\fP user Allow another user to access a place
.sp
\fBrelease (unlock)\fP Release a place
.sp
\fBenv\fP Generate a labgrid environment file for a place
.sp
\fBpower (pw)\fP action Change (or get) a place\(aqs power status, where action is one of get, on, off, status
.sp
\fBio\fP action Interact with GPIO (OneWire, relays, ...) devices, where action is one of high, low, get
.sp
\fBconsole (con)\fP Connect to the console
.sp
\fBfastboot\fP arg Run fastboot with argument
.sp
\fBbootstrap\fP filename Start a bootloader
.sp
\fBsd\-mux\fP action Switch USB SD Muxer, where action is one of dut (device\-under\-test), host, off
.sp
\fBssh\fP Connect via SSH
.sp
\fBscp\fP Transfer file via scp (use \(aq:dir/file\(aq for the remote side)
.sp
\fBrsync\fP Transfer files via rsync (use \(aq:dir/file\(aq for the remote side)
.sp
\fBsshfs\fP Mount a remote path via sshfs
.sp
\fBtelnet\fP Connect via telnet
.sp
\fBvideo\fP Start a video stream
.sp
\fBtmc\fP command Control a USB TMC device
.sp
\fBwrite\-image\fP Write images onto block devices (USBSDMux, USB Sticks, …)
.sp
\fBreserve\fP filter Create a reservation
.sp
\fBcancel\-reservation\fP token Cancel a pending reservation
.sp
\fBwait\fP token Wait for a reservation to be allocated
.sp
\fBreservations\fP List current reservations
.SH ADDING NAMED RESOURCES
.sp
If a target contains multiple Resources of the same type, named matches need to
be used to address the individual resources. In addition to the \fImatch\fP taken by
\fIadd\-match\fP, \fIadd\-named\-match\fP also takes a name for the resource. The other
client commands support the name as an optional parameter and will inform the
user that a name is required if multiple resources are found, but no name is
given.
.SH EXAMPLES
.sp
To retrieve a list of places run:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ labgrid\-client places
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
To access a place, it needs to be acquired first, this can be done by running
the \fBacquire command\fP and passing the placename as a \-p parameter:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ labgrid\-client \-p <placename> acquire
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Open a console to the acquired place:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ labgrid\-client \-p <placename> console
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Add all resources with the group "example\-group" to the place example\-place:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ labgrid\-client \-p example\-place add\-match */example\-group/*/*
.ft P
.fi
.UNINDENT
.UNINDENT
.SH SEE ALSO
.sp
\fBlabgrid\-exporter\fP(1)
.SH AUTHOR
Rouven Czerwinski <r.czerwinski@pengutronix.de>
Organization: Labgrid-Project
.SH COPYRIGHT
Copyright (C) 2016-2017 Pengutronix. This library is free software;
you can redistribute it and/or modify it under the terms of the GNU
Lesser General Public License as published by the Free Software
Foundation; either version 2.1 of the License, or (at your option)
any later version.
.\" Generated by docutils manpage writer.
.
|