Tuesday, 31 December 2013

Happy New Year!

It's a brand new year. People will start thinking about the things that they have accomplished and the things they wish they had accomplished.


I know that this past year was a great year. I managed to do so many things and a lot of them wouldn't have happened if it weren't for my wonderful wife.


Happy New Year!

Wednesday, 2 October 2013

Debugging a core? What tools do you use?

Whenever you have an application crash or become unstable and the worse part is that logs don't give you anything useful, what do you do? What tools could you use.

Well, one thing is strace. Running and tracing a process while it's doing its thing is one way. Crashing the process or generating a core with "gencore", gcore (aka gdb core) or something similar is another.

But what do you do when you want to capture the core and its dependencies on another machine to debug? 

On AIX IBM has snapcore. If you don't know this utility, read about it! It's a great tool but there is no equivalent in Linux. 

What can you do?

Well it turns out that gdb can provide a few things that make this easier. For example, gdb can list the libraries that are loaded in memory on the core. This is helpful so that you can gather those to bring in house.

So once you are in gdb you can do a "info sharedlib" and get this list.

Once you do that, you can collect the libraries that you need and use them to debug the core locally by loading them at the same time as you load the core and binary. You need to set some information when you are doing this.

I'll write another post with my way of doing this... and possibly a "snapcore" equivalent for Linux.

-P

Tuesday, 20 August 2013

Home Automation - Is your house smart?

For many years I've wanted to automate things around my house. A long time ago (almost 10 years ago!) I use to use MisterHouse. This was a great application and although I didn't have much in looks, it made my imagination run wild. I was using a few X10 components and though it worked, it was somewhat disappointing in it's performance.

Now, I am planning on embark on a HA project once again. This time, I would like to use something which offers a lot more than Mr House. I've been waiting to see how that project matured and how much development was put in... Though I must admit it's a complex project, I certainly look forward to start it. (If my wife lets me.)

This time, I am going to use LinuxMCE and if you ever go on YouTube, look it up. The demo is quite impressive so it's worth it to look at users' environments. This video/demo I liked above was using a much older version of LinuxMCE. It's capabilities are quite impressive.

Now one thing that is good about HA is that you don't have to invest tons to get started. I'm going to start with a module or two and control a light or two. Once I've got it going, I'll hopefully convince my wife to let me invest in one module a month. (One security camera here, one light module there, another VOIP phone here...)

In short - HA is something that has been available for a while and doesn't take a lot to get started. When are you going to start?

Monday, 8 October 2012

How to tell someone you love them?

I haven't written in a while, not because I haven't had anything to say, but mainly because I haven't felt like putting it down in my blog.

Now, I have something I want to say, but I don't know how to say it.

I love my wife and kids. They are the most important thing to me. I've always thought that what I did was in their best interest. Now, I'm not so sure that is what's happened.

I love my daughter so much that it's gotten to the point where I feel I can't give her anything she deserves anymore and as adult she now makes her own decisions. I feel I can't provide her with what I hoped I would be able to.

I love my son so much that it hurts whenever I think of anything happening to him or of him suffering in any way. 

I love my wife so much ... that I can't find a way of expressing it to her. I want her to be happy. I want her to know how I feel about her and that I've always been in love with her, but simply telling her isn't good enough.

She's always has told me "Actions speak louder than words" and I haven't acted. My actions have always turned out to be the stupidest thing that I could possibly think of. And that wasn't my intent! I REALLY thought that what I was doing was "ok" and it could be explained away. That it would get fixed. I live in a fantasy world where I can dream up the solution to my relationship problems. I always dream that things work out. It never does.

So now I'm stuck. I love my wife so much, but I don't know how to tell her and I don't know what to do.

Any suggestions?

-P


Wednesday, 14 March 2012

Getting Pidgin and Microsoft Lync to work nicely.

In the Windows centric company that I work at we use Office Communicator. Therefore I use Pidgin and the SIPE/SIMPLE plugin to be able to communicate.

Recently, they've started changing the version of OC to the latest Lync version. All of a sudden, my Pidgin would fail logging in. I checked on a Windows system and I still couldn't use the Lync client so I figured things were in transition and I didn't bother too much with it.

However, someone came to ask me about it and when I tried the Window Lync client again, I suddenly was able to log in! I tried Pidgin again and it would tell me that I was using not the right version. So I started searching around. I found that: Microsoft allows administrators to block older version of OC from connecting to the server.

So I started searching a bit more and found that others had the same problem and were looking for a solution. I then stumbled upon a very useful link.

This page describes how to set the user-agent in Pidgin so that you could connect as a certain version of OC. However, when I tried the same version on the post, that version didn't seem to work. So I started searching for a newer version and I found it...

To get Pidgin to work use the following UserAgent:

UCCAPI/4.0.7577.0 OC/4.0.7577.0 (Microsoft Lync 2010)

Tada! I'm able to chat again!

-P

Friday, 24 February 2012

Zenity re-discovered

It's been quite a while since I've posted anything. Life's gotten busy!

Recently I've been writing some scripts and thought it would be nice to guify them a bit. I then recalled using Zenity for a few things and though it would be great to take a look. Since it had been a while I didn't quite remember everything. A quick Google search returned a pair of great sites that helped out with this.

Zenity guide by examples 1 and Zenity guide by examples 2 both of which can really describe how it works in nice to understand examples.

Now to start using these!

-P

Friday, 19 August 2011

DNS and DHCP

For some reason I hadn't enabled the ability for DHCPD to update my internal DNS server when a new client joined the network, so I decided to do that.

The process is quite simple, you generate a key which you give to both DHCP and DNS and they hash out the communication.

However after I did that I noticed I was getting an error:

Aug 19 17:00:56 server01 dhcpd: if iPod-touch.mydomain.org IN A rrset doesn't exist add iPod-touch.mydomain.org 3600 IN A 192.168.1.140: timed out.
Aug 19 17:00:56 server01 dhcpd: DHCPREQUEST for 192.168.1.140 from 00:26:bb:a1:cf:a0 (iPod-touch) via eth1
Aug 19 17:00:56 server01 dhcpd: DHCPACK on 192.168.1.140 to 00:26:bb:a1:cf:a0 (iPod-touch) via eth1

I Googled for any signs of what this could mean and I didn't find anything. There weren't too many people reporting the same issue, so I guess there wasn't that much to it.

I finally did an strace on the named server and managed to catch that the server was getting an access denied error. I looked at my bind directory and realized it was owned by root as were the files... I quickly changed this to the bind user and voila! problem solved.

-P

PS - many people may wonder why I would want to do this in the first place, do I REALLY have that many machines or ... anyway, the answer is it's "because I can".