Blog/content/posts/2022/get_send_server_bytes.md

22 lines
706 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "🧮 Как определить сколько сервер передал байт в месяц"
date: 2022-10-12T00:30:14+03:00
draft: false
tags: [linux, tips]
---
## Реально?
Если сами не озаботились сбором и хранением то «не реал»
[[1]](https://www.linux.org.ru/forum/admin/16813249?cid=16813276).
## Решение
Статистику, как и бэкапы, необходимо собирать до того, как они пригодятся.
Можно выполнить `cat /proc/net/dev`, а потом ещё раз через месяц.
Либо так:
```sh
cat /sys/class/net/<dev>/statistics/tx_bytes
```