1rmt(1M)                 System Administration Commands                 rmt(1M)
2
3
4

NAME

6       rmt - remote magtape protocol module
7

SYNOPSIS

9       /usr/sbin/rmt
10
11

DESCRIPTION

13       rmt is a program used by the remote dump and restore programs in manip‐
14       ulating a magnetic tape drive  through  an  interprocess  communication
15       connection.  rmt  is  normally  started  up  with  an rexec(3SOCKET) or
16       rcmd(3SOCKET) call.
17
18
19       The rmt program accepts requests that are specific to the  manipulation
20       of  magnetic  tapes, performs the commands, then responds with a status
21       indication.  All responses are in ASCII and in one of two  forms.  Suc‐
22       cessful commands have responses of:
23
24
25
26
27
28       Anumber\n     where number is an ASCII representation of a decimal num‐
29                     ber.
30
31
32
33       Unsuccessful commands are responded to with:
34
35       Eerror-number\nerror-message\n
36
37           where error-number is one of the possible error  numbers  described
38           in intro(3), and error-message is the corresponding error string as
39           printed from a call to perror(3C).
40
41
42
43        The protocol consists of the following commands:
44
45       S\n                      Return the  status  of  the  open  device,  as
46                                obtained  with  a MTIOCGET ioctl call.  If the
47                                operation was successful,  an  "ack"  is  sent
48                                with  the  size of the status buffer, then the
49                                status buffer is sent (in binary).
50
51
52       Cdevice\n                Close the currently open  device.  The  device
53                                specified is ignored.
54
55
56       Ioperation\ncount\n      Perform  a  MTIOCOP ioctl(2) command using the
57                                specified  parameters.  The   parameters   are
58                                interpreted  as  the  ASCII representations of
59                                the decimal values to place in the  mt_op  and
60                                mt_count  fields  of the structure used in the
61                                ioctl call.   When the operation is successful
62                                the return value is the count parameter.
63
64
65       Loffset\nwhence\n        Perform an lseek(2) operation using the speci‐
66                                fied  parameters.  The   response   value   is
67                                returned from the lseek call.
68
69
70       Odevice\nmode\n          Open  the specified device using the indicated
71                                mode. device is a full pathname, and  mode  is
72                                an  ASCII  representation  of a decimal number
73                                suitable for passing to open(9E). If a  device
74                                is  already  open,  it  is closed before a new
75                                open is performed.
76
77
78       Rcount\n                 Read count bytes of data from the open device.
79                                rmt   performs   the  requested  read(9E)  and
80                                responds with Acount-read\n if  the  read  was
81                                successful;  otherwise  an  error in  standard
82                                format is returned. If the read  was  success‐
83                                ful, the data read is sent.
84
85
86       Wcount\n                 Write  data  onto  the  open device. rmt reads
87                                count bytes from the connection, aborting if a
88                                premature  EOF  is  encountered.  The response
89                                value is returned from the write(9E) call.
90
91
92
93       Any other command causes rmt to exit.
94

ATTRIBUTES

96       See attributes(5) for descriptions of the following attributes:
97
98
99
100
101       ┌─────────────────────────────┬─────────────────────────────┐
102       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
103       ├─────────────────────────────┼─────────────────────────────┤
104       │Availability                 │SUNWrcmdc                    │
105       └─────────────────────────────┴─────────────────────────────┘
106

SEE ALSO

108       ufsdump(1M), ufsrestore(1M), intro(3), ioctl(2), lseek(2), perror (3C),
109       rcmd(3SOCKET),   rexec(3SOCKET),   attributes(5),  mtio(7I),  open(9E),
110       read(9E), write(9E)
111

DIAGNOSTICS

113       All responses are of the form described above.
114

BUGS

116       Do not use this for a remote file access protocol.
117
118
119
120SunOS 5.11                        6 Nov 2000                           rmt(1M)
Impressum