Runtime Error: /mod/monitor/lib/db.jim:69: database disk image is malformed
in procedure 'record' called at file "/mod/monitor/bin/smart", line 38
at file "/mod/monitor/lib/db.jim", line 69
1392088682|raw|0|0|432|0|2593
1392088742|raw|0|0|432|0|2593
1392088800|5min|0|0|432|0|2593
1392088802|raw|0|0|432|0|2593
1392088862|raw|0|0|432|0|2593
1392088922|raw|0|0|432|0|2593
1392088982|raw|0|0|432|0|2593
1392089042|raw|0|0|432|0|2593
1392089100|5min|0|0|432|0|2593
Error: database disk image is malformed
humax# sqlite3 /mod/monitor/monitor.db.bak ".dump" > backup.sql
humax# sqlite3 /mod/monitor/monitor.db < backup.sql
Error: near line 3: table smart already exists
Error: near line 3292: table temp already exists
Error: near line 6597: table vmstat already exists
But nothing has actually been changed, has it?Just rebooted again (from webif) and it's still working fine so looks like it's fixed.
humax# sqlite3 /mod/monitor/monitor.db "select * from vmstat where dat>1393095000"
humax# pkill crond
humax# /mod/sbin/crond -f -d 1
humax# pkill crond
humax# /mod/sbin/crond
crond: USER root pid 25292 cmd /mod/monitor/run -d
+ Starting smart +
Creating table: (create table if not exists smart (
dat integer not null primary key,
scope text not null default 'raw'
,realloc integer,offline integer,startstop integer,pending integer,poh integer))
RECORD: (insert or replace into smart
(dat, scope, realloc, offline, startstop, pending, poh) values(1393195861,'raw', '0', '0', '294', '0', '10079'))
+ Starting temp +
Creating table: (create table if not exists temp (
dat integer not null primary key,
scope text not null default 'raw'
,temp integer))
RECORD: (insert or replace into temp
(dat, scope, temp) values(1393195862,'raw', '43'))
+ Starting vmstat +
Creating table: (create table if not exists vmstat (
dat integer not null primary key,
scope text not null default 'raw'
,freemem integer,buffmem integer,scpu integer,cachemem integer,ucpu integer,idle integer,wcpu integer))
RECORD: (insert or replace into vmstat
(dat, scope, freemem, buffmem, scpu, cachemem, ucpu, idle, wcpu) values(1393195862,'raw', '7480', '16864', '8', '53056', '9', '79', '4'))
crond: wakeup dt=10
Yeah, the line with the # just stops it working, so all you need to do to put it back as it was is to remove the # and the following line. Saves trying to remember what it was before...Is this how it should look after the changes:-
case "$1" in
start)
#/mod/sbin/crond & ;;
/mod/sbin/crond -f -d 1 >/mod/tmp/crond.log 2>&1 & ;;
stop)
killall crond ;;
*)
exit 1 ;;
esac
There should be a line starting with "RECORD:" after the "Creating table" bits, but there isn't. The cause of that would seem to be the Runtime Error about being unable to load the library. The cause of that is unclear.Runtime Error: /mod/monitor/bin/vmstat:20: /mod/bin/vmstat: can't load library 'libproc-3.2.8.so'
at file "/mod/monitor/bin/vmstat", line 20
+ Starting vmstat +
Creating table: (create table if not exists vmstat (
dat integer not null primary key,
scope text not null default 'raw'
,freemem integer,buffmem integer,scpu integer,cachemem integer,ucpu integer,idle integer,wcpu integer))
crond: wakeup dt=10