2019-11-30 12:48:23 +01:00
|
|
|
# get
|
|
|
|
|
|
|
|
Open given cells as text.
|
|
|
|
|
|
|
|
Syntax: `get ...args`
|
|
|
|
|
2020-06-23 20:21:47 +02:00
|
|
|
## Parameters
|
2020-03-13 18:23:41 +01:00
|
|
|
|
2019-11-30 12:48:23 +01:00
|
|
|
* `args`: optionally return additional data by path
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2020-03-13 18:23:41 +01:00
|
|
|
If we run `sys` we receive a table which contains tables itself:
|
2019-11-30 12:48:23 +01:00
|
|
|
|
|
|
|
```shell
|
|
|
|
> sys
|
2020-06-23 20:21:47 +02:00
|
|
|
─────────┬─────────────────────────────────────────
|
|
|
|
host │ [row 7 columns]
|
|
|
|
cpu │ [row cores current ghz max ghz min ghz]
|
|
|
|
disks │ [table 4 rows]
|
|
|
|
mem │ [row free swap free swap total total]
|
|
|
|
net │ [table 19 rows]
|
|
|
|
battery │ [table 1 rows]
|
|
|
|
─────────┴─────────────────────────────────────────
|
2019-11-30 12:48:23 +01:00
|
|
|
```
|
|
|
|
|
2020-03-13 18:23:41 +01:00
|
|
|
To access one of the embedded tables we can use the `get` command
|
2019-11-30 12:48:23 +01:00
|
|
|
|
|
|
|
```shell
|
|
|
|
> sys | get cpu
|
2020-06-23 20:21:47 +02:00
|
|
|
─────────────┬────────
|
|
|
|
cores │ 16
|
|
|
|
current ghz │ 2.4000
|
|
|
|
min ghz │ 2.4000
|
|
|
|
max ghz │ 2.4000
|
|
|
|
─────────────┴────────
|
2019-11-30 12:48:23 +01:00
|
|
|
```
|
2020-06-23 20:21:47 +02:00
|
|
|
|
2019-11-30 12:48:23 +01:00
|
|
|
```shell
|
|
|
|
> sys | get battery
|
2020-06-23 20:21:47 +02:00
|
|
|
───────────────┬──────────
|
|
|
|
vendor │ DSY
|
|
|
|
model │ bq40z651
|
|
|
|
cycles │ 43
|
|
|
|
mins to empty │ 70.0000
|
|
|
|
───────────────┴──────────
|
2019-11-30 12:48:23 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
There's also the ability to pass multiple parameters to `get` which results in an output like this
|
|
|
|
|
|
|
|
```shell
|
|
|
|
sys | get cpu battery
|
2020-06-23 20:21:47 +02:00
|
|
|
───┬───────┬─────────────┬─────────┬─────────
|
|
|
|
# │ cores │ current ghz │ min ghz │ max ghz
|
|
|
|
───┼───────┼─────────────┼─────────┼─────────
|
|
|
|
0 │ 16 │ 2.4000 │ 2.4000 │ 2.4000
|
|
|
|
───┴───────┴─────────────┴─────────┴─────────
|
|
|
|
───┬────────┬──────────┬────────┬───────────────
|
|
|
|
# │ vendor │ model │ cycles │ mins to empty
|
|
|
|
───┼────────┼──────────┼────────┼───────────────
|
|
|
|
1 │ DSY │ bq40z651 │ 43 │ 70.0000
|
|
|
|
───┴────────┴──────────┴────────┴───────────────
|
|
|
|
```
|