I started recently to notice something very strange (for Linux in general).
I have 2 widgets in the tool bar showing me “Total CPU Use” and the other shows “Memory Usage”
I noticed that sometimes I find both showing almost 100% use of CPU and RAM!
My processor is Core i3, and have abuot 19GB RAM. My use is just normal use, browsing, playing YouTube videos in Chromium browser.
The only difference I had, is I just started a few days ago to play a little with Python and webscrapping with Python. I noticed this happens while my scripts was running but back to normal rates after the script finishes running.
I restarted a few times without running any of my scripts, but suddenly found CPU and RAM usage at almost 100% and couldn’t even close the browser or switch between tabs. The only thing I could do was ALT-printscreen REISUB to reboot!
This is my inxi
Thanks @dalto
I will see “htop”
I noticed something after I just did the “REISUB” reboot, the laptoop booted and Dolphin, Terminal and Firefox (multiple windows that seems were used by my script) opened by themselves though I did not run any Python script after last reboot and before this reboot. Same time I didn’t make any of these to boot on startup!
What to check in the script? It could be run only through the command
python myscript.py
and it has nothing to do with running anything on boot.
It just tries to open a few websites, copy their content to a local file. That;s all.
What to check in my script?
Maybe.
I just made a copy of the folders containing the new scripts to an external USB, and deleted them from my drive.
I will see how it goes.
UPDATE:
Updated system, rebooted normally, then “REISUB” and it rebooted normally!
It is weird!
The scripts has nothing to make them run in the background!
I do not know if this code to terminate the script is correctly terminating it:
Step 7: End the running of the script
logging.info("Done!")
Maybe this needs to be modified? It is the last command in the script.
Yes. agree with you. It happens only with this Python script that ends with
Step 7: End the running of the script
logging.info("Done!")
It does not terminate the app explicitly. Though I am not sure as I assume it should end as it reaches the last command. Unless something in the scripts keeps running forever after being called from the script! I will look at the code again.
Thank you all for your inputs.
P.S. Please accept my apology for late reply as I just got busy.
In bash, it terminates at the end of the script, but… this is not bash
I can only handle one programming language at a time (currently bash), so I cannot help