-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log goes too big #52
Comments
Config can also be used, setting e.g. LogLevel = ERROR and/or SignOfLifeLog to a high value |
Hello. This is what my config looks like. ini: [DEFAULT] [ONPREMISE] Should I still edit it? And please advise how. Here's an extract from Shelly's directory: root@raspberrypi4:/data/dbus-shelly-3em-smartmeter# du Can I request an order to erase the logs? |
Hi, Hope this helps |
Thank you for the quick reply. |
i used crontab as follows before that 0 0 * * 0 rm /data/dbus-shelly-3em-smartmeter/current.log && /bin/bash /data/dbus-shelly-3em-smartmeter/restart.sh but each update removed it. You can use it to manually delete the log (it cannot be done while running) |
Thank you for answer. root@raspberrypi4:~# rm /data/dbus-shelly-3em-smartmeter/current.log && /bin/bash /data/dbus-shelly-3em-smartmeter/restart.sh Please clarify what I am doing wrong. |
It's probably in different folder, just do "du / - h" to look for the
biggest folders
Dne čt 16. 5. 2024 15:59 uživatel Johny H ***@***.***> napsal:
… Thank you for answer.
Unfortunately it doesn't help me.
The answer in Putty is:
***@***.***:~# rm /data/dbus-shelly-3em-smartmeter/current.log &&
/bin/bash /data/dbus-shelly-3em-smartmeter/restart.sh
rm: can't stat '/data/dbus-shelly-3em-smartmeter/current.log': Value too
large for defined data type
Please clarify what I am doing wrong.
Thank you.
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNJC6OIOASFUONJI7MOJDZCS3TJAVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGMZTAMJQG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The command "du / - h" was very long and at the end this. Then I used "du -d 3 /data | sort -nr" Thank you very much for your kind help. |
if you do
cd /data/dbus-shelly-3em-smartmeter/current.log
ls -l
what is the output? also feel free to use chatgpt for the support, works
well with basics ...
čt 16. 5. 2024 v 17:03 odesílatel Johny H ***@***.***> napsal:
… The command "du / - h" was very long and at the end this.
du: -: No such file or directory
du: h: No such file or directory
Then I used "du -d 3 /data | sort -nr"
***@***.***:~# du -d 3 /data | sort -nr
du: /data/dbus-shelly-3em-smartmeter/current.log: Value too large for
defined data type
Thank you very much for your kind help.
Can you think of anything else?
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNJC4DKRDVEBW4HL3OI2TZCTDEPAVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGQ4TOMBWGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
root@raspberrypi4: |
sorry, there was a typo
cd /data/dbus-shelly-3em-smartmeter/
and then ls -l
you have to find the folder where it is installed into use cd and tab-key
to go to the desired folder.
should look like this
***@***.***:~# cd /data/dbus-shelly-3em-smartmeter/
***@***.***:/data/dbus-shelly-3em-smartmeter# ls
README.md current.log docs
install.sh service
config.ini dbus-shelly-3em-smartmeter.py img
restart.sh uninstall.sh
***@***.***:~# rm /data/dbus-shelly-3em-smartmeter/current.log &&
/bin/bash /data/dbus-shelly-3em-smartmeter/restart.shcd ^C
čt 16. 5. 2024 v 17:22 odesílatel Jan Mašek ***@***.***> napsal:
… if you do
cd /data/dbus-shelly-3em-smartmeter/current.log
ls -l
what is the output? also feel free to use chatgpt for the support, works
well with basics ...
čt 16. 5. 2024 v 17:03 odesílatel Johny H ***@***.***>
napsal:
> The command "du / - h" was very long and at the end this.
> du: -: No such file or directory
> du: h: No such file or directory
>
> Then I used "du -d 3 /data | sort -nr"
> ***@***.***:~# du -d 3 /data | sort -nr
> du: /data/dbus-shelly-3em-smartmeter/current.log: Value too large for
> defined data type
>
> Thank you very much for your kind help.
> Can you think of anything else?
>
> —
> Reply to this email directly, view it on GitHub
> <#52 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHKNJC4DKRDVEBW4HL3OI2TZCTDEPAVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGQ4TOMBWGU>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
root@raspberrypi4:~# cd /data/dbus-shelly-3em-smartmeter/ |
rm -rf current.log
./restart.sh
čt 16. 5. 2024 v 18:15 odesílatel Johny H ***@***.***> napsal:
… ***@***.***:~# cd /data/dbus-shelly-3em-smartmeter/
***@***.***:/data/dbus-shelly-3em-smartmeter# ls -l
ls: ./current.log: Value too large for defined data type
-rw-r--r-- 1 root root 4284 Jan 7 2023 README.md
-rw-r--r-- 1 root root 142 May 16 05:00 config.ini
-rw-r--r-- 1 root root 12077 Jan 7 2023 dbus-shelly-3em-smartmeter.py
drwxrwxrwx 2 root root 4096 Jan 7 2023 docs
drwxrwxrwx 2 root root 4096 Jan 7 2023 img
-rwxr-xr-x 1 root root 866 Jan 7 2023 install.sh
-rwxr--r-- 1 root root 160 Jan 7 2023 restart.sh
drwxrwxrwx 3 root root 4096 Mar 5 19:07 service
-rwxr--r-- 1 root root 176 Jan 7 2023 uninstall.sh
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNJC7PLE7CMAQJM635TMTZCTLS3AVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGY3DAMBVGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
root@raspberrypi4:/data/dbus-shelly-3em-smartmeter# rm -rf current.log |
first I would reboot it, try again; if it would not work I would do it
according to chatgpt:
1.
Use the ls command with the -i option to get the inode number of the
file:
bash
Zkopírovat kód
ls -i current.log
This will output the inode number along with the filename.
2.
Once you have the inode number, you can use the find command to delete
the file using the inode number:
bash
Zkopírovat kód
find . -inum [inode_number] -exec rm {} \;
čt 16. 5. 2024 v 18:21 odesílatel Johny H ***@***.***> napsal:
… ***@***.***:/data/dbus-shelly-3em-smartmeter# rm -rf current.log
rm: can't stat 'current.log': Value too large for defined data type
***@***.***:/data/dbus-shelly-3em-smartmeter# ./restart.sh
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNJC7HUIBPS3K66TGECD3ZCTMI7AVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVGY3TGMZSGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
But the current.log file doesn't have that code, so I can't use it... root@raspberrypi4:/data/dbus-shelly-3em-smartmeter# ls -i |
Run fsck maybe it will fix it, i can't help you else
Dne čt 16. 5. 2024 18:57 uživatel Johny H ***@***.***> napsal:
… But the current.log file doesn't have that code, so I can't use it...
***@***.***:/data/dbus-shelly-3em-smartmeter# ls -i
ls: ./current.log: Value too large for defined data type
391692 README.md 391703 install.sh
391693 config.ini 391704 restart.sh
391694 dbus-shelly-3em-smartmeter.py 391705 service
391695 docs 391707 uninstall.sh
391698 img
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNJC722LHN42QYQ7UJ7ZDZCTQQZAVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVG43DMMJZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
root@raspberrypi4:/data/dbus-shelly-3em-smartmeter# fsck Thank you very much for your patience and detailed instructions. I'll try to get some help on how to clear the log so I don't have to uninstall Shelly. After these attempts, it seems that even the uninstall would fail due to the inaccessibility of the log. |
You will probably need to take the sd card to a different machine to be
able to make the changes necessary without running os on it. Really, try
chatgpt.
Dne čt 16. 5. 2024 21:30 uživatel Johny H ***@***.***> napsal:
… ***@***.***:/data/dbus-shelly-3em-smartmeter# fsck
fsck from util-linux 2.35.1
e2fsck 1.45.7 (28-Jan-2021)
/dev/mmcblk0p4 is mounted.
e2fsck: Cannot continue, aborting.
Thank you very much for your patience and detailed instructions. I'll try
to get some help on how to clear the log so I don't have to uninstall
Shelly. After these attempts, it seems that even the uninstall would fail
due to the inaccessibility of the log.
In addition, I also use HomeAssistant and I really don't want to redo
anything with my knowledge :)
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHKNJC7W2JCEHHLI7XOTI7DZCUCMFAVCNFSM6AAAAAA2Z53W6CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJWGAZTCMBUHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@johnyhravy try # echo > /data/dbus-shelly-3em-smartmeter/current.log
# /bin/bash /data/dbus-shelly-3em-smartmeter/restart.sh this should work. I've also fixed the problem with growing log files and waiting that the code will be merged ( PR #71 ) |
Thank you very much for your answer. |
Hi, the current.log tends to gain all the free space on partition. Deleting from time to time solves that, but if you would clear it on boot, it will be better for all others. I can do it by cron, of course.
The text was updated successfully, but these errors were encountered: