VMware Memory Balloning
Memory Balloning is a memory reclamation technique employeed by VMware ESXi hosts, that is triggered by high memory utilization on the host and aims to reclaim unused memory on some VMs, for use in others that require it.
To better organize your source code in a web.py application, you can break it
down in subapplications. Those subapplications will be imported as Python
modules in your main web.py script (which, in the below examples is
AttributeError: 'module' object has no attiribute ...
If you get the error:
AttributeError: 'module' object has no attribute 'app'
...then you might be running into Python naming collissions. Check if you have
given one of your subapplications the same name as an existing Python module.
For example, you shouldn't name a subapplication
user, since that is an
existing Python module.
ImportError: No module named ...
If you get the error:
ImportError: No module named subapp
subapp is the name of your subapplication), then Python cannot
import the subapplication as a module. As a first step, create an empty file
__init__.py in the same directory as your subapplication, and try
again. If you still get that error, and assuming your subapplications are in
the same directory as your main application, you can try this ugly hack in the
very beginning of your main application script:
import inspect import os import sys sys.path.append(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
Create test databases in MySQL
Sometimes you need to create a test database on a development MySQL server, to run some tests on, and you want to populate it with many records, to make your tests more meaningful. This document lists a couple of quick and dirty ways that I use to achieve that.
On most Linux distributions, there is a file at
/usr/share/dict/words which contains a list of words, each on a
separate line. On my Linux Mint 15 installation, I count more than 99000 lines. The following commands will put those
words in a table called
words, in a database called
test, one word per table row.
Create the table:
mysql> CREATE TABLE words (id INT AUTO_INCREMENT, word VARCHAR(256));
Populate the table with the words. I 'm using double quotes to wrap the words, since many of them already contain a single quote:
while read word; do mysql test -e "INSERT INTO words (word) VALUES (\"$word\")"; done < /usr/share/dict/words
I have also used the contents of
/var/log/messages to populate a table, and that is documented in the blog post
How to create a large MySQL database for tests. That is a painfully
slow method, but can create tables that are many GigaBytes in size, which might be necessary for some tests.
This is a series of articles for setting up a network with Zentyal acting as the Primary Domain Controller, published at tecmint.com:
- Install Zentyal as PDC (Primary Domain Controller) and Integrate Windows System
- How to Manage Zentyal PDC (Primary Domain Controller) from Windows System
- Creating Organizational Units (OU) and Enabling GPO (Group Policy) in Zentyal PDC Server
- Setup File Sharing and Permissions for All Users in Zentyal 3.4 PDC
- Integrate Ubuntu System in Zentyal PDC (Primary Domain Controller)
- Integrate CentOS/RedHat/Fedora in Zentyal PDC (Primary Domain Controller)
- Integrate Ubuntu 14.04 (Trusty Tahr) to Zentyal PDC (Primary Domain Controller)
- Installing FTP Server and Mapping FTP Directories in Zentyal PDC
- Install and Configure Web Services (Apache Virtual Hosting) on Zentyal Server
- Enabling UserDir and Password Protect Web Directories on Zentyal Webserver
- Installing Pydio File Sharing Platform on Zentyal 3.4 Webserver
- How to Install and Configure OpenVPN Server on Zentyal 3.4 PDC
- Install and Configure Zentyal Linux 3.5 as A BDC (Backup Domain Controller)
- Joining CentOS 7 Desktop to Zentyal PDC (Primary Domain Controller)
Articles for Zentyal 3.5, released on July 1st 2014: