Graph1090 data vanishes?

I’m trying to set up TeamViewer on my Pi’s so I can deploy one remotely. One seems to have worked flawlessly, but the other is giving me grief - seems to hang/crash. At some point I looked at Graph1090 on it, and there’s a heap of data that has just vanished(!?):

It was all there (other than maybe a couple brief reboot windows) just a few minutes ago. All of a sudden everything since just before last midnight is “poof” gone. I presume this might indicate a corrupted file (perhaps it was writing to the file when I had a crash?) - I’m not in desperate need to get the data back, but I’m wondering if there’s something I should do to prevent the problem in the future.

The data of graphs1090 is cached in memory and it written to disk only a few times per day. This is to reduce the number of write actions to the disk.
In order to keep the data you should shutdown the Pi with the sudo shutdown command. This transfers the data to disk.
If you just pull the power on the pi the data will be lost
.

2 Likes

As far as i know only once a day during night time.
And it is saved on a soft reboot.

In case the device is cut from power, all data since last night is lost.

From the readme :
Note on data loss: When removing or losing power you will lose graph data generated after 23:42 of the previous day. To avoid that issue sudo shutdown now before unplugging the pi. See the section on reducing writes for more detail.

As i said: Close to Midnight :wink:

1 Like

thanks all! I’m still debugging what’s wrong with the Pi. Something seems to be pegging the cpu at 100%, and the only thing I’ve installed lately is TeamViewer - however I installed that on another Pi the same way, and it’s working fine. In the meantime I will not worry about the graphs.

Open a command line / terminal and use sudo htop to identify which process uses the most CPU load.

I was running/monitoring ‘top’ in a SSH window while installing stuff, and 1090fa was using ~20% of the CPU. Then all of a sudden the Pi became unresponsive - the ‘top’ froze, and it wouldn’t reply to any keyboard input. A ping was responded to - so it was still functioning. I left it sit, hoping it would sort itself out, but it didn’t. Eventially I noticed on my FA stat webpage a comment had popped up noting that FA hadn’t gotten data in an hour, and some additional commentary to the effect '99% CPU usage isn’t conducive to piaware running…" cluing me in that it was a CPU issue.

Would htop give me something more - an ability to look back (afterwards) at what was maxing out the CPU during the period that I couldn’t actually see what was going on?

I’ve been flashing the SD card every so often, so I should have a working image from a couple weeks back - I’ll probably just revert to that, and try to install TeamViewer again.

1 Like

I recently installed TeamViewer on a mini PC for remote access and it did the same thing: after several minutes the mini would slow to a crawl and TeamViewer became unresponsive. The mini has an 11th generation quad-core Intel N5095 CPU and 16GB of DDR4 RAM.

Raspbian comes with RealVNC Server so why not just enable that in the Raspbian configuration then use a VNC client to access it?

I’m using VNC right now inside my house / LAN behind my router. I want to set a Pi up at my parents’ house and I am trying to come up with a way to administer it remotely - from outside their router. TeamViewer seems to create the “tunnel” to get in without needing to actually open up ports, etc. in their router/firewall. I do not believe VNC has that functionality, although if it does, I’d happily use it.

As i said earlier, take a look at Zerotier
It creates a private VPN with just your devices and you have full access from any other of the zerotier-enabled devices without limitation by simply a different IP adress. VNC should work there as well.

I am monitoring and maintaining my local devices via Smartphone when i am offsite :wink:

If you already have VNC running on your LAN it is very easy to add the VNC server so you can connect through your firewall without openning any ports.

Follow these instructions. VNC Connect and Raspberry Pi

I also use Teamviewer which is set up similarly.

S.

1 Like

 

Thank you. I installed Real VNC Viewer on my Windows Desktop and Android Phone.

Next did following on RPi:

STEP-1: I had Raspbian Lite image, so I SSH to RPi and enabled VNC Server as follows:

pi@raspberrypi:~ $ sudo raspi-config

 

STEP-2: Fired up VNC Viewer on Windows PC, got this

image

 

STEP-3: Added GUI to RaspberryPi OS LITE by following commands

sudo apt update 
sudo apt install raspberrypi-ui-mods 
sudo apt install rpi-chromium-mods
sudo reboot

 

STEP-4: Again fired up VNC Viewer on Windows Dsektop, and this time it connected to the RPi’s Desktop

STEP-5: The VNC server by default connects to VNC viewer on same router/LAN. To connect VNC Viewer on a Computer/Phone from internet, did following:

5 (a) Created a cloud account at real VNC using email

5 (b) Connected to RPi VNC Server from Widows Desktop on same router/LAN and changed default setting as shown in screenshot below

 

 

 

Effect of adding GUI and activating VNC Server on performance of RPi

 

image

 

image

 

 

CONCLUSION: I dont need VNC / GUI. I need SSH. Zerotier is better for me as suggested by @foxhunter

 

 

 

 

2 Likes

At present I have 2 RPi’s; a 3B+ and a 4. The 4 can function with TeamViewer just fine, but the 3B+ cannot. I think I’ve figured the issue is RAM - the 4 has 4GB, while the 3B+ has only 1GB, and while running TeamViewer, my 4 is using ~1.5GB. The 3B+ will boot with Teamviewer, but as soon as I request a connection, it freezes. I watched (via top) the TeamViewer %Mem climb steadily towards 80% before it froze (presumably crossing over 100% and swapping like mad).

@abcd567 thanks for the fabulous debugging and documentation. I agree that all I really need is SSH - at least that’s all I’m using 90+% of the time now (occasionally VNC in to run the “SD Card Copier” and snap an image of my install after I do some installs/upgrades). But since I’ve got VNC already running, I might try and see if I can get it to work for “outside the LAN” on the 3B anyway. If I can get it to work on the 4, then I don’t need Teamviewer to check on it while I’m out of the house (at work or on travel).

I’ll also give @foxhunter 's idea of Zerotier a try, that might indeed be best of all, and at least it’s another tool available now and in the future.

Thanks, all!

1 Like

You can clone the SD card from SSH also by using rpi-clone. https://github.com/billw2/rpi-clone

I travel extensively for my work, and my wife isn’t a big fan of phone calls that start with “Honey, could you go out into the garage, find the little computer on the shelf that has the big black cable attached to it? Yeah, that one. There is a wire going into one side that looks like the end of a cell phone charger. Would you unplug that, count to five, and plug it back in for me?”

So I have a two-layer approach.

I have ZeroTier installed on my Pi, as well as my Android cell phone and my MacBook Pro. I have JuiceSSH installed on my phone. If I need to access the command line, I can enable ZeroTier on whichever device I have handy (phone or laptop) and ssh right in. Usually, I just need to reboot.

If the Pi is completely non responsive, I have it plugged into a “smart” outlet that is connected to my Alexa account. I can launch the Alexa app on my phone, turn the power off to the Pi, and turn it back on without needing to disturb the wife.

It’s not a perfect solution, but the last time that I broke my “streak” was several years ago when the Pi locked up one day into my trip and stayed down for four days until I could get home.

This week, I am camping in my travel trailer 100 miles from the house and nobody is home. I received an email notification that my FlightFeeder hadn’t sent data for several hours, so I used the Alexa app to power cycle. Took 30 seconds and I’m back up and running.

2 Likes

I have a very easy, comfortable, and relaxed way to solve failure of Pi when I am away.

Well almost all of you will call it crazy, but what I do is to ignore the failure emails. When I am back I fix the problem.

Streak broken? No problem. I have sustained many broken streaks without getting upset as I have realized that these broken streaks neither cost me money, nor harm me in any other way. :wink:

3 Likes

The solution with Zerotier was discussed here several times. I had some doubts and was still using opened ports and a DNS service (which is offered by router manufacturer AVM without third party vendor) but i gave it a try and it works as expected.

How did you come to this conclusion?

S

VNC does not work without GUI, and GUI is of no use to me as I use Pi for ADS-B only, and for this RaspberryPi OS Lite (no GUI), and SSH are good enough. Why to unnecessarily increase CPU & Memory usage for something I dont need?

May be others prefer to have GUI & VNC. I was talking about myself.