snowflake-stats/README.md

46 lines
1.1 KiB
Markdown
Raw Normal View History

2022-04-06 14:42:27 +02:00
# snowflake-stats
2022-04-06 12:37:59 +02:00
2022-04-06 14:42:27 +02:00
## Usage
2022-04-06 15:08:34 +02:00
Usage: `<write-log-to-stdout> | ./main.py`
2022-04-06 14:55:46 +02:00
2022-04-06 15:08:34 +02:00
- Example: Pipe docker log from remote computer into `main.py`
2022-04-06 14:55:46 +02:00
2022-04-06 15:08:34 +02:00
```bash
(venv-310) [user@linux snoflake-stats]$ ssh root_at_my_server 'docker logs snowflake-proxy' 2>&1 | ./main.py
```
- Example: Pipe logfile into `main.py`
```bash
(venv-310) [user@linux snoflake-stats]$ cat snowflake.log | ./main.py
```
Usage: `./main.py <docker-container-name> [<ssh-hostname>]`
- Example: Specify name of local docker container
```bash
(venv-310) [user@linux snoflake-stats]$ ./main.py snowflake-proxy
```
- Example: Docker container name and ssh hostname
```bash
(venv-310) [user@linux snoflake-stats]$ ./main.py snowflake-proxy root_at_my_server
```
2022-04-06 14:42:27 +02:00
## Example output
```
2022-10-01 12:14:45 +02:00
From 2022-09-25 22:14:50 until 2022-09-29 11:02:26:
2022-09-25: 2000 KB up 1000 KB down 4 Connections
2022-09-26: 1152 MB up 395 MB down 199 Connections
2022-09-27: 1608 MB up 548 MB down 278 Connections
2022-09-28: 774 MB up 423 MB down 281 Connections
2022-09-29: 760 MB up 314 MB down 136 Connections
2022-05-11 19:47:32 +02:00
Total:
2022-10-01 12:14:45 +02:00
4297 MB up 1682 MB down 898 Connections
2022-04-06 14:42:27 +02:00
```