Mar 10

Whether you are interested in specific apps, or you want a chance to learn but need to keep running Windows or whatever the reason, andLinux is an interesting project.

andLinux: Run Linux in Windows%

As you can see above, andLinux runs natively under Windows, allowing you to execute Linux applications (like XFCE) on your Windows machine.

andLinux is a complete Ubuntu Linux system running seamlessly in Windows 2000 based systems (2000, XP, 2003, Vista; 32-bit versions only). This project was started for Dynamism for the GP2X community, but its userbase far exceeds its original design. andLinux is free and will remain so, but donations are greatly needed.

andLinux uses coLinux as its core which is confusing for many people. coLinux is a port of the Linux kernel to Windows. Although this technology is a bit like running Linux in a virtual machine, coLinux differs itself by being more of a merger of Windows and the Linux kernel and not an emulated PC, making it more efficient. Xming is used as X server and PulseAudio as sound server.

Read more and try it out at the project site www.andLinux.org.

Mar 10
em Driver Debug
icon1 admin | icon2 FreeBSD, Networking | icon4 03 10th, 2008| icon3No Comments »

If you’ve used FreeBSD chances are you’ve used the em driver (for Intel gigabit network cards). Debugging packet loss and link errors can be difficult, so here’s a handy tip for those of you using the driver –

Using sysctl, you can get “debug” information off of your cards.  Execute “sysctl hw.em0.stats=1” and “sysctl hw.em0.debug_info=1” each time you want the information to be logged to /var/log/messages (or dmesg). You can replace “em0″ with whichever network card you want, for a quick list of what seems to be available you can run “sysctl -a hw.”

Here’s what you can expect to see –

/kernel: em0: Adapter hardware address = 0xc62931e0
/kernel: em0:CTRL  = 0×3c0249
/kernel: em0:RCTL  = 0×0 PS=(0×8402)
/kernel: em0:tx_int_delay = 0, tx_abs_int_delay = 0
/kernel: em0:rx_int_delay = 0, rx_abs_int_delay = 0
/kernel: em0: fifo workaround = 0, fifo_reset = 0
/kernel: em0: hw tdh = 0, hw tdt = 0
/kernel: em0: Num Tx descriptors avail = 0
/kernel: em0: Tx Descriptors not avail1 = 0
/kernel: em0: Tx Descriptors not avail2 = 0
/kernel: em0: Std mbuf failed = 0
/kernel: em0: Std mbuf cluster failed = 0
/kernel: em0: Driver dropped packets = 0
/kernel: em0: Excessive collisions = 0
/kernel: em0: Symbol errors = 0
/kernel: em0: Sequence errors = 0
/kernel: em0: Defer count = 0
/kernel: em0: Missed Packets = 0
/kernel: em0: Receive No Buffers = 0
/kernel: em0: Receive length errors = 0
/kernel: em0: Receive errors = 0
/kernel: em0: Crc errors = 0
/kernel: em0: Alignment errors = 0
/kernel: em0: Carrier extension errors = 0
/kernel: em0: XON Rcvd = 0
/kernel: em0: XON Xmtd = 0
/kernel: em0: XOFF Rcvd = 0
/kernel: em0: XOFF Xmtd = 0
/kernel: em0: Good Packets Rcvd = 0
/kernel: em0: Good Packets Xmtd = 0

Mar 10

FreeBSD

FreeBSD has long been plagued by less-than-best SMP performance, especially in versions 4 and 5. Slashdot is reporting FreeBSD 7.0 SMP performs much better, and is ahead of Linux.

“After major improvements in SMP support in FreeBSD 7.0, benchmarks show it performing 15% better than the latest Linux kernels (PDF, see slides 17 to 19) on 8 CPUs under PostgreSQL and MySQL. While a couple of benchmarks are not conclusive evidence, it can be assumed that FreeBSD will once again be a serious performance contender. Some posters on LWN have noted that the level of Linux performance could be related to the Completely Fair Scheduler, which was merged into the 2.6.23 Linux kernel.”

There has since been an update trying to prove that Linux is faster –

Update: 03/06 21:32 GMT by KD : An anonymous reader sent in word that Linux kernel developer Nick Piggin reran the benchmark today and came to a different conclusion: In his benchmark Linux was faster than FreeBSD.

But whoever the winner, the performance is clearly much, much better than before.

Mar 9
Squid URL Ping
icon1 admin | icon2 Squid | icon4 03 9th, 2008| icon3No Comments »

Squid Cache

Squid can be difficult to debug, especially if you have a URL which sometimes works and sometimes doesn’t. Fortunately, “squidclient” comes with a ping mode which allows you to ping a web url through the cache and see throughput, page size and time to download.

Below is an example of the output from the default command –

2008-03-09 20:14:04 [1]: 3.951 secs, 6.968667 KB/s (28KB)
2008-03-09 20:14:08 [2]: 4.296 secs, 6.408350 KB/s (28KB)
2008-03-09 20:14:12 [3]: 4.257 secs, 6.467060 KB/s (28KB)
2008-03-09 20:14:16 [4]: 4.200 secs, 6.555757 KB/s (28KB)
2008-03-09 20:14:20 [5]: 3.966 secs, 6.942557 KB/s (28KB)

To do this run squidclient -r -g 10 http://www.unixtrix.net . The -r forces the cache to fetch the url each time (e.g. not a cached copy). The -g 10 tells squidclient to fetch the url 10 times, you can set this to 0 to continuesly ping.

If your proxy requires authentication you can use -u username and -p password or optionally if the website url you are requesting requires authentication you can use -U username and -P password.

Using -I interval will allow you to set the interval it should ping at. For example, -I 60 will send one request a minute. Below is an example using these tips to check our connection to http://www.google.com every 10 seconds until interrupted –

 # squidclient -r -I 10 -g 0 http://www.google.com
2008-03-09 20:11:56 [1]: 0.687 secs, 0.958083 KB/s (1KB)
2008-03-09 20:12:06 [2]: 0.346 secs, 1.902321 KB/s (1KB)
2008-03-09 20:12:16 [3]: 1.066 secs, 0.617451 KB/s (1KB)
2008-03-09 20:12:26 [4]: 0.353 secs, 1.864598 KB/s (1KB)

Next Entries »