How to Clear the Linux Memory Cache

Clearning the Linux Memory cache can be a quick way to regain system resources. Writing to the drop_cache process will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

  • To free pagecache:# echo 1 > /proc/sys/vm/drop_caches
  • To free dentries and inodes:# echo 2 > /proc/sys/vm/drop_caches
  • To free pagecache, dentries and inodes:# echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation, and dirty objects are not freeable, the user should run “sync” first in order to make sure all cached objects are freed.

Example – Memory before:

[[email protected] ~]# free -m
total       used       free     shared    buffers     cached
Mem:          7860       7040        820          0        343       5076
-/+ buffers/cache:       1620       6240
Swap:         3999          0       3999

[[email protected] ~]# sync
[[email protected] ~]# echo 3 > /proc/sys/vm/drop_caches

Memory after:

[[email protected]erver ~]# free -m
total       used       free     shared    buffers     cached
Mem:          7860       1279       6581          0          0         33
-/+ buffers/cache:       1245       6615
Swap:         3999          0       3999

Roundcube Virtual Keyboard

Roundcube Webmail is a is a browser-based multilingual IMAP client with an application-like user interface. It provides the full functionality you would expect from an e-mail client, including MIME support, address book, folder manipulation, message searching, calendar, notes and spell checking.

There are an array of plugins available for Roundcube but to date, there is no “Virtual Keyboard” plugin. A virtual keyboard is a software application which allows a user to enter characters via an onscreen keyboard. Unlike typing a password using a hardware keyboard, a virtual keyboard cannot be logged using a keystroke logger. This provides an additional layer of security and is particularly useful when using web mail from an Internet Cafe or other untrusted location.

I’ve compiled a package which includes a virtual keyboard interface and is available for download here. Installation instructions are included in the ZIP file.

You can view a demo of the virtual keyboard on Aorta’s Secure Email website at www.aorta.me.

Recommended Data Center Temperature & Humidity

Monitoring the environment conditions in a computer room or data center is critical to ensuring uptime and system reliability. A report from the Gartner Group in late 2003 estimated that the average hourly cost of downtime for a computer network at that time was $42,000 (1,260,000 baht). In the year 2011, it has likely gone up dramatically. At these high costs, even companies with 99.9% up-time lose hundreds of thousands of dollars each year in unplanned downtime. Maintaining recommended temperature and humidity levels in the data center can reduce unplanned downtime caused by environment conditions and save companies thousands or even millions of dollars per year.

Recommended Computer Room Temperature

Operating expensive IT computer equipment for extended periods of time at high temperatures greatly reduces reliability, longevity of components and will likely cause unplanned downtime. Maintaining an ambient temperature range of 68° to 75°F (20° to 24°C) is optimal for system reliability. This temperature range provides a safe buffer for equipment to operate in the event of air conditioning or HVAC equipment failure while making it easier to maintain a safe relative humidity level.

It is a generally agreed upon standard in the computer industry that expensive IT equipment should not be operated in a computer room or data center where the ambient room temperature has exceeded 85°F (30°C). Continue reading “Recommended Data Center Temperature & Humidity”

WPScan – WordPress Security Scanner

WPScan is a vulnerability scanner which checks the security of WordPress installations using a black box approach – scanning without any prior knowledge of what has been installed.

Features

  •     Username enumeration (from author querystring and location header)
  •     Weak password cracking (multithreaded)
  •     Version enumeration (from generator meta tag)
  •     Vulnerability enumeration (based on version)
  •     Plugin enumeration (2220 most popular by default)
  •     Plugin vulnerability enumeration (based on version) (todo)
  •     Plugin enumeration list generation
  •     Other misc WordPress checks (theme name, dir listing, …)

Requirements

WPScan requires two non native Ruby gems, typhoeus and xml-simple. It should work on both Ruby 1.8.x and 1.9.x.

sudo apt-get install libcurl4-gnutls-dev
sudo gem install –user-install typhoeus
sudo gem install –user-install xml-simple Continue reading “WPScan – WordPress Security Scanner”

Securing WordPress

With a growing number of small to medium sized businesses leveraging WordPress as their website content management system (CMS), security of WordPress installations has become an issue. The WordPress developers have provided a reasonable ‘hardening’ outline, available here, but there are a number of other steps you can take to enhance the security of your WordPress site.

There are four main area’s of WordPress security we will briefly address in this article:

  1. Host Security
  2. Version Maintenance
  3. Restricting Access & Permissions
  4. Encryption

Host Security

Your WordPress site will only be as secure as the web servers its hosted on. If you are hosting your WordPress site on a virtual hosting account then you need to take extra care in making sure you site is secured from both external (Internet) attacks as well as attacks from other users on the same server (Internal). I recommend considering a secure hosting provider which provides hardened server operating systems and secure upload mechanisms such as a SFTP and SSL. Your hosting provider should also make sure they are running current, patched versions of their Apache web server, PHP and MySQL database software. Be sure the discuss security concerns with your hosting provider directly.

Version Maintenance

Keeping your WordPress site up-to-date with the latest WordPress release is important not just for stability but also for security. The WordPress development team does a good job of Continue reading “Securing WordPress”