Announcement
Collapse
No announcement yet.
How to copy log file to another location?
Collapse
X
-
I have resorted to running a Python script from a server every 15 min. to write out the log file to a CSV in a network location. So when I reboot, the most I'll lose from the log files is 15 min., which is better than nothing!
-
Originally posted by viper5030 View Post
I've set them to anything ranging from 0 to 100 MB and 1 to 14 days, no change on the behavior of the reboot.
To make sure we're on the same page here, you're saying the Zee S2 on HS3 does not delete its log file on reboot?
Leave a comment:
-
Originally posted by lveatch View PostI do not have a zee, but if it is configured like a z-net is - by design, then /tmp is a tempfs. In other words, ram only in that it's not actually writing to the SD card saving IO on the card and elongating card life. As tmpfs is memory, everything is lost on shutdown. You would need to copy your log file somewhere on /dev/ file system to survive a reboot.
Originally posted by lveatch View Posttry changing your backslashes "" to forward slashes "/" and remove the space in /tmp/HomeSeerLog.hsd.... for example.....
CreateObject("Scripting.FileSystemObject").FileCopy("/tmp/HomeSeerLog.hsd","/home/homeseer/Documents/HomeSeerLog.hsd")
I'm going to try it in C# tomorrow and will post the results.
Leave a comment:
-
Originally posted by viper5030 View PostI'm trying to come up with a shutdown script to copy the log file over to another location in the filesystem of my HomeTroller Zee S2 before it gets deleted.
I thought something like this would do the trick, but it doesn't seem to be working:
CreateObject("Scripting.FileSystemObject").FileCopy("\tmp\Ho meSeerLog.hsd","\home\homeseer\Documents\HomeSeerLog.hsd")
BTW, I'm a noob here, so let me know if you have any tips and tricks for debugging or writing scripts in general. I'm on HS4. Thanks in advance!
CreateObject("Scripting.FileSystemObject").FileCopy("/tmp/HomeSeerLog.hsd","/home/homeseer/Documents/HomeSeerLog.hsd")
Leave a comment:
-
Originally posted by viper5030 View Post
Thanks for your input, but HS support has confirmed that this is 100% intended behavior. I'm not sure who to believe here. Yes, I'm checking filters and even the SQLite file itself -the data gets deleted every time I reboot. I agree that it sort of defeats the purpose, so I'm certainly not happy with the answer I got from support. Any further guidance you can give me from this point would be appreciated.
pi@Z-Net:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.6G 914M 2.6G 27% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 463M 0 463M 0% /dev/shm
tmpfs 463M 47M 417M 11% /run
tmpfs 463M 12K 463M 1% /run/lock
tmpfs 463M 0 463M 0% /sys/fs/cgroup
tmpfs 463M 0 463M 0% /var/tmp
tmpfs 1.0M 1.0M 0 100% /var/log
tmpfs 463M 0 463M 0% /tmp
/dev/mmcblk0p1 63M 21M 43M 33% /boot
Leave a comment:
-
Originally posted by BobSpen View PostWhat are your settings in "Tools/Setup/General" for Log file(or wherever it is in HS4)?
Maybe others running HS4 can comment????
To make sure we're on the same page here, you're saying the Zee S2 on HS3 does not delete its log file on reboot?
Leave a comment:
-
What are your settings in "Tools/Setup/General" for Log file(or wherever it is in HS4)?
Maybe others running HS4 can comment????
Leave a comment:
-
Originally posted by BobSpen View Post
I'm still on HS3 and Log file is not deleted on reboot. Since the core of HS4 is same as HS3, I doubt it is being deleted on reboot--this would almost defeat it's purpose. The only deleting that should occur is when the limits you set in "Setup/General" have been exceeded(time limit or size limit). Please recheck the filter date and time setting on log page.
Leave a comment:
-
Originally posted by viper5030 View Post
It gets deleted upon reboot. Support has confirmed this is intended behavior.
EDIT: I didn't pay attention to whether this happened on HS3 before I upgraded a couple weeks ago. Maybe it's a "feature" of HS4
Leave a comment:
-
Originally posted by Uncle Michael View PostI don't use the Zee, but are you sure the log is being deleted? I would expect it to be continually pruned to keep its size within the limits you've set in the setup page, but otherwise survive a restart of HS. (In HS3, the log filter is reset to begin at the point the last session started, but the filter can be reset to view log entries prior to shutdown. I assume HS4 on the Zee is similar, but I don't know. Have you tried?)
EDIT: I didn't pay attention to whether this happened on HS3 before I upgraded a couple weeks ago. Maybe it's a "feature" of HS4
Leave a comment:
-
I don't use the Zee, but are you sure the log is being deleted? I would expect it to be continually pruned to keep its size within the limits you've set in the setup page, but otherwise survive a restart of HS. (In HS3, the log filter is reset to begin at the point the last session started, but the filter can be reset to view log entries prior to shutdown. I assume HS4 on the Zee is similar, but I don't know. Have you tried?)
Leave a comment:
-
How to copy log file to another location?
I'm trying to come up with a shutdown script to copy the log file over to another location in the filesystem of my HomeTroller Zee S2 before it gets deleted.
I thought something like this would do the trick, but it doesn't seem to be working:
CreateObject("Scripting.FileSystemObject").FileCopy("\tmp\Ho meSeerLog.hsd","\home\homeseer\Documents\HomeSeerLog.hsd")
BTW, I'm a noob here, so let me know if you have any tips and tricks for debugging or writing scripts in general. I'm on HS4. Thanks in advance!Tags: None
Leave a comment: