Tuesday 24 March 2015

Dropped my Lumia 930 in the dish washer!

Yikes! What a scare I had today when I went to grab a fork from the dish washer at work.

I stupidly pinned my phone between my shoulder and face while talking to my wife as I bent down to open the door and the blasted thing, which is in a cheap £4 dual layer case which has access to all the ports, mic's etc, slipped, slid down the half open dish washer door, sank to the bottom at the back of the damn dish washer ...

Bad  times.

Whipped it out as quick as I could, dried it off with a dish cloth, the screen wasn't responding to touch oh crap. I finished cooking my lunch in the microwave, went back to my desk tried to dry out the ports with a paper towel and cotton ear bud - this doesn't really work.so well. But on are reboot (which is what happens if you hold the power down for long enough) the screen worked, so I could shut it down properly.

I went into our workshop, fired up the air compressor and blasted all the ports - this probably pushed the water deeper, but hey ho. I then check youtube for a video on how to remove the back cover, which is actually pretty easy. There wasn't much water at all, just a small amount from where the water was lodged in the charging port scattered out over the top of the back assembly. I tried to remove the back assembly but ended up rounding 1 of the screws heads, so couldn't get it off entirely, but enough to see there was no water on any of the components!!!

I then reassembled the phone and its been fine so far, touch wood!

I've decided to get my daughter a Lumia 735 for the front facing camera as she loves selfies and dropping her phones in water, I'm hoping the 735 is just as water safe as the 930 - or more water safe than her android and feature phones she's had yet.

Friday 20 March 2015

Really, really, really useful OpenBSD commands you should never overlook...

... when diagnosing performance issues which you normally don't see on Xeon server class systems with two physical CPU's and 8 cores on each and 16-64Gb ram.

However now that we're deploying a heck load more Soekris devices running OpenBSD as routers with various functions we've learnt a lot more than just the basic OpenBSD admin tasks.

One such Soekris 6501 has IKE two IKE VPN's to two external sites, one of which had shed load of bidirectional traffic which seems to affect the other VPN.

The first thing to do when you suspect any device is being overloaded is to check processor usage using the 'top' command. We found that the it was hovering between 86% - almost 96% at its peak.
Usually this is around 5% max, and still mostly around 99% idle on other Soekris 6501 units.

The problem is that the Atom processors are not very powerful, think about the last time you used a netbook and were frustrated with the constant delays in doing tasks because it was so damn slow.

Now you've got a comparatively slow CPU with NO hardware accelerated encryption/decryption capabilities trying to push 20MBps...

Check your network throughput with 'systat ifstat 1' it shows ibytes (input) and obytes (output) on each interface including the enc* tunnels (VPN's). This is a great command for monitoring network throughput.

There are some other systat options you can use, such as 'systat iostat', 'systat netstat', 'systat rules', 'systat states' and so on, I recommend checking out the man page for more options.

Of course don't forget to also use the most basic commands, I recommend Learn UNIX in 10 minutes to help you refresh your memory ;-)

Thursday 19 March 2015

scan machines on the domain to see who is logged in

I got frustrated with not being able to find out who is logged into which computer on the 100's of customer domains we look after so wrote a little script to do it. I know of how to do it with a single computer, but who wants that half the time?

Use ADTidy to get a list of computers, or csvde or whatever you want, I like ADTidy. Remember to filter out those you don't want and change the column to just Name, export to csv, rename csv to .txt and do a find and replace for double quotes " leaving the replace field as empty to remove all the quotes.

copy and paste this into a text file and save as a .bat

for /f "delims=" %%x in (list.csv) do echo %%x >> list.txt |  qwinsta /server:%%x >> list.txt

Or you could even do it on IP's with the below, it will display the last octet of the IP as you will know the range its scanning, or alter it to include the full IP - I'll let you figure that out ;-)

 for /L %%x in (1,1,254) do echo %%x >> list.txt |  qwinsta /server:192.168.0.%%x >> list.txt

Go get a coffee and some snacks, or move on to your next job, because this is going to take a while.