Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.5 KB

File metadata and controls

46 lines (38 loc) · 1.5 KB

Description

System resource logging for Linux.

Measurements performed each second. Metrics tracked:

  • CPU utilization
  • RAM used

How to run

lua main.lua

Example

Sat Jan 18 13:23:45 2025 | CPU Utilization: 1.7%, RAM Utilization: 533 MB
Sat Jan 18 13:23:46 2025 | CPU Utilization: 1.6%, RAM Utilization: 533 MB
Sat Jan 18 13:23:48 2025 | CPU Utilization: 7.7%, RAM Utilization: 532 MB
Sat Jan 18 13:23:49 2025 | CPU Utilization: 3.3%, RAM Utilization: 532 MB
Sat Jan 18 13:23:50 2025 | CPU Utilization: 3.1%, RAM Utilization: 532 MB
Sat Jan 18 13:23:51 2025 | CPU Utilization: 3.2%, RAM Utilization: 532 MB
Sat Jan 18 13:23:52 2025 | CPU Utilization: 3.2%, RAM Utilization: 531 MB
Sat Jan 18 13:23:54 2025 | CPU Utilization: 0%, RAM Utilization: 531 MB
Sat Jan 18 13:23:55 2025 | CPU Utilization: 3.3%, RAM Utilization: 531 MB
Sat Jan 18 13:23:56 2025 | CPU Utilization: 4.7%, RAM Utilization: 531 MB
Sat Jan 18 13:23:57 2025 | CPU Utilization: 0%, RAM Utilization: 530 MB
Sat Jan 18 13:23:58 2025 | CPU Utilization: 4.8%, RAM Utilization: 530 MB

Dependencies

This project requires the following dependencies:

  • Lua 5.x (tested with Lua 5.4.7)
  • LuaSocket: A Lua library for networking and utility functions
  • LuaFileSystem: A Lua library developed to complement the set of functions related to file systems

Installation Instructions

Install Lua and LuaRocks

On Ubuntu/Debian:

sudo apt update
sudo apt install lua5.3 luarocks
sudo apt-get install lua-filesystem