Thursday, February 5, 2009

How to Check RAM and SMBIOS information in Ubuntu

I wanted to see what RAM slots I had available to increase my RAM.  Instead of opening the box or relying on http://crucial.com to tell me I found this Linux command.

sudo dmidecode -t 17


The command is DMI decode and the first line in the man page says "tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format."  Run dmidecode | pager to see BIOS information.

Wednesday, February 4, 2009

Ubuntu QuickCam Express

lsusb:
Bus 001 Device 004: ID 046d:0840 Logitech, Inc. QuickCam Express

Bug #196811 - Comment #32
Sebastian Keller wrote on 2008-10-08: (permalink)

I built the driver this way:

1. install "build-essential" and make sure you have the current linux-headers package installed.
2. get the qc-usb source used by ubuntu from http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid.git;a=snapshot;h=af08ea6e38e756093ada807ed79ca409afd7c174;sf=tgz and extract it on the desktop
3. get the original qc-usb source from http://downloads.sourceforge.net/qce-ga/qc-usb-0.6.6.tar.gz?modtime=1162648367&big_mirror=0 and extract only "Makefile" and copy this Makefile over the one from the ubuntu version
4. get http://launchpadlibrarian.net/17739608/quickcam_parent.patch and store it on your desktop
5. get http://launchpadlibrarian.net/17601962/quickcam_type.patch and store it on your desktop
6. open terminal and "cd ~/Desktop/ubuntu-intrepid/"
7. patch -p3 < ../quickcam_parent.patch
8. patch -p3 < ../quickcam_type.patch
9. make quickcam.ko
10. sudo cp quickcam.ko /lib/modules/$(uname -r)/kernel/ubuntu/qc-usb/
11. make sure the old version of the module is not loaded by checking "lsmod | grep quickcam" and then plug in your camera
12. start cheese

The problem you had about something being undefined is because of a change in the kernel, that the qc-usb source in the ubuntu tree got adapted to, but the one on sf.net not.

Release Renew IP Addresses

Here is a nice little script to get all workstations that were leasing from 1 DHCP server to release and renew addresses to a 2nd Microsoft DHCP server.

psexec.exe -cd -n 2 @ipaddresses.txt release.bat

The -c copies the bat file to the workstation.  The -d doesn't wait for each line to finish (without it, your connection will get lost after the first line, ipconfig /release).  The -n 2 changes the timeout behavior to assume that all workstations will respond within 2 seconds.

release.bat has only 2 lines:
ipconfig /release
ipconfig /renew

The ipaddresses.txt file has a list of all IP addresses from the original DHCP scope.  If it finds a workstation on the 'old' ip range, then it will force the workstation to give up the address and ask for a new one.