Help with Wifi Scan backups

All related to the Kernel, packages system and libraries
libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Thu Mar 09, 2017 9:09 am

Hi ammarL,

Your storage is not full:

rootfs 1510032 942220 491104 66% /
/dev/hda3 5115360 3074568 1780944 64% /mnt/user


If your database is corrupted, try to regenerate it. You can see wifiScan structure with this commands:

Connect to MySQL:

Code: Select all

mysql -h localhost -u root -p
Select MeshliumDB:

Code: Select all

mysql> use MeshliumDB;
View wifiScan details:

Code: Select all

mysql> describe wifiScan;
You can see the structure like this:

Code: Select all

+-----------+--------------+------+-----+-------------------+----------------+
| Field     | Type         | Null | Key | Default           | Extra          |
+-----------+--------------+------+-----+-------------------+----------------+
| ID_frame  | int(11)      | NO   | MUL | NULL              | auto_increment | 
| TimeStamp | timestamp    | NO   |     | CURRENT_TIMESTAMP |                | 
| MAC       | varchar(17)  | NO   |     | NULL              |                | 
| SSID      | varchar(32)  | NO   |     | NULL              |                | 
| RSSI      | varchar(3)   | NO   |     | NULL              |                | 
| Vendor    | varchar(150) | NO   |     | NULL              |                | 
| Type      | varchar(10)  | NO   |     | NULL              |                | 
| AP        | varchar(17)  | NO   |     | NULL              |                | 
| sync      | int(1)       | NO   |     | 0                 |                | 
+-----------+--------------+------+-----+-------------------+----------------+
9 rows in set (0.01 sec)
Please, tell us the result.

Best regards

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Fri Mar 10, 2017 12:23 am

meshlium_645c:~# mysql -h localhost -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12064
Server version: 5.0.51a-24+lenny3 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use MeshliumDB;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> describe wifiScan;
ERROR 144 (HY000): Table './MeshliumDB/wifiScan' is marked as crashed and last (automatic?) repair failed
mysql>

--

Please advise.

Thanks

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Fri Mar 10, 2017 10:06 am

Hi ammarL,

Your problem is some tables corrupted, try to repair them, but before is necesarry stop sensorParser service:

Code: Select all

sensorParser.sh stop
Combine all corrupted tables of a database, this take some time, be paciente:

Code: Select all

mysqlcheck -u root -p --auto-repair -c -o -r <database>
When mysqlcheck finished, restart Meshlium and try again, tell us the result.

Best regards,

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Fri Mar 10, 2017 5:52 pm

meshlium_645c:/mnt/usr# ifconfig
ath0 Link encap:Ethernet HWaddr 00:0b:6b:23:33:7d
inet addr:10.10.10.1 Bcast:10.10.10.255 Mask:255.255.255.0
inet6 addr: fe80::20b:6bff:fe23:337d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1878 errors:0 dropped:0 overruns:0 frame:0
TX packets:725 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:136652 (133.4 KiB) TX bytes:360342 (351.8 KiB)

ath1 Link encap:UNSPEC HWaddr 00-0B-6B-23-33-9A-61-74-00-00-00-00-00-00-00-00
UP BROADCAST NOTRAILERS RUNNING PROMISC ALLMULTI MTU:1500 Metric:1
RX packets:146661 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:39791415 (37.9 MiB) TX bytes:0 (0.0 B)

eth0 Link encap:Ethernet HWaddr 00:0d:b9:3d:64:5c
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:10 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4053 errors:0 dropped:0 overruns:0 frame:0
TX packets:4053 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1017200 (993.3 KiB) TX bytes:1017200 (993.3 KiB)

wifi0 Link encap:UNSPEC HWaddr 00-0B-6B-23-33-7D-61-74-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6878 errors:0 dropped:0 overruns:0 frame:687038
TX packets:3546 errors:1071 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:663536 (647.9 KiB) TX bytes:730049 (712.9 KiB)
Interrupt:9

wifi1 Link encap:UNSPEC HWaddr 00-0B-6B-23-33-9A-61-74-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1630646 errors:0 dropped:0 overruns:0 frame:1073624
TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:54290831 (51.7 MiB) TX bytes:5476 (5.3 KiB)
Interrupt:11

meshlium_645c:/mnt/usr# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
10.10.10.0 * 255.255.255.0 U 0 0 0 ath0
meshlium_645c:/mnt/usr# ping 8.8.8.8
connect: Network is unreachable
meshlium_645c:/mnt/usr# tracert -n 8.8.8.8

connect: Network is unreachable

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Fri Mar 10, 2017 5:52 pm

Sorry please ignore previous message:

Database

meshlium_645c:/mnt/usr# sensorParser.sh stop
meshlium_645c:/mnt/usr# Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB2: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB2: File exists
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyUSB0: File exists

meshlium_645c:/mnt/usr# mysqlcheck -u root -p --auto-repair -c -o -r MeshliumDB
Enter password:
MeshliumDB.bluetoothData OK
MeshliumDB.currentSensors OK
MeshliumDB.encryptionData OK
MeshliumDB.gpsData OK
MeshliumDB.last_data OK
MeshliumDB.meshlium OK
MeshliumDB.sensorParser OK
MeshliumDB.sensors OK
MeshliumDB.tokens OK
MeshliumDB.users OK
MeshliumDB.waspmote OK
MeshliumDB.wifiScan
error : Can't create new tempfile: './MeshliumDB/wifiScan.TMD'
status : Operation failed
MeshliumDB.zigbeeData OK
meshlium_645c:/mnt/usr#

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Mon Mar 13, 2017 9:03 am

Hi ammarL,

There may be three reasons behind this error:

1. Your system is running short of disk space. Please, check that typing

Code: Select all

df -h
in order to see the status of the partitions. If there is one closer to 100%, you can delete unnecessary files like logs.

2. You don't have the proper permissions running the command. You can try with

Code: Select all

remountrw && /mnt/usr# mysqlcheck -u root -p --auto-repair -c -o -r MeshliumDB
3. There is a misconfiguration in the database. You can type

Code: Select all

remountrw && myisamchk -r -f wifiScan.MYI


Let us know if you can fix the issue with this information.

Best regards,

ammarL
Posts: 26
Joined: Wed Aug 24, 2016 4:57 pm

Re: Help with Wifi Scan backups

Post by ammarL » Wed Mar 15, 2017 1:12 am

Hi Team,

Unfortunately the commands you recommended did not help. Here is the output:

meshlium_645c:~# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 1.5G 924M 476M 66% /
udev 10M 2.7M 7.4M 27% /dev
/dev/disk/by-label/ROOT_FS
1.5G 924M 476M 66% /
tmpfs 125M 11M 115M 9% /lib/init/rw
varrun 125M 88K 125M 1% /var/run
varlock 125M 4.0K 125M 1% /var/lock
tmpfs 125M 4.0K 125M 1% /dev/shm
/dev/hda3 4.9G 3.0G 1.7G 64% /mnt/user
tmpfs 125M 1004K 124M 1% /tmp
tmpfs 125M 11M 115M 9% /var/log
tmpfs 125M 11M 115M 9% /var/tmp
/dev/mapper/lib 887M 41M 802M 5% /mnt/lib
meshlium_645c:~# remountrw && mysqlcheck -u root -p --auto-repair -c -o -r MeshliumDB
Enter password:
MeshliumDB.bluetoothData OK
MeshliumDB.currentSensors OK
MeshliumDB.encryptionData OK
MeshliumDB.gpsData OK
MeshliumDB.last_data OK
MeshliumDB.meshlium OK
MeshliumDB.sensorParser OK
MeshliumDB.sensors OK
MeshliumDB.tokens OK
MeshliumDB.users OK
MeshliumDB.waspmote OK
MeshliumDB.wifiScan
error : Can't create new tempfile: './MeshliumDB/wifiScan.TMD'
status : Operation failed
MeshliumDB.zigbeeData OK

meshlium_645c:~# remountrw && myisamchk -r -f /mnt/user/mysql/MeshliumDB/wifiScan.MYI
- recovering (with sort) MyISAM-table '/mnt/user/mysql/MeshliumDB/wifiScan.MYI'
Data records: 618
- Fixing index 1
6438000
Wrong bytesec: 0- 0- 0 at 803081272; Skipped
myisamchk: Disk is full writing '/tmp/ST78r2cd' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs

^[[A^[[A

myisamchk: Disk is full writing '/tmp/ST78r2cd' (Errcode: 28). Waiting for someone to free space... Retry in 60 secs

----

I eventually quit it by using CTRL+C. I believe I've run into this issue before and even after hours of running it doesn't complete.

Please advise.

Thanks

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Help with Wifi Scan backups

Post by libelium-dev » Wed Mar 15, 2017 2:46 pm

Hi ammarL,

You should have a file called wifiScan.TMD in /mnt/user/mysql/MeshliumDB. Please, rename it (for example _wifiScan.TMD) and enter in mysql using the terminal

Code: Select all

mysql -u root -p
The password will be required, and then type

Code: Select all

mysql> use MeshliumDB;
mysql> repair table wifiScan ;
This should work. Let us know.

Best regards,

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest