Archive for the ‘Software’ Category

Script day – simple log graphing toolּ

I wrote similar versions of this script over the years to analyze all kinds of logs, but here’s one for posterity:

This script is useful if you have a log for which you want to analyze load over time – transactions per second or whatnot (the version below does this for Apache httpd logs, but it can be easily modified to analyze anything). For apache (and most other HTTP servers) there are many readily available log analysis software packages that do a much better job then what one can do in a simple script, but you might not have such software pre-configured or it can’t filter what you need or you just want to analyze something else – in which case this script will come in handy.

The script receives time stamped log events – each event on a line – and collects the temporal information for each line. Then it will dump a simple vertical graph (i.e. time is on the Y axis) of load over time in the resolution that you want. Its output looks something like this:

Oct 30 14:40:00 2007 |#############                                    | 3.8 x/sec
Oct 30 14:50:00 2007 |##########################################       | 6.3 x/sec
Oct 30 15:00:00 2007 |###########################################      | 6.5 x/sec
Oct 30 15:10:00 2007 |#############################################    | 6.6 x/sec
Oct 30 15:20:00 2007 |###############################                  | 5.4 x/sec


(more…)

Fedora 8 notes

The Fedora project is about to release a new version of the Fedora operating system – version 8 (its not called Fedora Core anymore, not since version 7, for all those who were living under a rock for the last year. Yes, I mean you Bryan and Chris). I’ve been running the last test release – test 3 – for about two weeks now, and I wanted to mention a few of the things I’ve noticed about Fedora 8. Which is mostly rants about stuff that doesn’t work as advertised, but aside from that Fedora 8 is a very solid release.

(more…)

Script day – manually find a thumbnail for a video

In a vain effort to fuel my blog with some content ( 😉 ) I’ll try to get into the habit of posting some throw-away scripts I’m writing for my personal use (at work and at home). Hopefully some people would find them interesting, or maybe – god forbid – useful.

Today we have a script that will help you pick out a nice thumbnail for a movie file – this is useful when setting up movie galleries and stuff. Of course it can be done automatically (most gallery software that support video files has automatic thumbnail extraction) but they rarely choose the best shot. The script here below would extract 100 frames from the first 30 seconds of a movie file and display them using an image browser. The script would also open a file browser window – the user will then pick the desired thumbnail image and drop it into the file browser, and then close the image browser. The script would then complete the process by naming the selected thumbnail image to be the same name as the original movie (with a different extension of course).

(more…)

Nice editor feature

As a software developer, I used a lot of text editors in the years I’ve been using computers, and they basically fall into two categories:

  • Simple text editors – which are good for the occasional text editing task and are basically a simple word processor replacement and often do not offer much more then a simple search and replace function and the ability to change the font face used for the text (see MS Windows Notepad)
  • Developer editors – which are a different beast all together and are packed with features for advanced text editing (One of my favorite developer editor is EditPlus for MS Windows, which I even use occasionally now that I don’t use MS Windows at all)

The second category is definitely the more interesting one and the state of the art in this category has developed in leaps and bounds in the last few years, mostly fueled by intense competition in the IDE market since Eclipse was released. One of the neatest features that modern developer editors offer is code folding1, which is the ability to collapse whole sections of text that are a single logical unit (for example – a class or a function in a program code) and replace it with a single short line of text. When editing many large files at the same time, hiding complex code sections, that you are not working on right now, behind simple representations is as powerful concept for text editing as variables are for programming.

(more…)

  1. I can even go as far as to say that if a text editor has no support for code folding, then its not a developer editor []

Everything is OK!

K3B is a very good CD/DVD mastering and burning application. I may often be heard to claim that it is the best (hands down) application for such tasks considering any available such application on any platform, even though recently I’ve mostly used Nautilus CD Burner and Brasero1.

The last version of K3B is as expected better then ever, but it contains this interesting idiosyncrasy: Every time you start the application, a non-modal transient dialog box pops up from the bottom of the interface, saying this:
Everything is OK!

(more…)

  1. The first is much simpler and enough for most burning jobs, in addition to enjoy a very good integration with my current main desktop environment – GNOME, and the later I’m trying out and comparing to K3B and at this point I can conclude that it has some nice features that K3B could do worse then adopt []

הפעלת חלונות XP תחת מכונה וירטואלית בלינוקס

החל מגרסה 2.6.20 של גרעין מערכת ההפעלה לינוקס, נוספה יכולת למערכת ההפעלה המאפשרת להריץ מכונה וירטואלית1 על גבי מערכת ההפעלה עצמה, ללא תוכנה חיצונית. אם יש ברשותכם מחשב המריץ גרסה עדכנית של מערכת הפעלה מבוססת לינוקס, הנה רשימת הצעדים כדי להפעיל את חלונות בתוך מכונה וירטואלית, בלי לכבות את הלינוקס ובלי צורך בתוכנה נוספת (כמו VMWare או VirtualBox), בעזרת KVM : Kernel Virtual Machine.

(more…)

  1. תוכנה המדמה מחשב נוסף []

שוב התקנתי לינוקס

אני לא מקורי במיוחד ;-). הפעם התקנתי אובונטו 7.10 בטא שלישית, הידועה גם כ”הגיבון הנועז, שבט 3″ – Gutsy Gibon Tribe 3. אובונטו החליפה את מערכת ההפעלה על המחשב של החברה שלי – הבטחתי לה כבר כמה זמן שאחליף לה את מערכת ההפעלה (מפדורה 7) וסוף סוף הגעתי לכך, אבל היא לא היתה נורא מרוצה מהקונספט של גרסת בטא. לא נורא: אחרי כמה מחלות ילדות קצרות1 הוא יציב להפליא. כל הדברים שציפיתי שיעבדו פשוט עובדים, בלי צורך להגדיר שום דבר – אפילו לא לעבור דרך ממשק Next, Next, Finish (כמו בפדורה) או “כן אני מסכים שתעשו את הכל לבד” כמו באובונטו הקודם. חיבור רשת, כרטיס קול, קודקים מסחריים למולטימדיה (WMV ו-MP3), מנהלי התקן מסחרים לכרטיס המסך (nVidia2 ) וכדומה.

(more…)

  1. היו הרבה התרסקויות בהתחלה עקב שינוי ממשק בינארי באחת החבילות, שלא סונכרן היטב אבל תוקן למחרת []
  2. כאן היה צריך להגדיר קצת: אובנטו עלה עם מנהל ההתקן החופשי והייתי צריך לפתוח את דיאלוג מנהלי ההתקן המסחריים וללחוץ על הכדור האדום כדי שיהיה ירוק. []

Upgrading CentOS 5 to Fedora 7

It can be argued that doing so is not the smartest thing ever, but I needed some new features available in Fedora 7 and not in CentOS 5, and I needed them on a remote server that I couldn’t just go to and re-install. So I figured both operating system are based on a previous version of Fedora (I think both are based on Fedora Core 6, but CentOS 5 may be based on Fedora Core 5), so it should be easy enough to upgrade from the older to the newer ?

Well, not really – but this is how to do it:

(more…)

Nice hack

Already covered by slashdot, but its important enough so I’m mentioning it here: Giorgio Maone is a security researcher that has found a way to create the ultimate evil pop™ up using Java.

Checkout the demo at his site (above) – it creates a full screen pop up with no visible way to close it. Pretty cool. Hopefully Sun would patch it soon and find a way to distribute the update to all currently running Java virtual machine software installed on desktops around the world… but don’t hold your breath for it. As Giorgio went public a bit early with the full disclosure1, expect to see “evil pop ups™” everywhere in the next several months.

  1. an honest mistake, can’t really blame him – read his blog post for the full story []

בטא ראשונה ל-KDE 4

פרוייקט KDE הודיע על שחרור גרסת בטא ראשונה של סביבת שולחן העבודה הבאה שלהם – גרסה 4. כמו כל פרויקט תוכנה שמכבד את עצמו, גם לגרסאת הבטא הראשונה של KDE 4 יש שם קוד: Cnuth.
זו בדיחה פנימית ואני אשאיר את זה בתור תרגיל לקורא להבין על מה.

(more…)