Posts Tagged free

Linux memory management and how to see actual RAM usage

Where the hell did all my RAM go?

So as some of you may or may not know linux allocates memory a little differently than windows and it may be a little disconcerting at first to rely on ‘top’ for your memory usage breakdown as it starts to look like there is a big leak happening somewhere.  This isn’t the case and I’ll take a quick paragraph to explain how it works.

At the end of the day the way that RAM works is that if it isn’t being used it’s being wasted and linux being as amazing as it is has a strict policy about wasting as little as possible so it uses the ram extensively to cache nearly anything it can get it’s hands on.  What ends up happening is that after a program is run the output or information from that program are cached so that every subsequent time it’s run the information can just be pulled out of the cache which is stored in RAM instead, giving it about 1000x increase in read speed for future executions.   Pretty cool eh?  Yea, well unless you don’t know this, setup a new production server in linux, turn it on for the first time and sit there watching top report your free memory going down and down and down and down until it reaches a read out like this:

Mem:   8197228k total,  6219696k used,  1977532k free when just 2 hours ago the same server running on FreeBSD was reporting 90% of it’s ram being free.

The thing to note of course is how big the Cache is.. In my case here it’s about 4.8GB large, meaning there’s all sorts of data stored in there that apache is reloading over and over and over again that is lightning fast.  Already I’m loving this new Debian server :)

So how do I see my real memory usage?

#free -m

This nifty little command will show you the memory usage with and without caching taken into account resulting in something like this:

total used free shared buffers cached
Mem: 8005 6078 1926 0 487 4675
-/+ buffers/cache: 915 7089
Swap: 11442 4 11438

Telling me that I actually am only using 915MB of ram, not 6GB of it and I’ve got over 7GB of my available 8GB of memory to spare!  At this point you can breath a sigh of relief and give thanks that you are running an OS that is taking full advantage of all this juicy RAM that you have, which would otherwise just be sitting there taking up space :)

 

 

 

 

Tags: , , , , , ,

Looking for awesome free icons?

Just stumbled upon this site through Google images today and was impressed enough with the content that I thought I’d share :)   A ton of content to pick through here:

 

http://icons.mysitemyway.com

Tags: , , ,

Your own free content spinner shell script in bash (fTW!)

So today I set out to modify my massive unique tweet and content generator for my Netsyphon network(ie: hotel-kelowna, innkelowna.com, kelownasrestaurants.com, etc etc) and add an inline content spinner to it.  To date there are a lot of search/replaces happening but they are all one time replaces and reference external files for the replace values..  Usually there were only one or two possible s/r results per line so I could handle it easily with gsub.

But now I wanted to be able to take a single article with a ton of spinnable content and have a script generate 10-20-100 different versions of this article.  I would have a sentence where 80% of the content was spinnable with infinite amount of results.  I could handle this with the old method but it would require creating a ton of external files for each search/replace possibility which would get insane.  Instead I knew that there had to be a relatively simple method with bash to make this happen, and much to my delight the boys over at #bash on irc.freenode came to the rescue

Big props out to \amethyst and geirha, my two heroes for the day.  Some useful info from #bash as well:

FAQ: http://mywiki.wooledge.org/BashFAQ | Guide: http://mywiki.wooledge.org/BashGuide | ref: http://tinyurl.com/txlv | http://bash-hackers.org/wiki/ | USE MORE QUOTES!: http://www.grymoire.com/Unix/Quote.html | Scripts and more: http://www.shelldorado.com/

And without further ado here are the scripts that were created by these two gents.

http://pastebin.com/xNgKaR2c:

FAQ: http://mywiki.wooledge.org/BashFAQ | Guide: http://mywiki.wooledge.org/BashGuide | ref: http://tinyurl.com/txlv | http://bash-hackers.org/wiki/ | USE MORE QUOTES!: http://www.grymoire.com/Unix/Quote.html | Scripts and more: http://www.shelldorado.com/

And without further ado here are the scripts that were created by these two gents.

The first by Geirha, is setup to read from an external file , and if not will take the input from stdin

http://pastebin.com/xNgKaR2c:

spinner_thingy ()
{
while read -r -d ‘{‘; do
printf “%s” “$REPLY”;
IFS=’|’ read -r -d ‘}’ -a words;
n=${#words[@]};
((n)) && printf “%s” “${words[RANDOM%n]}”;
done < “${1:-/dev/stdin}”;
printf “%s” “$REPLY”
}

The second by\amethyst can be found here: http://pastebin.com/tAXJ04L6

I went ahead and replaced the example line at the top with a reference to a filename

line=”$(<test.txt)”
makesentence ()
{
local line=”$1″
while [[ $line = *{*}* ]]; do
local -a choices
local prefix=${line%%{*} rest=${line#*{}
local choice=${rest%%\}*}
line=${rest#*\}}
IFS=’|’ read -a choices <<< “$choice”
[[ $choice = *"|" ]] && choices+=( “” )
printf “%s” “$prefix”
if (( ${#choices[@]} )); then
printf “%s” “${choices[RANDOM % ${#choices[@]}]}”
fi
done
printf “%s\n” “$line”
}
makesentence “$line”

So there you have it.. 30 minutes in IRC and the helpful boys over at #bash have me right as rain.. Again a big shout out, these guys have been integral in helping me with all of my scripting in this project.. I would have jack if it wasn’t for them.

As a parting gift I also found a way to do this with php, but alas I wanted a shell script that I could easily integrate into the mothership so it was all one nice neat package.. But for those php guys here it is:

<?php
$text = "The {quick|slow|reasonably paced} {brown|green|blue|pink} {fox|goat|rat|camel}
{jumped|walked|hopped} {over|past|under} the {lazy|tired|boring} {dog|cat|stoat}";
$count = 0;
while ($count++ < 100){
echo Spin($text);
echo "<br />";
}
?>

Now go generate some content!

Tags: , , , , , , , ,

Open Source Alternatives to Commercial Software

I found this article today and wanted to reproduce it and share it around even more as it is such a wicked list.  More and more we are getting to a place where there are so many great alternatives to commercial software that you can almost see the business model starting to collapse.

Enjoy

Graphic Applications

ACDSee 9

Image:Imgv.png

Imgv is a unique and feature rich Image Viewer. It is released as free software with full source code. Imgv is portable and can run on Windows, Linux, BSD, OSX, and other operating systems. Features include a GUI that doesn’t get in the way of viewing your images, a file browser, slideshows, zooming, rotating, on-the-fly Exif viewing, histograms, fullscreen support, wallpaper setting, the ability to view 4 images on the screen at once, adjustable thumbnail sizes, playlists, view and download images from Web sites, movie playing, file searching/filtering, multiple directory loading, transitional effects, image hiding and more.

Cornice is a cross-platform image viewer written in Python + wxPython + PIL. It doesn’t pretend to be complete, fast, or even useful, but I like it and it is the viewer I use on both Linux and Windows. It has been inspired by the famous Windows-only ACDSee.
Adobe After Effects

Jahshaka is an editing and effects system. It allows to edit with flexibility and speed, create effects in real time, animate with unlimited features, paint and design on moving video, create music with all the tools the pros use, work in any format at any resolution.
Adobe FrameMaker and QuarkXPress

Image:Scribus.png

Scribus is an open-source program that brings award-winning professional page layout to Linux/Unix, MacOS X, OS/2 and Windows desktops with a combination of “press-ready” output and new approaches to page layout. Underneath the modern and user friendly interface, Scribus supports professional publishing features, such as CMYK color, separations, ICC color management and versatile PDF creation.
KWord is a frame-based word-processing and desktop publishing application. KWord is capable of creating demanding and professional looking documents. Whether you are a corporate or home user, production artist or student, KWord will prove a valuable and easy to use tool for all your word processing and layout needs. KWord is a wordprocessor based on frames. This can be used to place components in precise locations, as with many professional DTP applications. KWord can also handle huge amounts of texts and allows you to do professional markup with ease.
Adobe Illustrator and Corel Draw

Xara Xtreme for Linuxis a powerful, general purpose graphics program for Unix platforms including Linux, FreeBSD and (in development) OS-X.

Inkscape is an Open Source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format. Inkscape supports many advanced SVG features (markers, clones, alpha blending, etc.) and great care is taken in designing a streamlined interface. It is very easy to edit nodes, perform complex path operations, trace bitmaps and much more.

Skencil is an interactive vector drawing appliction. Known to run on GNU/Linux and other UNIX-compatible systems, it is a flexible and powerful tool for illustrations, diagrams and other purposes. A somewhat unique (for a drawing program) feature of Skencil is that it is implemented almost completely in a very high-level, interpreted language, Python. Python is powerful, object-oriented and yet easy to use.
Adobe Photoshop and Corel Paint Shop Pro

Paint.NET is free image and photo editing software for computers that run Windows. It features an intuitive and innovative user interface with support for layers, unlimited undo, special effects, and a wide variety of useful and powerful tools. An active and growing online community provides friendly help, tutorials, and plugins.

CinePaint is a collection of free open source software tools for deep paint manipulation and image processing. CinePaint is used for motion picture frame-by-frame retouching, dirt removal, wire rig removal, render repair, background plates, and 3d model textures. It’s been used on many feature films, including The Last Samurai where it was used to add flying arrows. It’s also being used by pro photographers who need greater color fidelity than is available in other tools.

Krita is a painting and image editing application for KOffice. Krita is part of KOffice since version 1.4. It contains both ease-of-use and fun features like guided painting (never before has it been so easy to airbrush a straight line!) and high-end features like support for 16 bit images, CMYK, L*a*b and even OpenEXR HDR images. Krita supports many managed colorspaces, like rgb, grayscale, cmyk, lab, ycbcr and lms, in 8 and 16 bits per channel. Some colorspaces even support 32 bits per channel.

GIMP is the GNU Image Manipulation Program. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages. It has many capabilities. It can be used as a simple paint program, an expert quality photo retouching program, an online batch processing system, a mass production image renderer, an image format converter, etc.

Gimpshop is a free graphics editor for Mac OS X 10.3/10.4, Linux, Solaris/SPARC and Windows. GIMPShop is a Gimp modification that features menu layouts, dialogs and naming conventions similar to those found in Adobe Photoshop. Photoshop users should feel right at home using Gimpshop. (This is a better alternative to GIMP if you are used to using PhotoShop.)
Adobe Photoshop Camera Raw

Unidentified Flying Raw (UFRaw) is a utility to read and manipulate raw images from digital cameras. It can be used on its own or as a Gimp plug-in. It reads raw images using Dave Coffin’s raw conversion utility – DCRaw. UFRaw supports color management workflow based on Little CMS, allowing the user to apply ICC color profiles. For Nikon users UFRaw has the advantage that it can read the camera’s tone curves.
Adobe Premiere, Final Cut Pro and Microsoft Movie Maker

Image:Kino.png

Kino is a non-linear DV editor for GNU/Linux. It features excellent integration with IEEE-1394 for capture, VTR control, and recording back to the camera. It captures video to disk in Raw DV and AVI format, in both type-1 DV and type-2 DV (separate audio stream) encodings. You can load multiple video clips, cut and paste portions of video/audio, and save it to an edit decision list (SMIL XML format). Most edit and navigation commands are mapped to equivalent vi key commands. Kino can export the composite movie in a number of formats: DV over IEEE 1394, Raw DV, DV AVI, still frames, WAV, MP3, Ogg Vorbis, MPEG-1, MPEG-2, and MPEG-4. Still frame import and export uses gdk-pixbuf, which has support for BMG, GIF, JPEG, PNG, PPM, SVG, Targa, TIFF, and XPM. MP3 requires lame. Ogg Vorbis requires oggenc. MPEG-1 and MPEG-2 require mjpegtools or ffmpeg. MPEG-4 requires ffmpeg.
Avidemux is a free video editor designed for simple cutting, filtering and encoding tasks. It supports many file types, including AVI, DVD compatible MPEG files, MP4 and ASF, using a variety of codecs. Tasks can be automated using projects, job queue and powerful scripting capabilities. Avidemux is available for Linux, BSD, Mac OS X and Microsoft Windows under the GNU GPL license.
VirtualDub is a video capture/processing utility for 32-bit Windows platforms (95/98/ME/NT4/2000/XP), licensed under the GNU General Public License (GPL). It lacks the editing power of a general-purpose editor such as Adobe Premiere, but is streamlined for fast linear operations over video. It has batch-processing capabilities for processing large numbers of files and can be extended with third-party video filters. VirtualDub is mainly geared toward processing AVI files, although it can read MPEG-1 and also handle sets of BMP images.
Cinelerra is a free and open source software non-linear video editing system for the Linux operating system. (However, it has also been successfully ported to Mac OS X.) It is produced by Heroine Virtual, and is distributed under the GNU General Public License. Cinelerra also includes a video compositing engine, allowing the user to perform common compositing operations such as keying and mattes.

Anime Studio and Toon Boom Studio

KToon is a 2D Animation Toolkit designed by animators (Toonka Films ) for animators, focused to the Cartoon Industry. This project is covered by the GPL License using G++, OpenGL and QT as programming resources from KDevelop as the development platform. By now, KToon is only available for Unix systems but we expect to make it works on Windows systems too someday.

Synfig is a powerful, industrial-strength vector-based 2D animation software package, designed from the ground-up for producing feature-film quality animation with fewer people and resources.
Autodesk 3ds Max

Image:Blender.png

Blender is the free open source 3D content creation suite, available for all major operating systems under the GNU General Public License.
Autodesk AutoCAD

QCad is an application for computer aided drafting in two dimensions (2d). With QCad you can create technical drawings such as plans for buildings, interiors, mechanical parts or schemas and diagrams. QCad works on Windows, Mac OS X and many Linux and Unix Systems. The source code of the QCad community edition is released under the GPL.

BRL-CAD package is a powerful Constructive Solid Geometry (CSG) solid modeling system with over 20 years development and production use by the U.S. military. BRL-CAD includes an interactive geometry editor, parallel ray-tracing support for rendering and geometric analysis, path-tracing for realistic image synthesis, network distributed framebuffer support, image-processing and signal-processing tools. The entire package is distributed in source code form.
Autodesk Maya

Blender is the free open source 3D content creation suite, available for all major operating systems under the GNU General Public License.
Corel Trace

Potrace is a utility for tracing a bitmap, which means, transforming a bitmap into a smooth, scalable image. The input is a bitmap (PBM, PGM, PPM, or BMP format), and the default output is an encapsulated PostScript file (EPS). A typical use is to create EPS files from scanned data, such as company or university logos, handwritten notes, etc. The resulting image is not “jaggy” like a bitmap, but smooth. It can then be rendered at any resolution. Potrace can currently produce the following output formats: EPS, PostScript, PDF, SVG (scalable vector graphics), Xfig, Gimppath, and PGM (for easy antialiasing).
Adobe Flash Professional (formerly Macromedia)

OpenLaszlo is an open source platform for creating zero-install web applications with the user interface capabilities of desktop client software. OpenLaszlo programs are written in XML and JavaScript and transparently compiled to Flash and, with OpenLaszlo 4, DHTML. The OpenLaszlo APIs provide animation, layout, data binding, server communication, and declarative UI. An OpenLaszlo application can be as short as a single source file, or factored into multiple files that define reusable classes and libraries.

IMPRESS is a truly outstanding tool for creating effective multimedia presentations. Your presentations will stand out with 2D and 3D clip art, special effects, animation, and high-impact drawing tools. IMPRESS has a complete range of easy-to-use drawing and diagramming tools to spice up your presentation. Slide show Animation and Effects bring your presentation to life. Fontworks provides stunning 2D and 3D images from text. Create lifelike 3D images with astounding speed and response.
Macromedia Freehand MX

Inkscape is an Open Source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format. Inkscape supports many advanced SVG features (markers, clones, alpha blending, etc.) and great care is taken in designing a streamlined interface. It is very easy to edit nodes, perform complex path operations, trace bitmaps and much more.

Karbon is a vector-based drawing application for KOffice. It allows artists to create complex drawings without losing image quality when zooming in on, or resizing the drawing. You can use Karbon to add finishing touches to diagrams created using Kivio or charts created using KChart.

Skencil is an interactive vector drawing appliction. Known to run on GNU/Linux and other UNIX-compatible systems, it is a flexible and powerful tool for illustrations, diagrams and other purposes. A somewhat unique (for a drawing program) feature of Skencil is that it is implemented almost completely in a very high-level, interpreted language, Python. Python is powerful, object-oriented and yet easy to use.

Xara Xtreme for Linuxis a powerful, general purpose graphics program for Unix platforms including Linux, FreeBSD and (in development) OS-X.
Microsoft Publisher

DRAW – from a quick sketch to a complex plan, DRAW gives you the tools to communicate with graphics and diagrams. You can manipulate objects, rotate in two or three dimensions; the 3D controller puts spheres, rings, cubes, etc. at your disposal. Arrange objects: group, ungroup, regroup, and edit objects while grouped. Sophisticated rendering let you create photorealistic images with your own texture, lighting effects, transparency, perspective, and so on. Smart connectors make short work of flowcharts, organisation charts, network diagrams, etc. Define your own ‘glue points’ for connectors to ‘stick’ to.

Scribus is an open-source program that brings award-winning professional page layout to Linux/Unix, MacOS X, OS/2 and Windows desktops with a combination of “press-ready” output and new approaches to page layout. Underneath the modern and user friendly interface, Scribus supports professional publishing features, such as CMYK color, separations, ICC color management and versatile PDF creation.
Microsoft Visio

ArgoUML is the leading open source UML modeling tool and includes support for all standard UML 1.4 diagrams. It runs on any Java platform and is available in ten languages. ArgoUML provides constraint modeling support on UML Classes and Features. The Dresden OCL toolkit enables ArgoUML to perform syntax and type checking on those constraints. Diagrams can be saved as GIF, PNG, PostScript, Encapsulated PS, PGML and SVG.

Dia can be used to draw many different kinds of diagrams. It currently has special objects to help draw entity relationship diagrams, UML diagrams, flowcharts, network diagrams, and many other diagrams. It is also possible to add support for new shapes by writing simple XML files, using a subset of SVG to draw the shape. It can load and save diagrams to a custom XML format (gzipped by default, to save space), can export diagrams to a number of formats, including EPS, SVG, XFIG, WMF and PNG, and can print diagrams (including ones that span multiple pages).

DRAW – from a quick sketch to a complex plan, DRAW gives you the tools to communicate with graphics and diagrams. You can manipulate objects, rotate in two or three dimensions; the 3D controller puts spheres, rings, cubes, etc. at your disposal. Arrange objects: group, ungroup, regroup, and edit objects while grouped. Sophisticated rendering let you create photorealistic images with your own texture, lighting effects, transparency, perspective, and so on. Smart connectors make short work of flowcharts, organisation charts, network diagrams, etc. Define your own ‘glue points’ for connectors to ‘stick’ to.

Kivio is an easy to use diagramming and flowcharting application with tight integration to the other KOffice applications. It enables you to create network diagrams, organisation charts, flowcharts and more. Features: scriptable stencils using Python, support for Dia stencils, plugin framework for adding more functionality.

StarUML is an open source project to develop fast, flexible, extensible, featureful, and freely-available UML/MDA platform running on Win32 platform. The goal of the StarUML project is to build a software modeling tool and also platform that is a compelling replacement of commercial UML tools such as Rational Rose, Together and so on.
Pixar RenderMan

Blender is the free open source 3D content creation suite, available for all major operating systems under the GNU General Public License.

Pixie is an open source RenderMan renderer for generating photorealistic images. You can compile Pixie on Windows (using Visual Studio 2005), Linux and on OSX (using XCode or unix style configure script). Pixie now has a new raytracing engine that automatically tesselates surfaces on the fly to a desired accuracy determined using the ray differentials. This means rays tracing blurry reflections or computing global illumination are faster to trace and sharp reflections and shadows are more accurate. Pixie also contains a memory manager that keeps the memory that is used to keep these tesselations around under control. Similar to texture caching, Pixie will maintain a set of active surfaces and only those surfaces will consume raytracing memory.

Ayam is a free 3D modeling environment for the RenderMan interface, distributed under the BSD license. This means that neither the author nor any contributors make money out of this software. We need your (yes your!) feedback to keep this project alive. If you use Ayam, please submit your pictures, bug reports, or comments.

The current stable version is 1.14, released 4. Apr 2008.

Ayam currently runs on Unix (Linux, IRIX, FreeBSD tested), Win32 (Win95-Win2000, XP), and Mac OS X (Aqua and X11).

Tags: , , , , , , , ,

NYT Article on the man behind Ubuntu

http://www.nytimes.com/2009/01/11/business/11ubuntu.html

Found this great article getting inside of the head of them man who is responsibile for the Linux Distro I, and the majority of linux users, use: Ubuntu.   Mark Shuttleworth is indeed what I would strive towards, a ultra rich man that decides to do something that can change the world.  Albeit it isn’t feeding starving kids, his change is much much more pervasive and in the end his Distro of Linux will no doubt be installed (for FREE) in the hospitals and schools of those same children changing their lives in a very real and powerful way, and ultimately changing the way the world looks at proprietary vs. open source environments.

My hats off to him!

Tags: , , , , , , ,

Savage 2 Now completely free to Play!

A game that I’ve been following for a while now has gone completely free and going the route of microtransactions.  They do offer a premium account which allows for additional inventory slots, access to player stats, the ability to download recorded games and more.  The premium fee is a one time deal of $9.99 which in itself is a stupidly good deal for this game, paying $10.00 for any ability to play this game is worth it 5 times over, but just for these simple upgrades I really take my hat off to the guys over at S2 games and really do cross my fingers that this gambit works for them as I know they have put a lot of hard work into the game

The game is a hell of a lot of fun, extremely well done and it REALLY shines for me because they actually spent the time to make a native Linux client which insanely shows of what linux can do performance wise when a triple-A game is coded for it.  I have all settings maxed out and I get a far higher framerate with Savage 2 in linux than I have on any game I ever played on this same rig in Windows, it is night and day.

The gameplay is a mixture between RTS and FPS where a commander commands the group of soldiers very much like he would in any RTS game(meaning not simply commanding combat and building stuff but also harvesting resources, etc etc) and then the rest of the team plays the game out as a FPS.  This boils down to an incredibly amount of strategy and fast-paced intense fighting.

Check out some of the eye candy:

YouTube Preview Image
YouTube Preview Image
YouTube Preview Image





Tags: , , , ,

Page optimized by WP Minify WordPress Plugin