Windows 7, left alone for 5 mins and system pushes cpu to 20%…

After a lot of digging i finally solved an issue that was causing my Windows 8.1 laptop fans to go into overdrive when the machine went into idle state.

Excerp
“But now it seems like Microsoft’s goal to snoop on its users is so strong that they have now released several updates for their older versions of Windows that provides them with a capability to spy on Windows 7, 8 and 8.1 users too.

The two recent Windows updates having the identification number, KB3075249 and KB3080149, grants a capability to Windows to capture and send your data to company’s servers.”

After removing the following updates.. guess what.. “System” no longer tried to explode my machine doing whatever it was attempting to do with regards to Windows10.

Not all will be installed. To find fire up cmd and launch powershell

Then enter

If this returns with red text, you don’t have the update installed.. if it returns with a description.. you may want to delete it. Fire up a new cmd terminal and run:

(work your way through the list replacing the number per entry above)

 

 

 

 

Basic configure of fail2ban on modified SSH port number

Default ssh port as everyone knows is 22… so the basic 101 step in hardening the front on SSH is to change the default port number from 22 to something else.

Great. This will already cut out a lot of crappy pests… however, you will need to tell fail2ban about this change (at least this is the case on Debian 8).
Open the conf file:

Find the ssh block:

It should look a little like this:

Set the port from ‘ssh’ to whatever you changed your ssh port number to, eg ‘666’. Save and exit the conf file.
Now restart fail2ban:

Now give it a test, try logging into your server with a bad password.. after 3 attempts you should be locked out for 600seconds, or whatever you set the lockout to be.

Windows Idle high CPU: ntoskrnl.exe misaligned access+0x3f0

Running windows 8.1

Leave the machine for 5 mins and the cpu ramps up to around 20%.. something is either stealing all my data or something else must be getting in a continuous loop.

1 – http://technet.microsoft.com/en-us/sysinternals/bb896653 Download and run. This will give a highly detailed view on what is going on, kind of like htop for linux but on steroids ;):

2 – Right click on system, click properties then hit the ‘threads tab’ and order by cpu.. then wait…

3 – Once the cpu has ramped up and the fans have kicked in, you will see what it is precisely that is kicking off CPU…

 

For me it was found to be:  ntoskrnl.exe_misaligned_access+0x3f0

(god only knows who is charge of naming things at windows but something is clearly wrong)

At this point I would head toward:  http://superuser.com/questions/919178/ntoskrnl-exe-misaligned-access-eats-a-lot-of-cpu-when-idle

 

 

 

Getting the ordinal suffix for a day from a js date object..

Unlike PHP’s date function which can print the ordinal suffix of a day by passing the ‘S’ character, in the world of javascript there is no such luxury. Up until entering into the world of the MEAN stack I had no need for this functionality client side.. but try finding out how to get the same thing done in JS, it basically doesn’t exist.

So, here is a little function that will return the suffix of the day of a month: