My description doesn't do this justice, the example that follows does. And another example is here.
create table foo (load1 DECIMAL(3, 2),
load5 DECIMAL(3, 2),
load15 DECIMAL(3, 2),
active_processes VARCHAR(12),
lastpid INTEGER)
engine=filesystem connection="/proc/loadavg";
select * from foo;
+-------+-------+--------+------------------+---------+
| load1 | load5 | load15 | active_processes | lastpid |
+-------+-------+--------+------------------+---------+
| 0.01 | 0.39 | 0.65 | 1/98 | 1713 |
+-------+-------+--------+------------------+---------+
create table vmstat (label varchar(64), value integer)
engine=filesystem connection="/proc/vmstat";
select * from vmstat order by label limit 4;
+-------------------+--------+
| label | value |
+-------------------+--------+
| allocstall | 0 |
| kswapd_inodesteal | 1393 |
| kswapd_steal | 133347 |
| nr_anon_pages | 2265 |
+-------------------+--------+
View comments