Skip to content
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

Add debugging for no disk #19

Open
ribalba opened this issue Dec 4, 2023 · 1 comment
Open

Add debugging for no disk #19

ribalba opened this issue Dec 4, 2023 · 1 comment

Comments

@ribalba
Copy link
Member

ribalba commented Dec 4, 2023

We are currently seeing that in some cases power metrics does not report a disk being present. We should add some debugging to see when this happens as normally a disk doesn't vanish.

@ArneTR
Copy link
Member

ArneTR commented Dec 5, 2023

I patched this in for the moment which will give me an OS notification:

c.execute('INSERT INTO measurements (time, data, uploaded) VALUES (?, ?, 0)',
                    (data['timestamp'], compressed_data_str))

            subprocess.check_output(['osascript', '-e', 'display notification "Disk is empty" with title "PowerHog Logger Warning" subtitle time string of (current date)'])
            logging.info('Disk is empty!')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants