|
1 local stats = require "init"; |
|
2 |
|
3 print("## Memory"); |
|
4 print("Total:", stats.memory_total().." KB"); |
|
5 print("Used:", stats.memory_used().." KB"); |
|
6 print("Free:", stats.memory_free().." KB"); |
|
7 |
|
8 print(""); |
|
9 |
|
10 local disks = stats.disks(); |
|
11 print("## Storage"); |
|
12 for _, info in pairs(disks) do |
|
13 print(info.mounted_on); |
|
14 print(" Device:", info.device); |
|
15 print(" Size: ", info.total.." KB"); |
|
16 print(" Used: ", info.used.." KB"); |
|
17 print(" Free: ", info.free.." KB"); |
|
18 end |
|
19 |
|
20 print(""); |
|
21 |
|
22 local five, ten, fifteen = stats.load_average(); |
|
23 print("## Load"); |
|
24 print("Past 5 minutes: ", five); |
|
25 print("Past 10 minutes:", ten); |
|
26 print("Past 15 minutes:", fifteen); |