.\" 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 .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 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 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 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. .