8 posts tagged

Tech

Later Ctrl + ↑

Poor man’s CPU stress test

Just a few days ago I had to stress test the CPU on a machine with nothing installed but bare Linux and no internet access.

I googled a bit, found a couple bc expressions and modified one that calculates 5000 characters of pi like this, so that it runs indefinitely:

$ while true; do time echo "scale 5000; a(1)*4" | bc -l; done

This is of course non-parallel, so run as many of these as you have cores to get almost 100% CPU load:

It’s also a great benchmark for CPU performance, just record the time and compare it to friends’ results :)

 No comments   2013   Tech

Logon to Windows remotely as local user

A friend showed me today how to conveniently logon to a local or remote machine as its local user, even if it’s in a domain. The trick is to prefix the username (local to the remote machine) with a “.\”, which (obviously) means “local domain”.

So, to logon to a remote machine via RDP as the machine’s local Administrator, enter this in the user prompt:

.\Administrator

The following screenshot is taken on a machine joined to a domain. Notice how “.\” is interpreted as a local domain, just below the password box. Observe:

Local domain: .\

The best thing is you can also use this for entering any remote user’s credentials on your own machine. There’s a catch: when you’re presented with a credentials prompt on your machine and enter the remote username prefixed with “.\”, Windows shows the name of your local machine below the password box. When you actually use the credentials to login to the remote machine, it interpets “.\” as its own “local domain”, and you’re logged in successfully. So don’t let your OS fool you :)

I’ve said quite a few bad words while trying to find out what a domain machine’s (often cryptic) name is to logon as a local Administrator. It’s probably a basic technique taught for MCSA and suchlike, but neat nevertheless, isn’t it?

 No comments   2013   Tech