aboutsummaryrefslogtreecommitdiff
path: root/doc/ispeek.1
blob: 1ebc9f914a4ba577a67313d7fd4d1f1311dd5374 (plain)
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
.\" This file is part of Eclat -*- nroff -*-
.\" Copyright (C) 2012-2015 Sergey Poznyakoff
.\"
.\" Eclat is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 3, or (at your option)
.\" any later version.
.\"
.\" Eclat is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with Eclat.  If not, see <http://www.gnu.org/licenses/>.
.TH INSPEEK 1 "January 21, 2015" "INSPEEK" "Eclat User Reference"
.SH NAME
ispeek \- EC2 instance store lister
.SH SYNOPSIS
\fBispeek\fR\
 [\fB\-NQTdr\fR]\
 [\fB\-D\fR \fISTRING\fR]\
 [\fB\-b\fR \fIURL\fR]\
 [\fB\-p\fR \fINUMBER\fR]\
 [\fB\-\-base\-url=\fIURL\fR]\
 [\fB\-\-delimiter=\fISTRING\fR]\
 [\fB\-\-names\fR]\
 [\fB\-\-quote\fR]\
 [\fB\-\-type\fR]\
 [\fB\-\-port=\fINUMBER\fR]\
 \fIPATH\fR\
 [\fIKEY\fR...]
.br
\fBispeek\fR\
 [\fB\-Vh\fR]\
 [\fB\-\-help\fR]\
 [\fB\-\-usage\fR]\
 [\fB\-\-version\fR]
.SH DESCRIPTION
Lists contents of the EC2 instance store.  The \fIPATH\fR argument
specifies the pathname to list.  It is relative to
.BR http://169.254.169.254/latest .
If \fIPATH\fR ends with a slash, it is treated as a directory and
its content is listed.  Otherwise, it is treated as a file.
.PP
Optional \fIKEY\fR arguments are allowed when listing content of a
file.  If one or more \fIKEY\fRs are given, the file is parsed as
a JSON object.  For each \fIKEY\fR, a corresponding value is looked
up in the resulting object and printed on a separate line, prefixed
with \fIKEY\fR and a colon.
.PP
The utility must be run from a EC2 instance.
.SH OPTIONS
.TP
\fB\-b\fR, \fB\-\-base=\fIURL\fR
Base URL to use, instead of 
.BR http://169.254.169.254/latest .
.TP
\fB\-d\fR, \fB-\-debug\fR
Increase debugging level.
.TP
\fB\-p\fR, \fB\-\-port=\fINUMBER\fR
Set remote port number, instead of the default \fB80\fR.
.PP
Following option applies only when listing directories:
.TP
\fB\-r\fR, \fB\-\-recursive
List directories recursively.
.PP
The options below configure output if at least one \fIKEY\fR is given:
.TP
\fB\-D\fR, \fB\-\-delimiter=\fISTRING\fR
Delimit output values with \fISTRING\fR.  Default delimiter is a colon.
.TP
\fB\-N\fR, \fB\-\-names
Print key names.
.TP
\fB\-Q\fR, \fB\-\-quote\fR
Quote string values.  String values will be enclosed in
double-quotes.  Double-quote and backslash characters appearing within
strings will be escaped with backslashes.
.TP
\fB\-T\fR, \fB\-\-type\fR
Print type character.  Type characters are:
.BR 0 ,
for \fBnull\fR values,
.BR b ,
for booleans,
.BR n ,
for numeric values,
.BR s ,
for strings ,
.BR a ,
for arrays, and
.BR o ,
for objects.
.PP
The order of printing is: key name, type, value.
.TP
\fB\-V\fR, \fB\-\-version\fR
Print program version.
.TP
\fB\-h\fR, \fB\-\-help\fR
Give a concise help summary.
.TP
\fB\-\-usage\fR
Give a short usage message.
.SH EXAMPLES
.SS Get instance ID
.EX
$ ispeek /meta-data/instance-id
i-deadbeef
.EE
.SS Print instance data
.EX
$ ispeek /dynamic/instance-identity/document
{
  "instanceId" : "i-deadbeef",
  "billingProducts" : null,
  ...
.EE
.SS Read availability region and instance type
.EX
$ ispeek /dynamic/instance-identity/document region instanceType
eu-west-1
m3.xlarge
.EE
.SS Same, including key names and types in the output
.EX
$ ispeek -NT /dynamic/instance-identity/document region instanceType
region:s:eu-west-1
instanceType:s:m3.xlarge
.SS Recursively list the contents of \fB/meta\-data/iam\fR:
.EX
$ ispeek \-r meta\-data/iam
/meta-data/iam/info
/meta-data/iam/security-credentials/
/meta-data/iam/security-credentials/user
.EE

.SH "SEE ALSO"
.BR eclat (1).
.SH AUTHORS
Sergey Poznyakoff
.SH "BUG REPORTS"
Report bugs to <bug\-eclat@gnu.org.ua>.
.SH COPYRIGHT
Copyright \(co 2012-2015 Sergey Poznyakoff
.br
.na
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
.br
.ad
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
.\" Local variables:
.\" eval: (add-hook 'write-file-hooks 'time-stamp)
.\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.-]* [0-9] \""
.\" time-stamp-format: "%:B %:d, %:y"
.\" time-stamp-end: "\""
.\" time-stamp-line-limit: 20
.\" end:

Return to:

Send suggestions and report system problems to the System administrator.