@@ -24,36 +24,110 @@ The command execution produces an output file containing the results that can be
24
24
25
25
## Executing a run-read command
26
26
27
- The run-read command executes a read-only command on the specified BMM.
28
-
29
- The current list of supported commands are:
30
-
31
- - ` traceroute `
32
- - ` ping `
33
- - ` arp `
34
- - ` tcpdump `
35
- - ` brctl show `
36
- - ` dmidecode `
37
- - ` host `
38
- - ` ip link show `
39
- - ` ip address show `
40
- - ` ip maddress show `
41
- - ` ip route show `
42
- - ` journalctl `
43
- - ` kubectl logs `
44
- - ` kubectl describe `
45
- - ` kubectl get `
46
- - ` kubectl api-resources `
47
- - ` kubectl api-versions `
48
- - ` uname `
49
- - ` uptime `
50
- - ` fdisk -l `
51
- - ` hostname `
52
- - ` ifconfig -a `
53
- - ` ifconfig -s `
54
- - ` mount `
55
- - ` ss `
56
- - ` ulimit -a `
27
+ The run-read command executes a read-only command on the specified BMM. Note that some commands consist of
28
+ more than one word, or include a mandatory argument as part of the command. These are defined this way to
29
+ differentiate a read-only version of the command from one that is not read-only. For instance, run-read-command
30
+ allows use of ` kubectl get ` but not ` kubectl apply ` . In such cases, all words of the command are entered in the
31
+ "command" field, as shown below. For instance, ` {"command":"kubectl get","arguments":["nodes"]} ` is correct;
32
+ ` {"command":"kubectl","arguments":["get","nodes"]} ` is not.
33
+
34
+ Also note that some commands begin with ` nc-toolbox nc-toolbox-runread ` and must be entered as shown.
35
+ ` nc-toolbox-runread ` is a special container image which includes additional tools that are not installed on the
36
+ baremetal host, such as ipmitool and racadm.
37
+
38
+ The current list of supported commands is as follows. Commands in * ` italics ` * do not allow ` arguments ` ; all others do.
39
+
40
+ | Standard commands | nc-toolbox-runread ipmitool commands | nc-toolbox-runread racadm commands | nc-toolbox-runread Mellanox troubleshooting commands |
41
+ | ----------------------- | --------------------------------------------------------------------------------------| -------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
42
+ | ` arp ` | ` nc-toolbox nc-toolbox-runread ipmitool channel authcap ` | * ` nc-toolbox nc-toolbox-runread racadm arp ` * |
43
+ | ` brctl show ` | ` nc-toolbox nc-toolbox-runread ipmitool channel info ` | * ` nc-toolbox nc-toolbox-runread racadm coredump ` * |
44
+ | ` dmidecode ` | ` nc-toolbox nc-toolbox-runread ipmitool chassis status ` | ` nc-toolbox nc-toolbox-runread racadm diagnostics ` |
45
+ | * ` fdisk -l ` * | ` nc-toolbox nc-toolbox-runread ipmitool chassis power status ` | ` nc-toolbox nc-toolbox-runread racadm eventfilters get ` |
46
+ | ` host ` | ` nc-toolbox nc-toolbox-runread ipmitool chassis restart cause ` | ` nc-toolbox nc-toolbox-runread racadm fcstatistics ` |
47
+ | * ` hostname ` * | ` nc-toolbox nc-toolbox-runread ipmitool chassis poh ` | ` nc-toolbox nc-toolbox-runread racadm get ` |
48
+ | * ` ifconfig -a ` * | ` nc-toolbox nc-toolbox-runread ipmitool dcmi power get_limit ` | ` nc-toolbox nc-toolbox-runread racadm getconfig ` |
49
+ | * ` ifconfig -s ` * | ` nc-toolbox nc-toolbox-runread ipmitool dcmi sensors ` | ` nc-toolbox nc-toolbox-runread racadm gethostnetworkinterfaces ` |
50
+ | ` ip address show ` | ` nc-toolbox nc-toolbox-runread ipmitool dcmi asset_tag ` | * ` nc-toolbox nc-toolbox-runread racadm getled ` * |
51
+ | ` ip link show ` | ` nc-toolbox nc-toolbox-runread ipmitool dcmi get_mc_id_string ` | ` nc-toolbox nc-toolbox-runread racadm getniccfg ` |
52
+ | ` ip maddress show ` | ` nc-toolbox nc-toolbox-runread ipmitool dcmi thermalpolicy get ` | ` nc-toolbox nc-toolbox-runread racadm getraclog ` |
53
+ | ` ip route show ` | ` nc-toolbox nc-toolbox-runread ipmitool dcmi get_temp_reading ` | ` nc-toolbox nc-toolbox-runread racadm getractime ` |
54
+ | ` journalctl ` | ` nc-toolbox nc-toolbox-runread ipmitool dcmi get_conf_param ` | ` nc-toolbox nc-toolbox-runread racadm getsel ` |
55
+ | ` kubectl api-resources ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem lcd info ` | ` nc-toolbox nc-toolbox-runread racadm getsensorinfo ` |
56
+ | ` kubectl api-versions ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem lcd status ` | ` nc-toolbox nc-toolbox-runread racadm getssninfo ` |
57
+ | ` kubectl describe ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem mac list ` | ` nc-toolbox nc-toolbox-runread racadm getsvctag ` |
58
+ | ` kubectl get ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem mac get ` | ` nc-toolbox nc-toolbox-runread racadm getsysinfo ` |
59
+ | ` kubectl logs ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem lan get ` | ` nc-toolbox nc-toolbox-runread racadm gettracelog ` |
60
+ | * ` mount ` * | ` nc-toolbox nc-toolbox-runread ipmitool delloem powermonitor powerconsumption ` | ` nc-toolbox nc-toolbox-runread racadm getversion ` |
61
+ | ` ping ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem powermonitor powerconsumptionhistory ` | ` nc-toolbox nc-toolbox-runread racadm hwinventory ` |
62
+ | * ` ss ` * | ` nc-toolbox nc-toolbox-runread ipmitool delloem powermonitor getpowerbudget ` | * ` nc-toolbox nc-toolbox-runread racadm ifconfig ` * |
63
+ | ` tcpdump ` | ` nc-toolbox nc-toolbox-runread ipmitool delloem vflash info card ` | * ` nc-toolbox nc-toolbox-runread racadm inlettemphistory get ` * |
64
+ | ` traceroute ` | ` nc-toolbox nc-toolbox-runread ipmitool echo ` | ` nc-toolbox nc-toolbox-runread racadm jobqueue view ` |
65
+ | ` uname ` | ` nc-toolbox nc-toolbox-runread ipmitool ekanalyzer print ` | ` nc-toolbox nc-toolbox-runread racadm lclog view ` |
66
+ | * ` ulimit -a ` * | ` nc-toolbox nc-toolbox-runread ipmitool ekanalyzer summary ` | ` nc-toolbox nc-toolbox-runread racadm lclog viewconfigresult ` |
67
+ | ` uptime ` | ` nc-toolbox nc-toolbox-runread ipmitool fru print ` | ` nc-toolbox nc-toolbox-runread racadm license view ` |
68
+ | | ` nc-toolbox nc-toolbox-runread ipmitool fwum info ` | * ` nc-toolbox nc-toolbox-runread racadm netstat ` * |
69
+ | | ` nc-toolbox nc-toolbox-runread ipmitool fwum status ` | ` nc-toolbox nc-toolbox-runread racadm nicstatistics ` |
70
+ | | ` nc-toolbox nc-toolbox-runread ipmitool fwum tracelog ` | ` nc-toolbox nc-toolbox-runread racadm ping ` |
71
+ | | ` nc-toolbox nc-toolbox-runread ipmitool gendev list ` | ` nc-toolbox nc-toolbox-runread racadm ping6 ` |
72
+ | | ` nc-toolbox nc-toolbox-runread ipmitool hpm rollbackstatus ` | * ` nc-toolbox nc-toolbox-runread racadm racdump ` * |
73
+ | | ` nc-toolbox nc-toolbox-runread ipmitool hpm selftestresult ` | ` nc-toolbox nc-toolbox-runread racadm sslcertview ` |
74
+ | | ` nc-toolbox nc-toolbox-runread ipmitool ime help ` | * ` nc-toolbox nc-toolbox-runread racadm swinventory ` * |
75
+ | | ` nc-toolbox nc-toolbox-runread ipmitool ime info ` | * ` nc-toolbox nc-toolbox-runread racadm systemconfig getbackupscheduler ` * |
76
+ | | ` nc-toolbox nc-toolbox-runread ipmitool isol info ` | ` nc-toolbox nc-toolbox-runread racadm systemperfstatistics ` (PeakReset argument NOT allowed) |
77
+ | | ` nc-toolbox nc-toolbox-runread ipmitool lan print ` | * ` nc-toolbox nc-toolbox-runread racadm techsupreport getupdatetime ` * |
78
+ | | ` nc-toolbox nc-toolbox-runread ipmitool lan alert print ` | ` nc-toolbox nc-toolbox-runread racadm traceroute ` |
79
+ | | ` nc-toolbox nc-toolbox-runread ipmitool lan stats get ` | ` nc-toolbox nc-toolbox-runread racadm traceroute6 ` |
80
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc bootparam get ` | ` nc-toolbox nc-toolbox-runread racadm usercertview ` |
81
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc chassis poh ` | * ` nc-toolbox nc-toolbox-runread racadm vflashsd status ` * |
82
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc chassis policy list ` | * ` nc-toolbox nc-toolbox-runread racadm vflashpartition list ` * |
83
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc chassis power status ` | * ` nc-toolbox nc-toolbox-runread racadm vflashpartition status -a ` * |
84
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc chassis status ` |
85
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc getenables ` |
86
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc getsysinfo ` |
87
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc guid ` |
88
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc info ` |
89
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc restart cause ` |
90
+ | | ` nc-toolbox nc-toolbox-runread ipmitool mc watchdog get ` |
91
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc bootparam get ` |
92
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc chassis poh ` |
93
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc chassis policy list ` |
94
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc chassis power status ` |
95
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc chassis status ` |
96
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc getenables ` |
97
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc getsysinfo ` |
98
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc guid ` |
99
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc info ` |
100
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc restart cause ` |
101
+ | | ` nc-toolbox nc-toolbox-runread ipmitool bmc watchdog get ` |
102
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm alert get ` |
103
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm capability ` |
104
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm discover ` |
105
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm policy get policy_id ` |
106
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm policy limiting ` |
107
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm statistics ` |
108
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm suspend get ` |
109
+ | | ` nc-toolbox nc-toolbox-runread ipmitool nm threshold get ` |
110
+ | | ` nc-toolbox nc-toolbox-runread ipmitool pef ` |
111
+ | | ` nc-toolbox nc-toolbox-runread ipmitool picmg addrinfo ` |
112
+ | | ` nc-toolbox nc-toolbox-runread ipmitool picmg policy get ` |
113
+ | | ` nc-toolbox nc-toolbox-runread ipmitool power status ` |
114
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sdr elist ` |
115
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sdr get ` |
116
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sdr info ` |
117
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sdr list ` |
118
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sdr type ` |
119
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sel elist ` |
120
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sel get ` |
121
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sel info ` |
122
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sel list ` |
123
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sel time get ` |
124
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sensor get ` |
125
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sensor list ` |
126
+ | | ` nc-toolbox nc-toolbox-runread ipmitool session info ` |
127
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sol info ` |
128
+ | | ` nc-toolbox nc-toolbox-runread ipmitool sol payload status ` |
129
+ | | ` nc-toolbox nc-toolbox-runread ipmitool user list ` |
130
+ | | ` nc-toolbox nc-toolbox-runread ipmitool user summary ` |
57
131
58
132
The command syntax is:
59
133
@@ -62,21 +136,9 @@ az networkcloud baremetalmachine run-read-command --name "<machine-name>"
62
136
--limit-time-seconds <timeout> \
63
137
--commands '[{"command":"<command1>"},{"command":"<command2>","arguments":["<arg1>","<arg2>"]}]' \
64
138
--resource-group "<resourceGroupName>" \
65
- --subscription "<subscription>"
139
+ --subscription "<subscription>"
66
140
```
67
141
68
- These commands don't require ` arguments ` :
69
-
70
- - ` fdisk -l `
71
- - ` hostname `
72
- - ` ifconfig -a `
73
- - ` ifconfig -s `
74
- - ` mount `
75
- - ` ss `
76
- - ` ulimit -a `
77
-
78
- All other inputs are required.
79
-
80
142
Multiple commands can be provided in json format to ` --commands ` option.
81
143
82
144
For a command with multiple arguments, provide as a list to ` arguments ` parameter. See [ Azure CLI Shorthand] ( https://github.com/Azure/azure-cli/blob/dev/doc/shorthand_syntax.md ) for instructions on constructing the ` --commands ` structure.
@@ -92,16 +154,16 @@ When an optional argument `--output-directory` is provided, the output result is
92
154
``` azurecli
93
155
az networkcloud baremetalmachine run-read-command --name "bareMetalMachineName" \
94
156
--limit-time-seconds 60 \
95
- --commands '[{"command":"hostname"]," arguments":["198.51.102.1","-c","3"]},{"command":"ping" }]' \
157
+ --commands '[{"command":"hostname"},{"command":"ping"," arguments":["198.51.102.1","-c","3"]}]' \
96
158
--resource-group "resourceGroupName" \
97
- --subscription "<subscription>"
159
+ --subscription "<subscription>"
98
160
```
99
161
100
- In the response, an HTTP status code of 202 is returned as the operation is performed asynchronously.
162
+ In the response, an HTTP status code of 202 is returned as the operation is performed asynchronously.
101
163
102
164
## Checking command status and viewing output
103
165
104
- Sample output looks something as below. It prints the top 4K characters of the result to the screen for convenience and provides a short-lived link to the storage blob containing the command execution result. You can use the link to download the zipped output file (tar.gz).
166
+ Sample output is shown below. It prints the top 4,000 characters of the result to the screen for convenience and provides a short-lived link to the storage blob containing the command execution result. You can use the link to download the zipped output file (tar.gz).
105
167
106
168
``` output
107
169
====Action Command Output====
0 commit comments