Friday, 7 November 2014

Enabling SNMP on an ASUS RT-N66U

Recently I wanted to monitor an ASUS RT-N66U, a brilliant router with many feature, one of which did NOT appear to be SNMP.

After some rooting around on the Internet (pun intended?), I discovered that it is actually quite easy to set up.

For this you will need a small USB stick, I used an old tiny 4GB thumb drive.

Ensure it's partitioned and formatted to ext2. If you're using Windows then EaseUS Partition Master can help, there's a free version for home use.  Otherwise the Gnome Partition Editor, otherwise known as GParted, will work.

Just pop the USB drive into the back of the router and go to the "USB application" page in the UI, it's one of the options under "General" on the left hand index.

At the bottom of that page is the "Download Master" which you can then choose to install onto your USB.

What this does is into install a package manager, along with various packages for the Download Master, but this gives you the ability to install other packages!

Next, in the "Advanced Settings" -> "Adminstration" section, about half way down the page in the "Miscellaneous" section is the "Enable Telnet" option. Set this to "Yes" so you can log into the router via telnet.

Telnet to the router and log in with your admin account.

Execute the following:

ipkg update 
ipkg install net-snmp
app_set_enabled.sh net-snmp yes

the config file, should you need to change it, is /opt/etc/snmpd.conf

I found that after changing the file, to modify the community string for example, I had to execute S70net-snmp.1 in the /opt directory which, if you look at its contents, shuts down any snmpd and starts it again.
 

Monday, 6 October 2014

Installing VMware tools under Centos 7

Make sure you've updated the OS as much as possible using
sudo yum update

# Do a reboot
sudo reboot

Then install the kernel-headers and developer packages as well as gcc
sudo yum install kernel-headers kernel-devel gcc

Then attach the VMware tools disk through the workstation/player interface and decompress the tgz.
Then you can run the install script and follow the instructions there.
sudo vmware-install.pl 

Friday, 3 October 2014

Realtek HD Audio speakers and headphones with separate volume

So what's this article about? Well..

I recently updated my audio driver from the default built in Windows 8.1 device driver to use the Realtek audio driver and it also installed the Realtek HD Audio Manager.  It's a nice bit of software that allows you configure all things audio.

However, as soon as I installed it I noticed that, when I plugged my headphones in, the volume was deafening.  This was because the volume slider in the system tray was being shared between headphones and speakers.  Previously when I plugged the headphones in, it muted the speakers and switched over to my headphones at around 15% volume.

Now when I plug my headphones it it's at 100% still, which is what the speakers were at, needless to say it's a bit of a shock every time.

I found out however that there is a solution. If you start the Realtek HD Audio Manager, there's usually an icon in the system tray, you can go to "Device advanced settings" in the top right corner and choose "Make front and rear output devices playback two different audio streams simultaneously".

Now plug your headphones in and you get a second tab appear in the tool, one which is the "Speakers" and in my case "HD Audio 2nd output" which was my headphones.  I set the headphones as the default device by clicking the "Set Default Device" button just to the right of the volume slider in the tool.  This means that when I unplug the headphones the system falls back to the only other device, the speakers, and remembers what volume it was on, i.e. 100%.

Then when you plug the headphones in again, it recognises them and switches over to them being the default device and importantly remembers the volume setting that was last used. No more deafness!

Wednesday, 1 October 2014

Windows 10

Skipping a version seems to be all the rage. The next version of Windows is indeed destined to be Windows 10 apparently. Not Windows 9. That would be too logical.
This is interesting in the recent light of the next version of PHP, after PHP 5.6, is to be PHP 7.  There was a vote and it found in favour of PHP 7 over 6. It's possible some of the same decisions that drove that version skip could contribute to the Microsoft decision. I'm sure they'll be some official announcement about why the version skip happened, but I suspect branching of software versions meant that Version 9 was abandoned in favour of 10. Unusual for a company Microsoft's size though, after all they can call Windows whatever they like, Windows 2014 etc etc.
It's interesting as well that while their operating systems are following an increasing numeric range, since Windows 7 at least, most of their other software follows a yearly indicator, Office, SQL Server, SharePoint.

Anyway it's time to go and play with the technical preview...

Liking it so far. At last the command prompt is getting some new features. The ability to just paste using the normal CTRL+V shortcut is long overdue and now being able to dynamically resize the window with text re-wrapping is nice to see.

I like the minimal borders, doesn't seem to make it any harder to grab hold of, does remind me of some Linux window managers though. Although to be fair, there's not that many different ways of doing things. Does look a bit cleaner now.

I feel Microsoft often do this with their interfaces, make it all swanky and then dial it back to actually make it do what you want, once they've found out what that is...

It really feels like this is Windows 8.2 though, not 10.  We'll see what the future brings.

Saturday, 21 June 2014

New experimental collections - MultiDictionary

Immo Landwerth posted an interesting article here on the concept of a MultiDictionary. I know it's something I've implemented myself on many occasion and here is his contribution, available via NuGet.

An excerpt from the article at http://blogs.msdn.com/b/dotnet/archive/2014/06/20/would-you-like-a-multidictionary.aspx:
What’s your favorite data structure? Mine is the dictionary; I love the near constant time operations, the huge number of use cases, the cleanliness! Although the dictionary has a wide variety of uses, there are times when I want to add multiple values per key and Dictionary just doesn’t quite cut it. In those situations the solution is simple: just build aDictionary>!
The issue with the dictionary of list is nearly every call to the Dictionary has to be wrapped in logic to check the current state of the dictionary before adding/removing/indexing etc. I’m never satisfied with the idea of surrounding my dictionary calls with a series of if statements, so I end up coding an entirely new data structure to wrap my dictionary of lists. I’ve had to do this more times than I’m proud of, which is why I’m pleased to code up that data structure just one last time.
MultiDictionary myDictionary = new MultiDictionary();
myDictionary.Add("key", 1);
myDictionary.Add("key", 2);
myDictionary.Add("key", 3);
//myDictionary["key"] now contains the values 1, 2, and 3

Friday, 4 April 2014

Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013

For those of you wanting to use Visual Studio 2013 to contain Business Intelligence projects in your solution, the wait is over; the SQL Server Data Tools Business Intelligence (SSDTBI) templates, otherwise known as BIDS tools are now available. This includes project support for Analysis Services (SSAS), Integration Services (SSIS) and Reporting Services (SSRS).

Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2013