MASSA NODE MONITORING

Hoy queremos contarles en esta publicación todo sobre el monitoreo del nodo Massa realizado para la comunidad española de Massa por @monjsd y @Marisamipi .

En el próximo artículo, revisaremos los comandos más comunes para rastrear y monitorear la actividad de CPU/RAM/red y otras funciones del sistema en un nodo. Con estas herramientas podremos monitorear de manera más efectiva el desempeño de nuestros nodos Massa y ayudarnos a identificar problemas que puedan ocurrir y afectar dicho desempeño.

Usaremos el sistema Linux, y la distribución Ubuntu Server.

Parte del material se tomó del documento de GitHub: Se agregaron secuencias de comandos y comandos de monitoreo, y se agregaron otras herramientas.

https://github.com/massalabs/massa/wiki/Monitoring-scripts-and-commands.

Índice:

  • Supervisión del sistema operativo
  • monitoreo de internet
  • Control de registro del sistema

Supervisión del sistema operativo

Supervisar procesos

El comando superior  muestra el número total de procesos y recursos consumidos en el sistema.

La primera línea  del encabezado muestra la carga y el tiempo de actividad promedio del sistema:

  • 17:13:36  Hora actual  (hora local donde se encuentra el servidor).
  • hasta 24 días . Cuánto tiempo ha estado funcionando el sistema.
  • 1 usuario : Número de usuarios activos.
  • promedio de carga: 0,02, 0,01, 0,00 . Carga media en intervalos, indica la carga de trabajo del procesador, con la media del último minuto, los últimos 5 y los últimos 15 minutos respectivamente.

Mostrar valores de 0 (sin carga de trabajo) a 1 (trabajando al 100%), más de 1, significa que el procesador no puede atender todos los procesos y habrá una cola de entrada.

La segunda línea  del encabezado muestra el total de tareas, procesos y el estado de estos procesos.

  • Tarea: 120 en total . Procesos totales.
  • 1 corriendo . Total de procesos en ejecución (en ejecución). Es el número de procesos actualmente en ejecución o listos para ejecutarse.
  • 119 durmiendo . Número total de procesos de sueño. Es la cantidad de procesos durmientes que esperan que suceda algo (depende del proceso) para ser ejecutados.
  • 0 detenido . Número total de procesos detenidos.
  • 0 zombi . Procesos Total Zombie. Los procesos que no se están ejecutando. Estos procesos se dejan en este estado cuando muere el proceso principal que los inició.

La tercera línea  nos muestra los porcentajes de uso del procesador según el número de núcleos.

Las últimas dos líneas  nos brindan información sobre la memoria de solo lectura y el intercambio, respectivamente.

See also  Flashback - First Mass(h)ackathon

En el cuerpo del panel veremos la lista de procesos con la siguiente información:

  • PID  (ID de proceso) el número que identifica a cada proceso, por ejemplo si el nodo Massa, tiene el PID 688, lo podemos visualizar individualmente:

  • PR : Es el número de prioridad que se le da al proceso. Con RT se ejecuta en tiempo real. El rango de prioridad disponible es de -20 a 20, -20 es la prioridad más alta y 20 es la más baja.
  • NI : Asignar prioridad. Si tiene un valor bajo (hasta -20) significa que tiene más prioridad que otro de valor alto (hasta 20).
  • VIRT : La cantidad de memoria virtual utilizada por el proceso.
  • RES : la cantidad de RAM física utilizada por el proceso.
  • %CPU : el porcentaje de CPU utilizado desde la última actualización.
  • %MEM : el porcentaje de memoria física utilizada por el proceso desde la última actualización.
  • TIME+ : el tiempo total de CPU que ha utilizado el proceso desde que se inició.
  • S  (ESTADO): Indica el estado del proceso.
  • COMMAND: The command used to start the process.

To exit the top command, click on CTRL+C

We have a more visual version of this tool through the command htop.

To install the command:

Run the command:

Some of the shortcuts that we can use with the command:

  • M key: sort processes by memory consumption
  • P key: sorts processes by processor consumption
  • T key: sort processes by execution time
  • t key: displays the process tree
  • F key: visually marks a process to follow
  • K key: hide Kernel processes
  • H key: hide user processes
  • k key: kill a process
  • q key: exit htop

System text commands

free: shows the amount of free and used memory that the system has, it also allows you to view the cache and buffer memory consumed by the kernel.

du: shows the amount of space used by the files/archives on the hard drive, as well as their path.

du -h: shows file sizes in a more simple format (GB, MB, KB).

df: shows information related to hard disk usage, available partitions, and mounted disk drives in the system, on readable drives in the system.

Internet monitoring

Test Speed

speedtest: you can test internet speed in Ubuntu.

To install the command:

 

With the — bytes attribute shows the unit of measurement of the data speed:

See also  Testnet version TEST.19.1 is live

 

We can display the data in a simplified way with:

To monitor network traffic we will use nethogs, which shows the bandwidth used by individual processes and sorts the list by putting the most intensive processes at the top.

To install the command:

To show processes order by bandwidth:

Test system ports

An open port does not necessarily mean that it can be accessed from the Internet.

  • Ports preceded by localhost mean that they can only be accessed from the host.
  • 0.0.0.0.:ssh the SSH service port is only accessible from your local network.

The following example shows details about the connections established through the ports of Massa:

How to identify physical and logical network interface names

ifconfig shows all network interfaces (up and down), with physical names and Linux names:

Test full duplex

One of the problems that we can find in our servers running Massa nodes is that the connection to the network is not full-duplex:

Once we know the network interface using the previous command (in our example veth73a09b1), we can view the technical information of the interface.

System log control

System logs are essential to know everything that is happening in the operating system, prevent attacks, resolve malfunctions and improve the capabilities of applications.

To access the main Linux system logs folder:

In the log directory there are many files that record all type of activities:

  • The main system log file is syslog.
  • The auth.log file records all user access to the system.
  • The dpkg.log file contains the log of the packages that were installed and uninstalled on the system..

To search for a text in a file we use the grep command:

Some utilities:

Search Massa incidents:

Search system alerts:

Search important system faults:

Information about when the node started:

Information about when the node stopped:

We can also search by directories:

We look for all the warnings of all the logs:

The tail command displays the last 10 lines of a file:

Useful links about Massa:

Explorador de Testnet:  massa.net/testnet
Tutoriales:  https://massa.readthedocs.io/
Código fuente:  github.com/massalabs/massa
Discord:  discord.com/invite/TnsJQzXkRN
Reddit:  reddit.com/r/massa/
Youtube :  youtube.com/channel/UChVfdvYpn0eFk4B-T7TGmOg
Todos los lanzamientos y registros de cambios para todas las versiones

Total
0
Shares
Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

[Massa Special Interview Series] Aurelien , Rust developer at Massa Labs

Next Post

Cardano to be a gold member at Linux Foundation


Disclaimer : This website does not invite anyone to invest in the projects we are talking about. This is simple information about crypto projects that we find interesting.
Related Posts
testnet episode 14

Massa Testnet Episode 14.1 is here !

👉IMPORTANT: please install the latest version, 14.1 👉CRITICAL: for those who had installed the bugged TEST.14.0, please delete the storage/peers.json file or you might have banned the bootstrap nodes. 👉Scoring will start Monday, September 19 (but it is NOT SURE YET)
Read More
PhilippinesFrenchSpainUkraineRomania