From Ubiquiti Wiki
Author: Sigmund Shapiro, created October 16, 2009
What is UBooT?
UBoot is a Java based application that provides the ability to reboot your UBNT devices on a periodic basis. Before downloading, please review the application details below. If you feel utilization of this program will help your system run smoother, simply click on the link at the bottom of the page to download the Windows based installer.
- This is a totally free application.
- I will gladly entertain suggestions for modifying it and will gladly fix any "bugs" found.
- You will need Java JRE 1.4 or greater installed on the system you run the application on.
- You need to enable SSH on each UBNT device you wish to periodically reboot.
- The installer lays down a jar file (UBooT.jar). I have taken this jar and run it on both UNIX and LINUX without issues but for these platforms, your on your own.
- Submit suggestions and report issues to email@example.com
Why use UBooT?
First, a periodic reboot seems to keep my system running smoother. Not only do I use it to reboot my CPEs but APs as well. Software inherently chews up memory. This can be especially true with devices that do memory intensive operations. These units perform nothing but "in memory" operations. Also, these devices are somewhat memory constraint so any memory that is not properly "freed" will equate to system slowdown.
I know many either...
- Use the ping watchdog to perform a reboot if the CPE cannot reach the AP or whatever corresponds to the IP you have designated.
- What I have found is this rarely happens unless you have a catastrophic failure. Also, I have found that if an AP (at least using B2HP as an AP) is not rebooted occasionally, you suddenly loose the ability to bring up any CPE's GUI on that AP. Cannot even SSH into it. Lots of folks don't realize this is happening but I have another application that monitors each CPE by doing a simple ping on a periodic basis. If a certain number of pings are missed in a configurable period of time, the application sends me an email indicating a possible problem. If I don't reboot the AP's at least once a week, I get bombarded with these false failure emails. I originally thought it was the CPE units but is actually something about the AP's firmware (I think). This other application also logs when my backbone is unavailable. I can then call Deltacom and grip about it (got to get your laughs some way right).
- Log into the unit and reboot via the UI or even SSH'ing and typing "reboot" to get similar results.
- However, if you have hundreds of units deployed, this would be time consuming to say the least.
Also, I wanted to perform this periodic reboot when my system has the least number of active users online. This application lets me select an extremely late night or early morning reboot. It also lets me "stagger" the units reboot so that no two units are in the reboot state at one time. Each individual unit is "time configurable".
Lastly, ANYTHING I can do to automate maintenance is time I don't have to spend "dinkin" around with the stuff. Myself and others have put in feature requests for this type of functionality in the past but to be honest, I like this option better since I can change EVERYTHING from one location without logging into each unit. However, I do realize this is subjective and only offer this application based solely on my past experience and correlating opinions.
After downloading and double clicking on the install_UBooT_v11.exe, you will be presented with the screen as depicted to the right. As you proceed through the installation, you will be presented with various options such as:
Upon successful installation, click Finish to complete
Once UBooT has been successfully installed, the first time this application is started you will be presented with the following prompts:
You must click OK to continue. It can be noted that hand modification of this configuration file can be performed in defining a different “default” database. This explained in detail below.
By selecting Yes, a default database will be created in the following directory structure along with the default configuration file:
Notice the database naming convention, “default.db”. This is important since once created, two tasks are performed that cannot be changed by the user without navigating to the proper directory and physically deleting this “default.db”. If deleted, you will be presented with the original option to create this default database, identical to first running the application.
- First, upon startup of UBooT, this database will be read and used by default. This feature allows users to create a database of UBNT units and optionally, drop a shortcut in the startup menu in the event of a system crash or reboot (of the PC, not the UBNT unit).
- Next, upon creation, UBooT will periodically save this “default.db” to disc as it is currently populated. This “save” occurs every 5 seconds (by default and can be changed via the configuration file, “default.cfg”). Please note, the configuration file values are in milliseconds. Also, if you change the value to "0" nothing is periodically saved.
Also of interest is the creation of a log directory. If for any unforeseen reason, errors occur in this application, they will be saved in an appropriate log file in this directory. They can then be submitted to the email address indicated above. The contents of this log file will be elaborated below.
When the File menu option is selected, the user can select one of the following
Save Current Database
Open Saved Database
When the View menu option is selected, the available options are as follows
Expand One Level
When the “Action” menu option is selected, the available options are as follows
Once the initial default database, an initial or additional entry is created, the user will be presented with something similar to the depiction to the right. Note... to edit any “editable” field either
SSH User Name
SSH Port Number
Time Of Day
Last Attempted Reboot
Last Reboot Successful
Next Scheduled Reboot
One last item of interest. Once the IP address of the UBNT unit has been entered, is valid and "pingable", the user will be presented with the option of immediately performing the initial reboot. It is defaulted to "No" after a 30 second delay. Choosing "Yes" will immediately attempt the reboot.
The configuration file associated with UBooT is a simple Java properties file. The available parameters are as follows
If for some reason you corrupt this file, simply delete it and restart the application. It will create a new, valid one for you.
The two most common errors that will be encountered will be
- This is an indication that the IP address you have indicated does not exist or is not reachable at the scheduled time of reboot.
- This indicates that the input SSH information is incorrect for that particular unit
For those familiar with such, the actual database as stored to disc is a simple serialized JTree (Java Tree structure). It will appear unreadable if tried to view using anything but the application that created it or the classes which define it's structure. Also note that any attempt to hand modify the database or even in some obscure cases, viewing it in something like Notepad, can corrupt the database to an unrecoverable state. You have been warned
- Initial release
- Requested features
- Additional view option (expand one level)
- Prompt user before initial entry reboot (can choose not to perform the initial reboot and will timeout to "No" in 30 seconds and the prompt will be removed)
- Removal of the compiled help file and replaced with a link to this WIKI page (easier for me to maintain)
To install this release if you already have installed the initial release of UBooT, simply run the uninstaller provided with the original installation. This uninstaller does not delete your database, configuration files or log files. Once uninstalled, simply download the new version and install UBooT 1.1. Once started, it will recognize your previously populated database and load it accordingly. No database changes were made with this release so they are interchangeable.
- Bug fixes
- Termination of main "reboot" thread whenever an IP is not reachable
- Proper updating of "Next Scheduled Reboot"
- Requested features
- Database status indicator added
- Reboot status indicator added
I hope you have found this information useful and the application provides you some utility should you decide to use it. I would also entertain providing the Java source of this application so one can be assured it contains no malicious intent.
(v1.3) Download UBooT