Is it possible to change the path where sensors are logged to an USB drive?
If so where to change this.
Change logging path to USB drive?
-
- Site Admin
- Posts: 313
- Joined: Sun Nov 30, 2014 2:16 pm
Re: Change logging path to USB drive?
Yes, in the logFile-field, you can give an absolute path to the file. So if the path to the USB-drive is /dev/sdc, you can for example specify the log file
as: /dev/sdc/logs/loutside.log
as: /dev/sdc/logs/loutside.log
Re: Change logging path to USB drive?
In "settings" at "Logfile" I entered: /media/pi/RASPBERRY/loutside.log
My USB drive are mounted with the name "RASPBERRY" at /media/pi/ as above
Is this correct then?: /media/pi/RASPBERRY/loutside.log
I have a termometer which I named the logfile (in the sensor field) "Temp CH1.log", will this be written to my USBdrive or should I in the sensor field enter the path to the logfile: /media/pi/RASPBERRY/Temp CH1.log? if so what does the field "Logfile" in settings do?
This is the eroor I got:
Failed to open log file: /media/pi/RASPBERRY/loutside.log Error:java.io.FileNotFoundException: /media/pi/RASPBERRY/loutside.log (Åtkomst nekas)
17.10.13 10:15:00 ValueItemLoggerFileBased Failed to open log file: /media/pi/RASPBERRY/Temperatur CH1 Error:java.io.FileNotFoundException: /media/pi/RASPBERRY/Temperatur CH1 (Åtkomst nekas)
17.10.13 10:00:06 ValueItemLoggerFileBased Failed to open log file: /media/pi/RASPBERRY/loutside.log Error:java.io.FileNotFoundException: /media/pi/RASPBERRY/loutside.log (Åtkomst nekas)
My USB drive are mounted with the name "RASPBERRY" at /media/pi/ as above
Is this correct then?: /media/pi/RASPBERRY/loutside.log
I have a termometer which I named the logfile (in the sensor field) "Temp CH1.log", will this be written to my USBdrive or should I in the sensor field enter the path to the logfile: /media/pi/RASPBERRY/Temp CH1.log? if so what does the field "Logfile" in settings do?
This is the eroor I got:
Failed to open log file: /media/pi/RASPBERRY/loutside.log Error:java.io.FileNotFoundException: /media/pi/RASPBERRY/loutside.log (Åtkomst nekas)
17.10.13 10:15:00 ValueItemLoggerFileBased Failed to open log file: /media/pi/RASPBERRY/Temperatur CH1 Error:java.io.FileNotFoundException: /media/pi/RASPBERRY/Temperatur CH1 (Åtkomst nekas)
17.10.13 10:00:06 ValueItemLoggerFileBased Failed to open log file: /media/pi/RASPBERRY/loutside.log Error:java.io.FileNotFoundException: /media/pi/RASPBERRY/loutside.log (Åtkomst nekas)
-
- Site Admin
- Posts: 313
- Joined: Sun Nov 30, 2014 2:16 pm
Re: Change logging path to USB drive?
It is the logFile-field in the sensor that should specify the full path to the log file for the sensor. You have to make sure that the user "nethome" has write access to the specified directory, so it can create and update the files there. This seems to be your current problem.
The logFile-field in settings, is to log event statistics for the server.
The logFile-field in settings, is to log event statistics for the server.
Re: Change logging path to USB drive?
Thanks for your answer but I have tried that now with no luck.
I made the directory with both owner and group "nethome"
I created a logfile in the above directory and changed the permission to the logfile the same "nethome"
Any other suggestions?
Regards Goran
I made the directory with both owner and group "nethome"
I created a logfile in the above directory and changed the permission to the logfile the same "nethome"
Any other suggestions?
Regards Goran
-
- Site Admin
- Posts: 313
- Joined: Sun Nov 30, 2014 2:16 pm
Re: Change logging path to USB drive?
Hmm, strange - could it be that rights are missing on the path there?
Try to log in as nethome:
and go to the location an create/modify files, that might give some ideas why it is failing
Try to log in as nethome:
Code: Select all
sudo su - nethome
Re: Change logging path to USB drive?
Thanks for answer.
For some unkown reason (I have played with so many idees) I finally got it to work.
The unknowed reason I guess/hope is this:
the directory tree to the logfile is /media/pi/gb/log
where gb is the USBdrive
I had to make directory "pi" "gb" and "log" and change the owner to "nethome"
I then had to create and the change write and owner manually on the logfiles
For some unkown reason (I have played with so many idees) I finally got it to work.
The unknowed reason I guess/hope is this:
the directory tree to the logfile is /media/pi/gb/log
where gb is the USBdrive
I had to make directory "pi" "gb" and "log" and change the owner to "nethome"
I then had to create and the change write and owner manually on the logfiles