OSX & Linux Disk Benchmarking

As a SysAdmin, you’ll need to benchmark disk performance from time to time, or rather just gloat that your system’s drive is better than your buddy’s. In my particular case, I have an existing need to quantify performance metrics on my work macbook pro’s disk speed with Symantec PGP (don’t get me started on this product), without it, and with Apple FileVault in place of it.

Perusing the web I came across a good article from cultofmac.com that assisted me with my disk benchmark testing.  This can apply to OSX and most Linux systems as well.

To test a system’s write speed, I used the following command from a terminal window:

time dd if=/dev/zero bs=1024k of=speedtest count=1024

Output from my work iMac w/SSD:

1024+0 records in
1024+0 records out
1073741824 bytes transferred in 8.948791 secs (119987362 bytes/sec)

real 0m8.954s
user 0m0.001s
sys 0m0.413s

The bytes per seconds number when converted to Megabytes equates to 114.42887 Mb per second.

To test the read speed of my disk, I ran the following from terminal.app:

dd if=speedtest bs=1024k of=/dev/null count=1024


1024+0 records in
1024+0 records out
1073741824 bytes transferred in 0.145955 secs (7356659197 bytes/sec)

So this is around 7016 Mb (6.8 Gb) per second with some rounding.  Based on the above output results, my work iMac w/ SSD can write at 114 Mb/s, and read at 6.8Gb/s.

When I get around to testing on my work laptop, these commands should give me good data metrics.

As far as bytes to Mb/Gb/etc conversioning goes, you can use google conversion web tools, or the “units” command on a Linux host if available.  There are several alternatives you can use as well.

Units Linux command sample for reference:

units –terse “119987362 bytes” “MiB”




Running logrotate Manually

So the other day at work, I needed to modify logrotate.conf for one of our groups.  To test my changes, I forced a logrotate.d run in verbose mode to ensure that my changes were applied properly.

The command I used:

logrotate -vf /etc/logrotate.conf

Since I’m predominantly administering CentOS, /etc/logrotate.conf is where my logrotate config file lives.  In Debian or Ubuntu however, one might find their logrotate configuration file under /etc/logrotate.d/<hostname>.conf.

OSX :: CPU & Core Counting

A while back ago I blogged about  rudimentary Linux cpu and core lookups.  I figured I’d follow up with how you do this in OSX via “system_profiler SPHardwareDataType” as well.

zissou:~ jrad$ system_profiler SPHardwareDataType

Hardware Overview:
Model Name: iMac
 Model Identifier: iMac12,2
 Processor Name: Intel Core i7
 Processor Speed: 3.4 GHz
 Number of Processors: 1
 Total Number of Cores: 4
 L2 Cache (per Core): 256 KB
 L3 Cache: 8 MB
 Memory: 8 GB
 Boot ROM Version: IM121.0047.B1F
 SMC Version (system): 1.72f2
 Serial Number (system): D25J10LPDHJW
 Hardware UUID: 813A5897-1248-5460-84F6-062AE27929A7

Basketball Diaries :: Introduction & Jump Shot Development

Back in January when I started this blog, I mentioned my basketball hobby, and applying the concept of Win Learn Change to everything you possibly can in life using it as an example.  I figured that it would be a good idea for me to start blogging more about basketball and the progress I try to make with it.

Before going any further, I’d like to note that I’m not an extremely physically athletic, gifted, or talented individual in general.  I do however love the game of basketball very much, and enjoy playing it as an amateur.  I resumed basketball play in the summer of 2008 primarily to get in shape and develop a healthy weight by body mass indexing standards.  Before that, I played until the 8th grade (1992, man I’m old).  With such a time gap, there was lots on the court for me to develop and re-develop.  This challenge became more of an endeavor to me than a side project.  Regardless, I’m glad this hobby has not been an easy journey as the rewards from succeeding are highly enjoyable.  I definitely intend to keep this hobby going for myself as long as I physically can and will blog about it here and there along the way.

For the past couple of years I have made various strides with my game, such as being able to run the game defensively and offensively on and off the ball, and develop some sort of a rhythmic jump shot.  A consistent in-game jump shot has been (and still is) the hardest task for me to develop.  After watching JR Smith’s Nike video on shooting drills, a simple suggestion of tucking my elbow has made all the difference lately.  The problem is, whenever I adjust my shot in basketball, it almost feels like I’m starting over to a certain degree.  Starting over however turns into motivation, and eventually that turns into results.  At any rate, JR’s pointers have helped me a great deal, and I highly recommend them for anyone looking for help or new ways to improve their jump shot.