Filed under Unix/Linux

Getting VIM to acknowledge your Drupal files

Are you a die-hard vi(m) user like me and wanted to have the php color coding for all your drupal files?

It’s quite simple actually. Add the following lines to your ~/.vimrc file (create it if it doesn’t exist):

au BufReadPost *.module,*.install,*.theme set syntax=php

OpenSource Storage Management

I came across OpenFiler a while ago and was intriged by it. Now I’ve taken the liberty to testing it in my lab, and I must say that I’m impressed by the features. It’s something every sysadmin should check out to see if it isn’t a viable solution for their overpriced storage solution… ;-)

.

Openfiler is a powerful, intuitive browser-based network storage software distribution. Openfiler delivers file-based Network Attached Storage and block-based Storage Area Networking in a single framework. Its uses the rPath Linux metadistribution and is distributed as a stand-alone Linux distribution. The entire software stack interfaces with third-party software that is all open source.

File-based networking protocols supported by Openfiler include: NFS, SMB/CIFS, HTTP/WebDAV and FTP. Network directories supported by Openfiler include NIS, LDAP (with support for SMB/CIFS encrypted passwords), Active Directory (in native and mixed modes) and Hesiod. Authentication protocols include Kerberos 5.

Openfiler includes support for volume-based partitioning, iSCSI (target and initiator), scheduled snapshots, resource quota, and a single unified interface for share management which makes allocating shares for various network file-system protocols a breeze.

Find out who is monopolizing or eating the CPUs

When you need to determine which process is monopolizing or eating the CPUs. Following command will displays the top 10 CPU users on the Linux system.

ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10

or

ps -eo pcpu,pid,user,args | sort -r -k1 | less

Output
%CPU PID USER COMMAND
96 2148 vivek /usr/lib/vmware/bin/vmware-vmx -C /var/lib/vmware/Virtual Machines/Ubuntu 64-bit/Ubuntu 64-bit.vmx -@ ""
0.7 3358 mysql /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock
0.4 29129 lighttpd /usr/bin/php
0.4 29128 lighttpd /usr/bin/php
0.4 29127 lighttpd /usr/bin/php
0.4 29126 lighttpd /usr/bin/php
0.2 2177 vivek [vmware-rtc]
0.0 9 root [kacpid]
0.0 8 root [khelper]

If you’re interested in more information on Linux CPU utilization then check out the related article on nixCraft here.

Yet another windows versus linux slideshow?

The next slideset aligns with my vision about “Linux versus Windows”. But it’s presented a bit nicer than the simple bullet points I used a whlie back. ;-)

Which is the greenest; disks or flash?

In his latest blog post, Anything But a Flash in the Pan, Jonathan Schwartz. touches a good point… We have RAM memory for “on the fly” memory and hard drivers to have persistent storage. Yet flash memory could (let me stand corrected; WILL) be used as a middle way option. Put apart the commercial notes (links towards Sun & ZFS), and you’ll probably find it an interesting read like me.

There are only two kinds of storage devices – those that have failed, and those that are about to fail. That’s the view most data centers have about the traditionally mechanical devices pejoratively referred to as “spinning rust.” All disk drives fail, cheap drives fail faster.

DevWork’s Ten Essential Linux Tricks

Learn these 10 tricks and you’ll be the most powerful Linux® systems administrator in the universe…well, maybe not the universe, but you will need these tips to play in the big leagues. Learn about SSH tunnels, VNC, password recovery, console spying, and more. Examples accompany each trick, so you can duplicate them on your own systems.

Lazy Linux: 10 essential tricks for admins

How to be a more productive Linux systems administrator

  • Trick 1: Unmounting the unresponsive DVD drive
  • Trick 2: Getting your screen back when it’s hosed
  • Trick 3: Collaboration with screen
  • Trick 4: Getting back the root password
  • Trick 5: SSH back door
  • Trick 6: Remote VNC session through an SSH tunnel
  • Trick 7: Checking your bandwidth
  • Trick 8: Command-line scripting and utilities
  • Trick 9: Spying on the console
  • Trick 10: Random system information collection

Seamless Linux applications on Windows

Seamless Options
One of the all-time-favorite articles here is “Running your dual boot windows inside Vmware Server within Ubuntu“. Yet some might like it the other way around, and a bit more seamless? Two handy options here are “VirtualBox” & “Ulteo Virtual Desktop“.

Virtualbox
You can put Virtualbox in the same range as Vmware. They provide a performant virtualization platform. Yet one of their core features (which I still miss in Vmware, apart from Fusion) is the “seamless” mode. It means your guest OS can appear on your desktop without having to be inside a window. You can run application (say notepad) and it will appear as a single window on your desktop.
More info?

Ulteo
With Ulteo Virtual Desktop, you just have to run the application you need to use from the Ulteo panel and its window will show up like any other Windows application. Ulteo steps in to avoid the point where you need to maintain your virtualization platform (as with the seamless solution of Virtualbox). See it as an application that will (install and) maintain the seamless solutions for you. Check out their website (and the /. comments).

Green Linux thru CPU Frequency Scaling

Green EnergyBeing “Green” is being helpful towards the environment, but also to your electricity bills… The most commonly used techniques to reduce the power usage of a computer device are :

  • Turning off your monitor/screen/tv when not used.
  • Turning off the hard disks when they aren’t used
  • CPU Frequency Scaling

For the last bit, you’ll have to check if you motherboard/cpu supports this… Most will probably support this, apart from the “really” old. The motherboard (& CPU) of my HTPC (MythTV) is capable of using AMD’s Cool’n'Quiet. I followed the following guide on the Ubuntu Forum, and used the “powersave” algorithm. It reduced my CPU frequency to 1000, where I must admit that I don’t notice anything on my combined MythTV frontend/backend. Next up is measuring the actual power usage, but I need to obtain a measuring device for that… ;-)

Extra
For an interesting readup on the same topic; check MythTV NZ, ThinkWiki’s How to reduce power consumption, …

Why do we use Linux?

After the posing the question “Is Linux being cursed because it’s free?“, Vlad Dolezal posts “The REAL reason we use Linux“. An interesting clue to the inner reason why we use linux…

We use Linux because it’s fun!

penguin powah!It’s fun to us, due to the following underlying statements:

  • Linux gives you complete control
  • Linux isn’t widely used
  • Linux is free (as-in-speech)

Linux being cursed because it’s free?

The story below is an excerpt from an article written by Vlad Dolezal. Being a student of psychology, he took another point of view towards linux evangelism.
Psychology

In the 1970′s, a record label in Britain was selling albums containing cover versions of contemporary songs. Although the records sold for less than a pound a copy, hardly anyone bought them and the record company was suffering.

A whizz-kid joined the board and announced he wanted to more than double the price of the records. The other executives were shocked, but eventually agreed to his plan. Within a few weeks, the records were flying off the shelves.

When the records didn’t cost much, people didn’t value them. The record company was saved by redefining people’s perception of their product.

The article is build around the concept that people only value the things that they cannot obtain easily. It’s just about the basic human nature… Check it out!

Follow

Get every new post delivered to your Inbox.