Cuervo
Posts: 14
Joined: Wed Apr 08, 2020 4:40 pm

(SOLVED) A tool on daily hardware consumption?

Thu Apr 09, 2020 5:24 am

- Raspbian Buster Lite
- Raspberry Pi 4 4GB


Hi

I would like to know if there is a tool that generates a document or a similar one with the statistics of CPU usage, Ram Memory and network consumption for a full day?

Basically I would like to see the consumption peaks of a full day, is there a way to get this information at the end of the day?


Thank you
Last edited by Cuervo on Fri Apr 17, 2020 11:10 pm, edited 1 time in total.

ejolson
Posts: 5373
Joined: Tue Mar 18, 2014 11:47 am

Re: A tool on daily hardware consumption?

Thu Apr 09, 2020 7:06 am

Cuervo wrote:
Thu Apr 09, 2020 5:24 am
- Raspbian Buster Lite
- Raspberry Pi 4 4GB


Hi

I would like to know if there is a tool that generates a document or a similar one with the statistics of CPU usage, Ram Memory and network consumption for a full day?

Basically I would like to see the consumption peaks of a full day, is there a way to get this information at the end of the day?


Thank you
If you look around in the /proc directory there are a number of special files that when read include various system metrics such as how many network packets have been sent so far and how many CPU cycles were spent in idle and wait states compared to used for computation.

I haven't checked on memory. I wonder if there is a counter that tallies how many pages have been allocated by the memory subsystem so far and a count of how many have been deallocated as well.

Ernst
Posts: 1334
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: A tool on daily hardware consumption?

Thu Apr 09, 2020 7:33 am

The road to insanity is paved with static ip addresses

jahboater
Posts: 5759
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: A tool on daily hardware consumption?

Thu Apr 09, 2020 7:37 am

You may use tools like vmstat or iostat or netstat

These can output data periodically, for example:

vmstat -t 10

outputs a line every 10 seconds (-t adds a timestamp)
This may be redirected to a log file or may be piped to another process.

Code: Select all

$ vmstat -t 10 
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----  -----timestamp-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st                 BST
 1  0      0 3626868  27460 231348    0    0     0     0    6    4  1  0 99   0  0 2020-04-09 08:36:26
 0  0      0 3626868  27460 231348    0    0     0     0   17   18  0  0 100  0  0 2020-04-09 08:36:36
 0  0      0 3626868  27460 231348    0    0     0     0   15   16  0  0 100  0  0 2020-04-09 08:36:46
Pi4 8GB running PIOS64

Cuervo
Posts: 14
Joined: Wed Apr 08, 2020 4:40 pm

Re: A tool on daily hardware consumption?

Fri Apr 17, 2020 10:58 pm

Thank you very much for the recommendations, which I have tried to monitor from the local network, I liked the following:

RPI-Monitor in a light and interesting tool with everything you need, I still have to study how to configure it correctly.

Image

RPI-Monitor GPLv3

Code: Select all

sudo apt-get install dirmngr
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2C0D3C0F
sudo wget http://goo.gl/vewCLL -O /etc/apt/sources.list.d/rpimonitor.list
sudo apt-get update
sudo apt-get install rpimonitor
sudo /etc/init.d/rpimonitor update
Open: http://192.168.1.X:8888

https://github.com/XavierBerger/RPi-Monitor

<----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->

I was also surprised by Netdata, beautiful and very functional.

Image

Netdata GPLv3+

Code: Select all

sudo apt-get install netdata
sudo systemctl enable netdata
sudo systemctl start netdata
sudo nano /etc/netdata/netdata.conf
bind socket to IP = 192.168.1.X
sudo systemctl restart netdata
Open: http://192.168.1.X:19999

https://github.com/netdata/netdata





Thanks

Return to “Raspberry Pi OS”