Archive for ‘June, 2009’

Safari 4.0 crashes upon exit under OSX 10.5.7

datePosted on 14:27, June 27th, 2009 by Many Ayromlou

I’ve had this problem ever since Safari 4.0 came out a little while ago. The symptoms are simple, when you close a Safari window it crashes. I reported it the first couple of times to Apple using crash reporter, then I started to look around for a solution, but to no avail. I gave up for a while and used firefox again. Today I got fed up with this and started to debug the issue from command line and finally found the problem.

A little while back I had purchased a QNAP NAS device, which I absolutely love. At the time I was impressed by the fact that it supported both XP and OSX. There is a piece of software you install on your machine called QGET which allows you to pass all sorts of downloading commands to the NAS (so it can download things in the background). This program has a Safari plugin that turned out to be the culprit. The QGET program is actually fine and by itself doesn’t cause any issues. All you need to do is delete QGET plugin folder from /Library/InputManagers and restart your machine…….No more crashes…..yeaaaaa :-)

So after yesterdays rant, I went back and figured out how to install the Cacti monitoring software (OSS, Free) onto a Ubuntu 9.04 “Jaunty Jackalope” Desktop installation. This guide uses packages only, no compiling, no Makefiles or anything like that…..You should be able to just follow this and get a fully functioning Cacti installation in about 30 minutes. Here are the steps:

  1. install ubuntu 9.04 (“Jaunty Jackalope“) Desktop Edition on your machine
  2. Login, open a Shell window and install ubuntu LAMP (Linux/Apache/MySQL/PHP) server stack on your machine
    “sudo tasksel install lamp-server”.
    Note: Make sure you remember the password for “root” user in mysql Database, write it down somewhere, we will need it later on.
  3. Get a superuser shell started since it will make for less typing.
    “sudo -i”
    followed by your password. Be carefull from now on, you’re ROOT and can literally destroy your system if you issue the wrong command. Follow along by typing the commands in the rest of this document and answering the prompts where appropriate.
  4. Issue:
    “apt-get install rrdtool snmp php5-snmp php5 php5-gd”
    This will get all of the prereqs installed on your system. Answer “yes” when prompted for additional packages. 
  5. Issue:
    “apt-get install cacti-cactid”
    This will get cacti and cacti server installed. Again answer “yes” when prompted for additional packages.
  6. You’ll be presented with a bunch of ANSI screens that ask for information or give you choices to configure “libphp-adodb” package. Follow as per below:
    • Click “Okay” on php.ini update path (screen 1).
    • Choose “Apache 2” from the pull down on next screen (screen 2).
    • Click “Okay” on cacti and spine configuration screen (screen 3).
    • At this point some config scripts will run and you’ll see a bunch on jiberish on the screen. Let it go, don’t touch nothing.
    • Click “yes” on the dbconfig-common screen and provide the password from step 2. (above) for the mysql “root” user (screen 4).
    • Now you’re prompted to choose a password for a new mysql user known as “cacti”. I used the same password as “root” user since my system is single user only. You will need to confirm the password on the next screen (screen 5,6).
    • Almost there……..
  7. Now the hard part is over. Start your browser and point it at http://localhost/cacti — assuming you’re running the browser on the cacti machine — or the appropriate IP address instead of localhost.
  8. Click “Next” on the first screen (might want to read it too).
  9. Select “New Install” on screen 2 and Click “Next”
  10. On the next screen (Path Check screen) make sure everything is found and make 100% sure to select “RRDTool 1.2.x” from the RRDTool utility version pull down. Click “Finish” when you’re done.
  11. You’ll see the login screen. Use Username “admin” and Password “admin” to login. On the next screen you’re forced to change the password for user admin. This is a good thing. Change the password to something complicated and easy to remember (does that exist?). Click “Save”.
  12. Make sure under Configuration Settings/Paths that “Spine Poller file path” is correctly set to “/usr/sbin/spine”, and its found.
  13. Make sure under Configuration Settings/Poller you select “Poller type” and set it to “spine” and Click “Save”. You’re done……Please RTFM for more Cacti info (or come back here and you might potentially find another episode of my ramblings). Have Fun!!

GroundWork Community Edition……Avoid like a plague

datePosted on 15:05, June 18th, 2009 by Many Ayromlou

Well, I finally got around to installing the Groundwork Community Edition software after battling with it’s installer multiple times. For those of you who don’t know Groundworks is a “polished” interface to several opensource network monitoring/metering projects. Projects including:

  • Nagios® — for event handling and notification
  • SNMP and SNMP–TT — for network management protocol
  • RRDtool — for underlying data collection and management
  • BIRT — for ad–hoc reporting
  • Ganglia — for grid and cluster monitoring
  • Cacti — for graphing and trending

Now the Community Edition is “Fully functional, high quality open source monitoring product” according to their website. It has community support and is a free download. Now I’m not one to bitch about free software as long as I know what I’m getting myself into. I’ve had cacti and nagios installed in the past and have had my share of pain in trying to figure them out. But, when you say “Fully functional, high quality open source monitoring product”, IT BETTER MEAN FULLY FUNCTIONAL.

You see after spending four long days looking around the documentation/interface for something as simple as “How do you get the software to — via SNMP — discover all available/recognizable interfaces on a network device — such as a switch?” that you find out the script name is “discover_snmp_if.pl” and that IT’S NOT AVAILABLE IN THE COMMUNITY EDITION. They say specifically on the help page: “Note: The Profile Tools option is available only in the Professional and Enterprise editions of GroundWork Monitor”. Now I don’t know what you call Fully Functional, but in my book it means “Containing ALL Bloody Functions”.

The Groundwork guys/gals expect you to MANUALLY create a host profile. Try doing that for 8 different 48-port pizzabox switches and two 13U enterprise switches. YES I SAID ENTERPRISE AND NO I WILL NOT BUY THE ENTERPRISE EDITION. I work at a University and as long as companies like Groundwork grab free software and package it (nothing wrong with that), where there is a lot of academic man power invested, I expect a “Fully Functional” version to be FULL AND COMPLETE.

And now I will be “Format C:”ing this stupid thing and installing free AND FULLY FUNCTIONAL SOFTWARE (Cacti/Ganglia/Nagios)….Thanks!!!!!

Get Wavy…..

datePosted on 12:45, June 14th, 2009 by Many Ayromlou

Yep, google has taken the giant step for mankind and introduced their collaboration platform….Wave. This is absolutely amazing. A mixture of Email, IM, Bulletin Boards, Versioning System, Wiki with a dash of google magic…..Man I can’t wait for my account…..Oh and did I mention it’s Free and Open Source. Yes, google is giving it away for you to install/play with on your own server. The introduction video is longish but definitely well worth the time. It’s out of this world……

BTW…..ROSY F*CKING ROCKS…..Go and check it out at about 1:12:00 into the video.

YES…FREE…..brought to you by the very nice people at Stanford University. Just follow this link into the ITunes University (you need ITunes app installed) and start learning something today…..It’s free.

Quick tool to check URL and/or username availability…..

datePosted on 16:35, June 11th, 2009 by Many Ayromlou

Namechk allows you to check to see if your desired username or vanity url is still available at dozens of popular Social Networking and Social Bookmarking websites.

Tell Google When You’ve Moved your Site

datePosted on 16:02, June 11th, 2009 by Many Ayromlou

If you’re changing from one domain to another for your website, it’s good practice to use a permanent redirect header for all the old pages. Added to that, you can now let Google know of the move in a new Webmaster Tools section called “Change of address”.

OSX 10.5: How to create a public share folder…..

datePosted on 12:39, June 11th, 2009 by Many Ayromlou

This problem has been around (I think) ever since the introduction of POSIX permissions. In pre-10.5 versions you could sorta do something like this by changing the default umask on the system, but that was system wide and applied to all folders/files a user created on the entire filesystem…..not nice. The real question is how do you create a directory that is totally public without mucking around with system/user wide settings. A folder that anyone on the system in question can read/write/modify/delete anything anyone else has put in there. A true shared directory with share permission inheritence. We call it “pub” directory at my place of work.

The old trick in OSX (in case someone is interested) was to write a small script that you ran via cron every 5-10 minutes that would “chmod” all the entries in a folder to be open to a specific POSIX group….something like the script below:

find /path/to/shared/directory ! -type l ! -perm -g=w -print0 | while IFS
= read -rd $'\0' filename
do
echo "*+*+*Permission changing program caught something"
if [ -d "$filename" ]then
chmod g+rwx "$filename"
# echo Directory changed
stat -l "$filename"
fi
if [ -f "$filename" ]then
chmod g+rw "$filename"
# echo File changed
stat -l "$filename"
fi
done

Well those were the old days and now with the help of ACL’s we can do this a lot nicer/cleaner. The procedure below is for OSX 10.5+ (it should also work on 10.4, although I haven’t tried it).

  1. Enable ACL’s on your computer. Type the following command in a Terminal window: sudo /usr/sbin/fsaclctl -p / -e and verify that ACL’s are now enabled by typing: sudo fsaclctl -p /
  2. Create a new group. The easiest way to do this is through the Accounts pane in System Preferences. Just click on the Plus sign to add a new account and then select Group from the New Account drop-down menu. Call this group anything you want; I called mine public. Add all the users who you want to participate in the file sharing to your newly-created group.
  3. Do the following steps in Terminal, in Applications -> Utilities:
  4. Change directory to /Users/Shared: cd /Users/Shared
  5. Create a new folder where the users will be able to share their files. I created a folder named Pub by typing mkdir Pub
  6. Change the group of the new folder to your newly-created group: sudo chown admin:public Pub
  7. Change the default permissions, if you wish: sudo chmod 770 Pub (this is optional if you’re happy with the default permissions).
  8. Create the ACL entry for the new folder:sudo chmod +a "group:public allow file_inherit,directory_inherit,readattr,readextattr,readsecurity,read,execute,list,search,writeattr,writeextattr,delete,append,write,delete_child,add_file,add_subdirectory" Pub

You now have a true public folder where all members of the group public can read, write and delete files, as well as read, write to and create new sub folders. The ACL rule takes precedence over standard UNIX file permissions and is automatically inherited. It’s this automatic inheritance that is really important.

IMPORTANT: You must copy (hold down Option in Finder prior to dragging), and not merely move, items. This is particularly important with bundles, such as the Aperture library bundle for example. Moving items doesn’t inherit/change the permissions/ACL’s. Copying ensures that the files are actually created in the shared folder, thereby forcing the ACL rules to be inherited. If you have moved files into this directory and the permissions are a bit messed up you can quickly fix that by issuing the following recursive command which will set the ACL’s and POSIX permissions to the “right” ones so that everyone can do anything in that directory:
sudo chmod -R +a "group:public allow file_inherit,directory_inherit,readattr,readextattr,readsecurity,read,execute,list,search,writeattr,writeextattr,delete,append,write,delete_child,add_file,add_subdirectory" /Users/Shared/Pub

OSX 10.5: How to delete user accounts from Command Line….

datePosted on 11:34, June 11th, 2009 by Many Ayromlou

I ran into this problem a little while back and thought I should document it. It’s kinda similar to the “How to get Admin rights in OSX Leopard using single user mode…” document from earlier this year. Here is the procedure:

  1. Boot into single user mode. Hold Command-s at startup.
  2. Check the filesystem: /sbin/fsck -fy
  3. If no remaining errors, mount the filesystem: /sbin/mount -uw /
  4. Start up directory services:launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plistNote that single user mode said to use com.apple.DirectoryServicesLocal.plist, but that didn’t work — this did.
  5. Find what groups the user belongs to: dscl . -list /groups GroupMembership | grep username — repeat for each group except for the user’s own group.
  6. Remove the group corresponding to the username: dscl . delete /groups/username (this may not be necessary — you may get an error that the group doesn’t exist; you can ignore it and go on).
  7. Remove the user account: dscl . delete /users/username
  8. At this point, you may wish to remove or archive the user folder in /Users.
  9. You may wish to remove the .AppleSetupDone file in /var/db to cause the Setup Assistant to run when next booted.
  10. All done? Type reboot to reboot the system or shutdown -h now to shut down the system.

Nice and squeaky clean…..

Red Rocket plays back 4K Red codec files in realtime….

datePosted on 15:33, June 10th, 2009 by Many Ayromlou

RED has just announced a realtime 4k/5k debayer PCI-E card for your Mac or PC (OSX/Linux/Windows). You get 30fps at 4k and 25fps at 5k.

  • RED Rocket board with Quad DVI and Dual Link HD-SDI- $4750
  • Decode and debayer 4K R3D files realtime. Hyper-accelerated transcode to any system codec. Specs to be posted upon completion of testing.
  • Plays full quality realtime 4K to 4K monitor or projector from DVI output. Plays full quality 2K/1080P scaled from 4K footage out the Dual Link HD-SDI from RED Rocket card.
  • Plays full quality 2K scaled from 4K footage realtime through system graphics card and monitor.
  • Optional Breakout box with Quad HDMI and Quad Dual Link HD-SDI- $1200
  • Plays full quality realtime 4K to 4K monitor or projector from QUAD HDMI/HD-SDI RED Rocket breakout box output.
  • Delivery schedule in now 1st week of July 2009.
12Next