I recently started using React in my web apps to make them more interactive. React is great for the view layer of an application, but it needs to be paired with a backend of some sort. In my web apps, I use Ruby on Rails to generate a JSON API that is consumed by my React views. In getting started with React and Ruby on Rails, I learned a few things. I'd like to share those with you today.
I like knowing what's going on on my servers, but I haven't had time to set up a real monitoring system. Usually when I want to check on my servers, I just remote in with SSH and fire up top and a couple other utilities. After I realized I tend to always check the same things again and again (CPU usage, RAM usage, free disk space), I decided to dump all those things into a page that my server would then serve up. This way I can check my server's health with from anywhere with an internet connection, and the time it took to set up was just a couple minutes.
If you find your server seems to be running out of disk space, the first thing you should do is figure out how full your disk really is. After that, you'll need a way to quickly zero in on which files and folders are using up the most disk space unnecessarily.