Skip to content

Commit

Permalink
Add Features and Usage sections
Browse files Browse the repository at this point in the history
  • Loading branch information
inunix3 committed Jun 17, 2024
1 parent 43dc8e8 commit 6c91865
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,47 @@ the sysinfo crate has gone too far...

Written just for fun.

## Features
- Query about:
- CPU
- Sensors
- Memory
- Swap memory
- Disks
- OS
- Multiple queries can be issued (`dshw memory total usage available free`)
- Custom delimiter is supported (`dshw -d ', ' drive /dev/sda3 total available usage fs mount-point`)

## Usage
To print total and available memory:
```
~ $ dshw memory total available
16689270784
10336894976
```

Some commands like `cpu`, `sensor` or `drive` take a name/id as the first required argument:
```
~ $ dshw drive /dev/sda3 usage total
ext4
259652198400
474853687296
```

Some commands take zero arguments:
```
~ $ dshw cpu-arch
x86_64
```

You can also specify a desired delimiter:
```
~ $ dshw -d ', ' list-cpus
cpu0, cpu1, cpu2, cpu3, cpu4, cpu5, cpu6, cpu7, cpu8, cpu9, cpu10, cpu11, cpu12, cpu13, cpu14, cpu15
```

Type `dshw help` to see all commands. Type, for example, `dshw help os` to see all os-related subcommands.

## Installation
You'll need the Rust toolchain ([rustup](https://rustup.rs/) or from system package repo) and make
sure it's up to date.
Expand All @@ -22,7 +63,7 @@ To see all available options, pass `-h`, `--help` or `help`.
## TODO
- [ ] Add extra functionality like network.
- [ ] Timing: measure stats within specified interval.
- [ ] Add format option: something like `dshw drive '/dev/sda3' fmt '{usage}/{total} GiB'`
- [ ] Add format option: something like `dshw drive /dev/sda3 fmt '{usage}/{total} GiB'`

...

Expand Down

0 comments on commit 6c91865

Please sign in to comment.