-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat OpenStack Platform
Chapter 4. Using the Skydive command line
The Skydive CLI allows you to perform the same functions as the GUI. For example:
- Review your topology
- Capture traffic
- Perform packet injection
4.1. Check Skydive status
You can use skydive client status to check the state of your Skydive services. For example:
$ skydive client status
{
"Agents": {
"node01.lab.local": {
"ServiceType": "agent",
"ClientProtocol": "protobuf",
"Addr": "10.0.0.20",
"Port": 49454,
"IsConnected": true,
"ConnectTime": "2018-11-16T09:19:12.652607Z",
"RemoteHost": "node01.lab.local"
},
"node02.lab.local": {
"ServiceType": "agent",
"ClientProtocol": "protobuf",
"Addr": "10.0.0.9",
"Port": 43916,
"IsConnected": true,
"ConnectTime": "2018-11-16T09:19:12.770824379Z",
"RemoteHost": "node02.lab.local"
},
"node1": {
"ServiceType": "agent",
"ClientProtocol": "protobuf",
"Addr": "192.168.42.132",
"Port": 54582,
"IsConnected": true,
"ConnectTime": "2018-11-16T09:19:12.803125487Z",
"RemoteHost": "node1"
}
},
"Peers": {
"Incomers": {},
"Outgoers": {}
},
"Publishers": {},
"Subscribers": {},
"Alerts": {
"IsMaster": true
},
"Captures": {
"IsMaster": true
},
"Probes": [
"fabric",
"peering"
]
}
Skydive includes a command line reporting tool that uses the Gremlin syntax. Gremlin searches the Skydive database to help review your system configuration. For example, this query returns a list of IP addresses that do not use a MTU size of exactly 1500:
$ /opt/stack/go/bin/skydive client query "G.V().Has('MTU', NE(1500)).Values('IPV4')"
[
[
"127.0.0.1/8"
],
[
"127.0.0.1/8"
],
[
"10.0.0.9/24"
],
[
"10.233.64.1/24"
],
[
"127.0.0.1/8"
],
[
"127.0.0.1/8"
],
[
"10.233.64.4/24"
],
[
"10.0.0.3/26"
],
[
"127.0.0.1/8"
],
[
"10.0.0.1/26"
],
[
"127.0.0.1/8"
],
[
"127.0.0.1/8"
],
[
"10.233.64.0/32"
],
[
"10.0.0.2/26"
],
[
"10.0.0.20/24",
"192.168.0.1/24"
],
[
"10.233.64.2/24"
]
]
To see which IP addresses use a MTU of exactly 1500:
$ /opt/stack/go/bin/skydive client query "G.V().Has('MTU',1500).Values('IPV4")"
[
[
"192.168.122.1/24"
],
[
"192.168.42.129/25"
],
[
"172.17.0.1/16"
],
[
"172.17.0.1/16"
],
[
"192.168.42.132/25"
],
[
"192.168.122.1/24"
]
]For more information on:
- Gremlin queries, see http://skydive.network/documentation/api-gremlin.
- Skydive CLI, see http://skydive.network/documentation/cli.
- Skydive Rest API, see http://skydive.network/documentation/api-rest.