s2pctl
Section: User Commands (1)
Index
NAME
s2pctl - SCSI2Pi Server Controller Tool
SYNOPSIS
scsictl
[--id/i ID[:LUN]] |
[--list-extensions] |
[--list-images/-e] |
[--list-operations/-o] |
[--help/-h] |
[--version/-v] |
[--server-version/-V] |
[--detach-all-D] |
[--list-interfaces/-N] |
[--list-reserved-ids/-I] |
[--list-devices/-l] |
[--list-log-levels] |
[--list-properties/-P] |
[--list-statistics/-S] |
[--list-device-types/-T] |
[--shut-down/-X] |
[--prompt] |
[--text-protobuf] |
[--binary-protobuf FILENAME] |
[--json-protobuf FILENAME] |
[--delete/-d FILENAME] |
[--create/-C FILENAME:FILESIZE] |
[--list-image-info/-E FILENAME] |
[--image-folder/-F IMAGE_FOLDER] |
[--rename/-R CURRENT_NAME:NEW_NAME] |
[--cmd/-c COMMAND] |
[--block-size/-b BLOCK_SIZE] |
[--caching-mode/-m CACHING_MODE] |
[--file/f FILE|PARAM] |
[--log-level/-L LOG_LEVEL] |
[--host/-H HOST] |
[--name/-n NAME VENDOR:NAME_REVISION] |
[--port/-p PORT] |
[--reserved-ids/-r IDS] |
[--list-settings/-s [FOLDER_PATTERN:FILE_PATTERN:OPERATIONS]] |
[--type/-t TYPE] |
[--copy/-x CURRENT_NAME:NEW_NAME] |
[--persist]
[--locale LOCALE]
DESCRIPTION
s2pctl
sends commands to s2p in order to apply configuration changes at runtime or to check a device status.
s2pctl also runs on non-Pi Linux/BSD platforms. In this case use the -H option to select the s2p host s2pctl shall connect to.
When launched without arguments s2pctl enters interactive mode, where you can enter commands on the command line.
In interactive mode the host and port settings are preserved between command invocations.
OPTIONS
- --id/-i ID[:LUN]
-
The SCSI or SASI ID and optional LUN that you want to control. (0-7:0-31 for SCSI, 0-7:0-1 for SASI.)
- --create/-C FILENAME:FILESIZE
-
Create an image file in the default image folder with the specified name and size in bytes.
- --detach-all/-D
-
Detach all devices.
- --list-image-info/-E FILENAME
-
Display image file information.
- --image-folder/-F IMAGE_FOLDER
-
Set the default image folder.
- --list-reserved-ids/-I
-
Display reserved device IDs.
- --log-level/-L LOG_LEVEL[:ID[:LUN]]
-
Set the s2p log level (trace, debug, info, warning, error, critical, off).
- --host/-H HOST
-
The s2p host to connect to, default is 'localhost'.
- --list-interfaces/-N
-
Lists all network interfaces that are up and available for setting up a DaynaPort emulation.
- --list-log-levels
-
Display the available s2p log levels and the current log level.
- --prompt
-
Prompt for the access token in case s2p requires authentication.
- --list-devices/-l
-
List all of the devices that are currently being emulated, as well as their current status.
- --list-extensions
-
List all supported file extensions and the device types they map to.
- --list-images/-e
-
List all images files in the default image folder.
- --list-operations/-o
-
List available remote interface operations.
- --rename/-R CURRENT_NAME:NEW_NAME
-
Rename an image file in the default image folder.
- --port/-p PORT
-
The s2p port to connect to, default is 6868.
- --list-properties/-P PORT
-
Display the current s2p properties. The resulting output can directly be used for property files, e.g. for /etc/s2p.conf when running s2p as a system service.
- --reserved-ids/-r IDS
-
Comma-separated list of IDs to reserve. Pass an empty list in order to not reserve anything.
- --list-settings/-s [FOLDER_PATTERN:FILE_PATTERN:OPERATIONS]
-
Display all s2p settings. Filenames are optionally filtered by folder and file patterns.
OPERATIONS is an optional comma-seperated list of server operations to take into account, in order to limit the amount of output.
- --list-statistics/-S
-
Display s2p statistics.
- --list-device-types/-T
-
Display available device types and their properties.
- --help/-h
-
Display usage information.
- --version/-v
-
Display the s2pctl version.
- --server-version/-V
-
Display the s2p server version.
- --shut-down/-X
-
Shut down the s2p process.
- --delete/-d FILENAME
-
Delete an image file in the default image folder.
- --copy/-x CURRENT_NAME:NEW_NAME
-
Copy an image file in the default image folder.
- --binary-protobuf FILENAME
-
Do not send the command to s2p but write it to a protobuf binary file.
- --json-protobuf FILENAME
-
Do not send the command to s2p but write it to a protobuf JSON file.
- --text-protobuf FILENAME
-
Do not send the command to s2p but write it to a protobuf text format file.
- --persist
-
Write the current configuration to /etc/s2p.conf. The old configuration, if any, is saved to /etc/s2p.conf.old.
- --locale LOCALE
-
Overrides the default locale (language) for client-facing error messages.
- --command/-c COMMAND
-
Command is the operation being requested. Options are:
a(ttach): Attach device
d(etach): Detach device
i(nsert): Insert medium (removable media devices only, i.e. SCRM, SCMO, SCCD, SCTP). If no filename is provided the file last ejected (if any) is re-inserted.
e(ject): Eject medium (removable media devices only, i.e. SCRM, SCMO, SCCD, SCTP)
p(rotect): Write protect the medium (not for CD-ROMs, which are always read-only)
u(nprotect): Remove write protection from the medium (not for CD-ROMs, which are always read-only)
-
eject, protect and unprotect are idempotent.
- --block-size/-b BLOCK_SIZE
-
The optional default block size. The default size for SASI hard drives is 256 bytes, for other devices it is 512 bytes. There is no upper limit.
s2p supports non-standard block sizes as long as they are multiples of 4. Non-standard sizes are only required for exotic platforms.
- --caching-mode/-m CACHING_MODE
-
Caching mode (piscsi|write-through|linux|linux-optimized), default currently is PiSCSI compatible caching.
- --file/-f FILE|PARAMS
-
Device-specific: Either a path to a disk image file, or parameters for a non-disk device. See the s2p(1) man page for permitted file types.
- --type/-t TYPE
-
Specifies the device type. This type overrides the type derived from the file extension of the specified image. See the s2p(1) man page for the available device types. For some types there are shortcuts (only the first letter is required):
sahd: SASI hard drive
schd: SCSI hard drive
scrm: SCSI removable media drive
sccd: CD-ROM drive
scmo: Magneto-optical disk
scdp: DaynaPort network adapter
sclp: SCSI printer
schs: Host services device
- --name/-n VENDOR:PRODUCT:REVISION
-
The optional vendor, product and revision for the device, to be returned with the SCSI INQUIRY data. A complete set of name components must be provided. VENDOR may have up to 8, PRODUCT up to 16, REVISION up to 4 characters. Padding with blanks to the maxium length is automatically applied. Once set the name of a device cannot be changed.
The name of the SCSG device type cannot be changed, because this name is provided by the connected device.
- --scsi-level SCSI_LEVEL
-
The optional SCSI standard level. The default level is device-specific and usually is SCSI-2. Be careful with using this option, you will usually not need it.
Explicitly setting the level may be required for drives with removable media if they are attached without providing an image file.
In this case the SCSI-1-CCS level cannot be derived from the ".is1" or ".hd1" filename extension and "--scsi-level 1" can be used.
- -u UNIT
-
Logical unit number (0-31 for SCSI, 0-1 for SASI). The LUN defaults to 0. This option is used when there are multiple SCSI/SASI devices for the same SCSI ID.
EXAMPLES
Display the completer remote service information.
s2pctl -s
Request s2p to attach a disk (assumed) to SCSI ID 0 with the contents of the file system image "hdimage0.hds".
s2pctl -i 0 -f hdimage0.hds
SEE ALSO
s2p(1), s2pdump(1), s2pexec(1), s2pformat(1), s2pproto(1), s2psimh(1), s2ptool(1)
Also see <https://www.scsi2pi.net> and <https://github.com/uweseimet/scsi2pi>.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- EXAMPLES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.