Getting a list of MAC addresses by only logging in

By jatkins on in Programming, SysAdmin

A while back while at work I was tasked with getting all the MAC addresses of a new lab that had been installed. Well this gave me the option of going to each computer and finding the MAC and then writing it down, and doing this on all 24 machines.

Rather than doing this I took about 10 minutes and wrote a simple ruby script that would do this for me. After creating the script I added it to my `.bashrc` file so that it would run whenever I logged into a machine and then added that machines MAC to a list along with its hostname. With this all I had to do was go to each machine and login and out, and I was done in about 10 to 20 minutes and had a nice file that was ready to be used.

Below is the code for that simple little script:
Error when loading gists from

Getting ‘dd’ to take a dump

By jatkins on in SysAdmin

I have been using dd a lot these days. It seems like I am blanking a hard drive or, making a copy of one pretty much everyday. If you have ever used dd, you know that it does not like to tell you how far along it is in the process of doing its thing. Well I have a solution to fix this!

Open up a new shell, any method will do the trick. Once in the new shell enter:

watch -n 30 kill -USR1 1234

replacing 1234 with the process id of dd, and then hit enter. Now every 30 seconds dd will take a dump and tell you whats going on.

To get the process id of your dd command run:

ps ax | grep dd

and there you have it. Now you can see where your dd process is at.