DC404 Presentation-SysUsage in 5 Minutes of Effort

Posted by JD 10/15/2010 at 07:43

This Saturday (tomorrow) I’ll be presenting to the DC404 crowd how to get system monitoring working on Linux in 5 minutes. Sadly, the presentation is running about 30 minutes because I really only need 5 minutes to show a complete install. Come and check it out, say hello.

There isn’t really much to it because SysUsage is really easy to setup and run. It works on desktops, laptops and servers, but there is no GUI for setup so you will need to use a terminal or console. With newer releases (OS or SysUsage) the dependencies may change, but it is still really easy to setup. This is so simple there really isn’t any excuse NOT to have performance graphs for all your Linux machines.
SysUsage Thumbnail

MKV Files with Subtitles, Alternate Languages and Video

Posted by JD 10/14/2010 at 18:15

These days, there is a real desire to have videos on your network, but not loose any of the features that the source media provides. Things like multiple languages tracks, director’s comments and other interesting audio tracks. I like to listen to the Spanish soundtrack and have the Spanish subtitles displayed for movies that I already know. It has been possible to have all this by ripping the full DVD contents and using an appropriate playback device for a long time, but that uses a bunch of storage – perhaps 4x more than needed if modern video codecs are used.

rdiff-backup isn't Perfect

Posted by JD 10/02/2010 at 09:58

I like rdiff-backup to backup your HOME directories and Virtual Machines efficiently. Ok, that is a little understated, I LOVE rdiff-backup.

So, every 6 months or so, when it lets me down in some way, I have to recall all the good things that is actually does solve. Things like:

  • Efficient backup times; just a few minutes to backup entire virtual machines
  • Efficient backup storage; about 10% more storage for 30 days of backups than a mirror (rsync) uses.
  • Easy recovery for 1 file from the latest backup (really it is trivial, just a file copy)
  • Easy recovery of a complete backup set from X days ago (I’ve tested this more than I like)
  • Easy to get information about backup increments and sizes for each.
  • FLOSS software from GNU (not commercial)
  • Backup failures get rolled back – you always get a complete, clean set.
  • No screwing around with SQL databases or other less than easy to understand crap.

Skype and N800 2

Posted by JD 10/01/2010 at 11:10

Today I visited the skype.com website to get a newer version of Skype for my Nokia N800. The download page has been removed for that and the N810 devices. The N900 has a download, but I don’t want to risk it.

As long as Skype on the N800 continues to work, I’m not too worried. Just like many people, I’m unhappy with my telecom provider.

  • They are too costly. They think they compete with AT&T on price, not Vonage or some other $9/month VoIP services
  • Calls are dropped mid-sentence
  • Connectivity disappears weekly

Kernel Update-ReInstall nVidia Dual Monitor Modules

Posted by JD 09/27/2010 at 10:30

After a recent kernel update to 2.6.32-24-server, X11 refused to restart. Recall that I’d modified my system to support dual monitors as described in this prior post. Since a new kernel was installed, rebuilding any non-standard kernel modules is expected. That’s probably all we need to do. These instructions should work for anyone using nVidia graphics cards purchased in the last 4 (?) years and running a 2.6.xx kernel. Mine is a Ge-Force 7600-GS, so nothing too fancy.

The symptoms for this new issue were that the console refused to stay on the tty that I’d used – basically, every 10-20 seconds, the dmesg log was displayed on the console and my tty was changed to console regardless of how many times that I manually selected console 1, 2, 3, 4 …. It really sucked. The error displayed was something like “no screens available”, but I don’t have the exact error message anymore.

Anyway, time to follow my prior instructions for dual monitors, perhaps updating them.

Easily Record Your Screen/Desktop in Linux

Posted by JD 09/13/2010 at 07:29

I watch Hak5 on my S2 TiVo. This season, DK is doing everything on Linux. He’s covered a fairly powerful home router already with smoothwall. The home-made commercials are usually the best parts of the show m(seriously!), but episode 804 covers the easy and slightly harder way to record your Linux desktop for screen casts.

gtk record my desktop for you GUI-liking people and ffmpeg for the shell folks like me that prefer a little more control are demonstrated.

The guys over a CommandLineFu also covered the ffmpeg way of doing it with a little more finesse. Don’t you just love that domain name?!!!

ffmpeg -f alsa -itsoffset 00:00:02.000 -ac 2 -i hw:0,0 -f x11grab -s $(xwininfo -root | grep 'geometry' | awk '{print $2;}') -r 10 -i :0.0 -sameq -f mp4 -s wvga -y intro.mp4

Hak5 isn’t the first to cover this topic. A quick search finds thousands of others demonstrating how to do this as well, but a few of the Hak5 commercials are GREAT!

Scripting on Windows with PowerShell

Posted by JD 09/12/2010 at 21:20

For the last few years, I’ve heard powershell for scripting by IT professionals in the MS-Windows community. Never looked at it until a few days ago. See, I confused cscript with PowerShell scripting. I couldn’t get the hang of cscript and wasn’t able to get it to accomplish what I needed the last time I tried. In June, I actually wrote some .BAT scripts for a client. If I knew then what I know now about PowerShell, I’d have been much happier and written those scripts in PowerShell, assuming it is pre-installed on Win2003 Server.

In my limited time with PowerShell, here are my impressions.

  • UNIX has text processing, MS-Windows uses object processing – sorta like the difference between PERL and Ruby scripting.
  • Most of the syntax is Perl-like – with some differences. Get used to $var.action calls.
  • Pipes work like you’d expect from UNIX, except ….
    • generally, we don’t use `grep`, rather, the regex is used as part of the prior command
    • | `wc -l` becomes action.count – basically, if you want to get a count of something.
    • functions are Perl/Bash-like, except the argument passing is C-like (int x, int y). That is better than Perl, IMHO.
  • Objects mean access to the registry, COM, and WMI. That’s a plus AND a minus. How to query a GUI program? That’s the problem.
  • As usual, rather than reuse existing commands, Microsoft decided to use, longer, more complex commands. `ls` is `get-selections`, but they did include aliases in the tool. That means that many of the normal UNIX commands used in shell scripts have aliases, but those are not the preferred method name to be used.

As long as you don’t need to press a button inside a GUI, PowerShell can probably be useful.

Mindset Change

To me, the main limitations of PowerShell really aren’t with the language, rather, it is with my mindset and having to change from UNIX/File processing to object processing. Also, the tools on UNIX/Linux systems tend to support command line options to get things done. In MS-Windows, command line options to GUI programs are usually extremely limited – next to worthless. In Linux/UNIX, there are hundreds and hundreds of small applications and tools that come with the system suitable for script use.

References

A few years ago, PowerShell was called msh, Microsoft Command Shell. Here’s an overview.

Here’s a PowerShell Tutorial if you are interested in going further.

Read where someone is porting PowerShell to UNIX/Linux systems. Yep, it is called Pash. According to the project page, it is 40-50% complete and running on Windows, Linux, Mac and Windows Mobile platforms.

VMware is using PowerShell (they call it PowerCLI) as an interface into their ESX virtualization system.

Summary

In summary, it seems that Microsoft has been working hard for years to remove some of the biggest complaints against their systems – the lack of real, usable scripting. Seems they could advertise it a little more widely. Personally, I’d prefer a Perl library that encapsulated all this and for Perl to be included with MS-Windows installations so I don’t need to learn yet another language. Still, msh/psh/pash or whatever they call it this year is a step in the right direction.

Running Remote Desktops and Remote Applications 3

Posted by JD 09/07/2010 at 10:00

Updated 12/2014:
Jump to the bottom of the article to see the updates.

People new to Linux or UNIX often don’t understand that built into the GUI system is a way to remote into pretty much any server in the world and have a program running on the remote machine, but displayed back on your Linux desktop. It is built in and has been for 30+ year of X/Windows. It doesn’t matter if you use Ubuntu, Redhat, Solaris, AIX, or if you use Gnome, KDE, XFCE, MWM, TWM – this solution is at a lower level. If you have a GUI on Linux or UNIX, it is built in and actually works really, really well.

Remote Applications over the WAN

64-Bit OS Use Here

Posted by JD 08/26/2010 at 09:05

On this website, 58% of the Linux users are running 64-bit operating systems. I’m just sayin’ 64-bit is mainstream. Vendors need to understand that.

If software works on OSX, which is 64-bit, then it can work on x64 Linux too. When programs don’t work or aren’t released on 64-bit systems, that means their developers are writing crap code.

Remove the Confusion - What Is Linux?

Posted by JD 08/26/2010 at 10:00

I’m guilty of oversimplification. We all are. I say that I run Linux. That isn’t really accurate, but it is short and only people in the know really understand what that means. Below I’ll attempt to compare a few well known operating systems to an automobile and the parts inside it.

OS to Vehicle Comparison

I’ve picked 1 specific version of a vehicle, Linux OS and Windows OS to use for comparison.

Part              Vehicle                  Linux                         Windows

Total Name        Ford F-150 Truck         Ubuntu 10.04 x32 Desktop      Microsoft Windows7
                                                                         x32 Home Premium

Engine            Ford V8 4.4L Diesel      Linux Kernel 2.6.24-28        Kernel.xyz build 
                                            No direct access to the      number xxxx. No 
                                            kernel without helper        direct access to  
                                            programs.                    the kernel without 
                                                                         helper programs. 
                                                                         The kernel 
                                                                         provides services
                                                                         to other programs.

Outside Bling     Paint, chrome, flashers  Gnome 3.x, customized GUI     Windows Desktop 
                                           running on top of X/Windows   Program / Explorer 
                                           and a _Window Manager_ like   (1st instance only)  
                                           xfce, fvwm, Icewm ... *wm     This is the GUI - 
                                           Other examples of _Desktop    Start Menu, etc.
                                           Environments_: Gnome, KDE, 
                                           LXDE, XFCE. DEs are a 
                                           convenience and not 
                                           necessary.

Raw Controls      N/A, but directly        GNU CLI programs - ls, df     CMD.EXE and a 
                  controlling the throttle  du, and thousands of         limited set of 
                  with a pair of pliers is  others. Example UNIX         programs - dir, 
                  an example.               "Shells" are bash, sh, csh,  scandisk, chkdsk, 
                                            tcsh, ash, zsh, etc...       nslookup, net use, 
                                                                         route. Any program 
                                                                         that doesn't have 
                                                                         a GUI.

User Control Sytm Steering wheel,          CLI interface                 CLI interface 
                  instruments, peddles,    OR                            (mostly unused) - 
                  gear shifter, radio, etc GUI xfaces                    the old DOS-style 
                                                                         interface
                                                                         OR
                                                                         GUI controls like 
                                                                         Control Panel