Wednesday, December 2, 2015

WIFI Information in Mac OS


What's my connection mode: 802.11g or 802.11n or whatnot?  What's my current transmission speed?

Hold down the "alt/option" key on the keyboard and click on the Wifi indicator as shown in the picture below.  As you can see, you ca see more information.  Right now, I'm connecting with 802.11n at 52Mbps.  The speed fluctuates.  



WD My Cloud EX2 - Fan Problem - Manual Control

Context:


WD My Cloud EX2 8TB

Problem:


Fan speed is always at 0 RPM even when the temperature gets around 56 degrees Celsius.  I thought it was just a defective unit, so I called Western Digital to get a replacement.  Unfortunately, the replacement had the same problem.

Side note:  you have to pay for shipping to return the old unit to them.  I thought that they would send me a prepaid label, but that wasn't the case.  I paid around $20 for UPS shipping.

Solution:


The problem is a software one.  To manually control the fan, you will have to ssh in and run the fan.

First to enable SSH, go to Settings -> Network, under Network Services, you will find SSH.  Turn that on.  You will get a warning about voiding the warranty.  This warning stopped me first time for not going in.

Anyway, if you decide to proceed and configure your SSH.

I'm using a Mac, so from my terminal, I run

ssh sshd@[name of your unit here]

Once you're in, there's a command call "fan_control"

fan_control -h

Will give you a list of options

*** Fan Cobtrol Help Message ***

fan_control b c: for NAS booting
fan_control 0 d : [auto] open debug msg
fan_control 0 c : [auto] close debug msg
fan_control -L [value] : set Lower (THYST)
fan_control -H [value] : set Upper(TOS)
fan_control -g 0 : get current temperature
fan_control -g 1 : get Lower temperature
fan_control -g 2 : get Upper temperature
fan_control -g 3 : get fan state
fan_control -g 4 : get fan rpm
fan_control -f 0 : set fan stop
fan_control -f 1 : set fan rpm4000
fan_control -f 2 : set fan rpm5000
fan_control -f 3 : set fan rpm6000
fan_control -f 4 : set fan rpm7000
fan_control -f 5 : set fan rpm8000
fan_control -f 6 : set fan rpm9000

Now as you can see, to get the current temperature, you run

fan_control -g 0

To set the fan speed at rpm4000, you can run

fan_control -f 1

To stop, run

fan_control -f 0

And friends, that's how you can manually control it.

If you want to monitor the temperature, say every minute, included is another utility called "watch" that you can use.

watch -n 60 fan_control -g 0

Here, I'm saying that gives me the temperature every minute.  60 there is 60 seconds.  To quit, you can simply do Control + C

Hope that they will fix the issue in the next firmware update.

Friday, January 25, 2013

iPad Mini 2? When?

I can't wait for iPad Mini 2 to come out with Retina Display.  I played around with the current iPad Mini, and the display really bothered me.  Since I'm using a Retina Display MacPro, a Retina Display iPad and a Retina Display iPhone, I notice the resolution difference right away, and I can't stand it.  If you're coming from "Retina Display" (Apple's Marketing Term), you better wait for a next generation of the iPad Mini.  If you buy one now, you will be greatly disappointed.  Don't know when that will come out though.  There have been a lot of rumors around the March time frame.

Read Zip and Look At XML in Zip To Count Elements With A Specific Attribute

import xml.sax
import zipfile
import re

counter = 0

class MyContentHandler(xml.sax.ContentHandler):
    def __init__(self):
        xml.sax.ContentHandler.__init__(self)

    def startElement(self, name, attrs):
        if attrs.has_key("color"): # search for the element with the attribute of color
            global counter
            counter += 1

def count(myZip):
    zf = zipfile.ZipFile(myZip)  # read in zip
    files = zf.namelist() # get the files in zip
    for file in files:
        if re.search(".*myXML.xml", file) is not None:  # using regular exp to find file
            f = zf.open(file) # open file
            xml.sax.parse(f, MyContentHandler()) # parse the xml
            print counter # print counter
            break

if __name__ == '__main__':
    import sys
    if len(sys.argv) == 2:
        try:
            count(sys.argv[1])
        except IOError:
            print 'Filename not found.'
    else:
        import os
        print 'usage: %s zip' % os.path.basename(sys.argv[0])

Wednesday, January 23, 2013

Free Online Storage in the Clouds


Here are some free ones and their sizes:

Box Dropbox Google Drive iCloud MediaFire Mega SkyDrive
5 GB 2 GB 5 GB 5 GB 50 GB 50 GB 7 GB

iPhone Messages App Doesn't Rotate To Landscape

Context:

iPhone 5
iOS 6

Problem:

The Messages app doesn't rotate to landscape when I want to text in landscape mode.

Solution:

Reboot the phone. Power off and power on the phone again using the power button.

Monday, January 14, 2013

Windows Keeps Rebooting in VirtualBox

Context:

VirtualBox
Windows 2008 Server R2

Problem:

Windows keeps restarting in VirtualBox without giving the chance to log in.  You see the screen where it asks you to do CTRL+ALT+DELETE to log in, but it will be restarted over and over again.

Solution:

While it keeps rebooting, do F8.  Hopefully, you get the screen where you can choose the last known configuration of Windows.