MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. evroom
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    Offline
    • Profile
    • Following 0
    • Followers 2
    • Topics 18
    • Posts 476
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Strange issue

      @richland007
      Concerning your top.txt, was that the output on the moment that MM was restarted ?
      I do not see obvious memory issues.
      Only that vncserver and python are CPU hungry, but within limits.
      And I do not see any electron processes.

      posted in Troubleshooting
      evroomE
      evroom
    • RE: Strange issue

      @richland007
      On pm2 and restarting I cannot say many.
      On using ctrl+q neither, as I only access my MM via ssh.

      Can you send the output of the following commands:

      $ uname -a
      $ swapon -s
      $ free -h
      $ cat /etc/dphys-swapfile | egrep -v ‘#|^$’
      $ sudo service dphys-swapfile status

      I just learned that swap is handled as a service.
      Being old-school, this is something new to me :-)

      posted in Troubleshooting
      evroomE
      evroom
    • RE: Strange issue

      To disable MMM-WatchDog, edit the config.js file.
      Locate:

      module: 'MMM-WatchDog',
      

      Edit this like this:

      module: 'MMM-WatchDog',
      disabled: true,
      

      and restart MM:

      $ pm2 restart mm
      

      Use

      pm2 list
      

      to check if your application name actually is mm, or something else.

      Later you can enable it again by updating config.js like this:

      disabled: false,
      

      This works for all modules.
      When I test modules I normally leave the config lines and disable a module in this fashion.

      posted in Troubleshooting
      evroomE
      evroom
    • RE: Strange issue

      Okay, this calls for some more basics.

      Print the whole file:
      $ cat top.txt

      Load the file in an editor:
      $ nano top.txt
      $ vi top.txt

      I am old-school, so I use vi, but nano is more Word-like.

      To show the last 50 lines:
      $ tail -50 top.txt

      To show the first 50 lines:
      $ head -50 top.txt

      Where of course 50 is just an example.

      To show text that is appending:
      $ tail -f top.txt

      To show text that is appending and re-open the file when necessary (useful for rotating log files):
      $ tail -F top.txt

      On disabling a module see the next reply.

      posted in Troubleshooting
      evroomE
      evroom
    • RE: Can't find out what I did wrong in my config.js...

      Glad to help.
      So many errors after only one mistake (the most common to make; we all did it sometime I guess) :slightly_smiling_face:

      posted in Troubleshooting
      evroomE
      evroom
    • RE: Can't find out what I did wrong in my config.js...

      Perhaps this is a start, provided I copy/pasted it right ?
      Although I think you are familiar with this and used other linters to find the ‘mistake’.

      pi@MagicPi:~/MagicMirror $ cd ~/MagicMirror; npm run config:check
      
      Checking file...  /home/pi/MagicMirror/config/config.js
      Line 213 col 42 Missing semicolon.
      Line 218 col 18 Missing semicolon.
      Line 222 col 5 Expected '}' to match '{' from line 190 and instead saw '{'.
      Line 223 col 7 Expected ']' to match '[' from line 28 and instead saw 'module'.
      Line 223 col 13 Expected '}' to match '{' from line 11 and instead saw ':'.
      Line 223 col 14 Missing semicolon.
      Line 224 col 7 Expected an assignment or function call and instead saw an expression.
      Line 224 col 15 Missing semicolon.
      Line 224 col 7 Unrecoverable syntax error. (94% scanned).
      

      I think you missed a } around line 220.

      The “Missing semicolon” messages normally are just nitpicking, but the "Expected ‘}’ to match ‘{’ " are usually true.

      posted in Troubleshooting
      evroomE
      evroom
    • calendar module: Today at HH:MM

      Hi,

      Searching did not lead to a solution.
      My current config shows date and time for all items (for example Nov 19th 12:00).
      I would like to see “Today at 12:00” for todays items.
      Is that posible ?

      module: "calendar",
      disabled: false,
      header: "Family Calendar",
      position: "top_left",
      maximumEntries: 12,
      maximumNumberOfDays: 365,
      fetchInterval: 300000,
      maxTitleLength: 35,
      getRelative: 0,
      timeFormat: "absolute",
      dateFormat: "MMM Do kk:mm",
      fullDayEventDateFormat: "MMM Do",
      showEnd: false,
      displaySymbol: false,
      
      posted in Troubleshooting
      evroomE
      evroom
    • RE: Strange issue

      @richland007
      I re-read your first post and your problem is more restarting then actual crashing.
      Of course a restart can be caused by a crash …
      MMM-WatchDog tends to restart MM, so I too would suggest to remove this module.
      In principle all it does is sending a ping and restarting MM using pm2 when a timeout occurs.
      I also would expect to see some lines in the pm2 logs on WatchDog.
      Can you do ?:

      pi@MagicPi:~ $ grep -i watchdog /home/pi/.pm2/logs/mm-out.log
      pi@MagicPi:~ $ grep -i watchdog /home/pi/.pm2/logs/mm-error.log
      

      What is alo a good package to install is sysstat:

      pi@MagicPi:~ $ sudo apt-get install sysstat
      

      This allows for commands like iostat and sar.

      vmstat 10 10
      iostat 10 10
      sar 10 10
      
      posted in Troubleshooting
      evroomE
      evroom
    • RE: Strange issue

      Ha ha, not that great, my MM is as slow as a turtle again.
      The used swap on my USB stick in the meanwhile is 1GB.
      Cannot use any commands to investigate further.
      Not very satisfactory. :frowning_face:

      posted in Troubleshooting
      evroomE
      evroom
    • RE: Strange issue

      @richland007

      Then let’s give it a try :slightly_smiling_face:

      First create the script:

      pi@MagicPi:~ $ cd
      pi@MagicPi:~ $ nano top.sh
      

      Copy-paste this:

      !/bin/sh
      
      date >> /home/pi/top.txt
      top -b -o +%MEM | head -n 22 >> /home/pi/top.txt
      top -b -o +%MEM | head -n 22 >> /home/pi/top.txt
      echo "=============================================" >> /home/pi/top.txt
      

      Make it executable:

      pi@MagicPi:~ $ chmod 755 top.sh
      

      Perhaps a good idea to prepare the output file in order to be sure the cron user can write in it:

      pi@MagicPi:~ $ touch /home/pi/top.txt
      pi@MagicPi:~ $ chmod 666 /home/pi/top.txt
      

      Now we add a cronjob:

      pi@MagicPi:~ $ crontab -e
      

      Add this line at the end:

      00,05,10,15,20,25,30,35,40,45,50,55 * * * * /home/pi/top.sh >/dev/null 2>&1
      

      To verify:

      pi@MagicPi:~ $ crontab -l
      

      To verify if the cronjob is actually running:

      pi@MagicPi:~ $ tail -F /var/log/syslog
      

      To check if something comes in your output file:

      pi@MagicPi:~ $ tail -F top.txt
      

      The script will run every 5 minutes, every hour, every day.
      It will output the top 15 MEMory usage and the top 15 CPU usage.

      In your case, it will be interesting to look at the last entries before the crash.
      Need to identify first if it is an CPU or MEM issue, or both.
      Then we can modify the script.

      Please do not post lengthy output.
      Better we minimise the output by grepping and sorting, etc.

      Success!

      posted in Troubleshooting
      evroomE
      evroom
    • 1
    • 2
    • 40
    • 41
    • 42
    • 43
    • 44
    • 47
    • 48
    • 42 / 48