Read the statement by Michael Teeuw here.
VM Disk Full - 50 GiB in 4 months
-
@JohnGalt there is a new script in my package , cleanup.sh
intended to erase all the electron binary downloads and
any npm cache -
@sdetweil – Thanks, Sam.
When I get back from my travels next week I hope to have time to look at this.
IIRC, my primary stumbling block is how full the disk is, meaning I don’t recall if the machine even still boots. I hope it still has room to boot and load the script! That would be great.
-
@JohnGalt if you have a usb carrier for the sd card, you could make and boot another one and mount the old one to erase the files
-
@sdetweil – Just as a reminder, this is an instance of Magic Mirror installed on Linux in a Virtual Machine, running under TrueNAS Scale.
I just confirmed that the VM will start and run and I can SSH into it from my desktop. As such, I should be able to upload the script.
Query: Do we expect the script to run as intended under a VM?
-
@JohnGalt it should under a VM… under a docker container no
-
@sdetweil OK, I was able to run the script on 2 different VMs where MagicMirror is failing to run. In both cases, it still doesn’t run. Th script reported substantially more space available after running, but MagicMirror still doesn’t run. While I am approaching the point where it will be more efficient of my time and yours to just create a 3rd VM, I will post the output of pm2 status below, in case it happens to shed any light on the subject:
al@MM-Dev-VM:~/MagicMirror$ pm2 status SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Configuration.getAllSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:299:17) at Configuration.getSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:270:30) at new API (/usr/local/lib/node_modules/pm2/lib/API.js:116:44) at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/binaries/CLI.js:27:11) at Module._compile (node:internal/modules/cjs/loader:1706:14) at Object..js (node:internal/modules/cjs/loader:1839:10) at Module.load (node:internal/modules/cjs/loader:1441:32) at Function._load (node:internal/modules/cjs/loader:1263:12) at TracingChannel.traceSync (node:diagnostics_channel:328:14) SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Configuration.getAllSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:299:17) at Configuration.getSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:270:30) at module.exports [as list] (/usr/local/lib/node_modules/pm2/lib/API/UX/pm2-ls.js:470:32) at doList (/usr/local/lib/node_modules/pm2/lib/API.js:1758:12) at /usr/local/lib/node_modules/pm2/lib/API.js:1728:7 at /usr/local/lib/node_modules/pm2/node_modules/pm2-axon-rpc/lib/client.js:45:10 at Parser.<anonymous> (/usr/local/lib/node_modules/pm2/node_modules/pm2-axon/lib/sockets/req.js:67:8) at Parser.emit (node:events:519:28) at Parser._write (/usr/local/lib/node_modules/pm2/node_modules/amp/lib/stream.js:91:16) ┌────┬───────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐ │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │ └────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘ al@MM-Dev-VM:~/MagicMirror$ -
@JohnGalt interesting.
Can you show me the .json files in the
MagicMirror/installers folder? -
@sdetweil – Sure. Below are the following:
[1] A listing of all the files in the directory
[2] Complete listing of pm2_MagicMirror.json [user = pi]
[3] Complete listing of pm2_MagicMirror_new.json [same content, but user = al]
[4] Truncated content of cleanup.log.===================================================
[1] File listing:al@MM-Dev-VM:~$ cd MagicMirror/installers al@MM-Dev-VM:~/MagicMirror/installers$ ls -l total 28 -rw-rw-r-- 1 al al 15779 Sep 22 17:25 cleanup.log -rwxrwxr-x 1 al al 318 Apr 12 11:24 mm.sh -rw-rw-r-- 1 al al 213 Apr 12 11:23 pm2_MagicMirror.json -rw-rw-r-- 1 al al 213 Apr 12 11:24 pm2_MagicMirror_new.json[2] pm2_MagicMirror.json [user = pi]:
{ "apps" : [{ "name" : "MagicMirror", "cwd" : "/home/pi", "script" : "/home/pi/MagicMirror/installers/mm.sh", "watch" : ["/home/pi/MagicMirror/config/config.js"] }] }[3] pm2_MagicMirror_new.json [user = al]
{ "apps" : [{ "name" : "MagicMirror", "cwd" : "/home/al", "script" : "/home/al/MagicMirror/installers/mm.sh", "watch" : ["/home/al/MagicMirror/config/config.js"] }] }[4] cleanup.log [truncated the middle…]
cleanup starting - Tue Sep 22 17:25:27 PDT 2026 + sudo apt-get clean + sudo journalctl --vacuum-size=50M Vacuuming done, freed 0B of archived journals from /run/log/journal. Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/user-1000@fcb30571b97048eba4ab97fe572286ba-00000000038cd93a-000659bca4c8e9db.journal (3.5M). Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/system@fcb30571b97048eba4ab97fe572286ba-00000000038cfb74-000659bca4d69467.journal (8.0M). Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/user-1000@fcb30571b97048eba4ab97fe572286ba-00000000038cfb75-000659bca4dc0164.journal (3.5M). [******* snipped ~ 80 lines of the same *****] Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/system@fcb30571b97048eba4ab97fe572286ba-0000000003956462-000659bd5ca164f9.journal (8.0M). Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/user-1000@fcb30571b97048eba4ab97fe572286ba-0000000003956476-000659bd5ca692a8.journal (3.5M). Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/system@fcb30571b97048eba4ab97fe572286ba-0000000003959555-000659bd620a0772.journal (8.0M). Deleted archived journal /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03/user-1000@fcb30571b97048eba4ab97fe572286ba-0000000003959988-000659bd6210320a.journal (3.5M). Vacuuming done, freed 507.5M of archived journals from /var/log/journal/f71bef7b7c2e4cb892282a7354e5fb03. Vacuuming done, freed 0B of archived journals from /var/log/journal. + npm cache clean --force npm notice npm notice New major version of npm available! 10.9.4 -> 12.1.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v12.1.0 npm notice To update run: npm install -g npm@12.1.0 npm notice + pm2 flush SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Configuration.getAllSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:299:17) at Configuration.getSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:270:30) at new API (/usr/local/lib/node_modules/pm2/lib/API.js:116:44) at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/binaries/CLI.js:27:11) at Module._compile (node:internal/modules/cjs/loader:1706:14) at Object..js (node:internal/modules/cjs/loader:1839:10) at Module.load (node:internal/modules/cjs/loader:1441:32) at Function._load (node:internal/modules/cjs/loader:1263:12) at TracingChannel.traceSync (node:diagnostics_channel:328:14) [PM2] Flushing /home/al/.pm2/pm2.log [PM2] Logs flushed cleanup finished - Tue Sep 22 17:25:54 PDT 2026 free space before: 36G after: 37G -
@JohnGalt ok, do
pm2 info >somefile.txt 2>&1
it should dump out all the info about your pm2 apps…
you could also do
pm2 delete MagicMirror pm2 flushand run the pm2 setup script listed here
https://github.com/sdetweil/MagicMirror_scripts#add-using-pm2-to-autostart-magicmirror-at-bootup -
@sdetweil – Thanks Sam.
Output of pm2 info >somefile.txt 2>&1 renders the following. I ran it in the home directory, as well as in the MagicMirror directory with the same results. given the error, I stopped there and di not do the other steps…
SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at Configuration.getAllSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:299:17) at Configuration.getSync (/usr/local/lib/node_modules/pm2/lib/Configuration.js:270:30) at new API (/usr/local/lib/node_modules/pm2/lib/API.js:116:44) at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/binaries/CLI.js:27:11) at Module._compile (node:internal/modules/cjs/loader:1706:14) at Object..js (node:internal/modules/cjs/loader:1839:10) at Module.load (node:internal/modules/cjs/loader:1441:32) at Function._load (node:internal/modules/cjs/loader:1263:12) at TracingChannel.traceSync (node:diagnostics_channel:328:14) error: missing required argument `name|id'
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login