Skip to main content


Showing posts from July, 2008

inventory tool for dell update pulled!

in case you missed it, check out this link: it seems microsoft has pulled the ITDU scan tool.  we noticed this issue come up dell servers with perc 6 controllers.  if it hadn’t been for one of our mindful development teams, we probably wouldn’t have noticed.  it looked as if scanwrapper.exe was calling perc5.exe to interrogate the controller card.  this was causing errors to pop up in the event log indicating the mismatched condition. our quick workaround was to stop remove any servers in our collections that had perc 6 listed as the scsi controller in hardware inventory.  seems to run fine on older hardware still. here are the details from the page: Please Note: Effective July 2008 the Inventory Tool for Dell Updates file (SMS2003ITDU_ENU.exe) has been pulled due to an issue that was causing installations to fail. An updated version of the tool will be post

sql query for top user of a computer

this pulls data from the v_gs_system_console_user table to determine who the top user is.  there’s a drawback to the asset intelligence method of gathering this information that’s presented in the v_gs_system_console_usage table in that if you have applications running as service accounts performing logins, they may show up as the top user. declare @machine nvarchar(50) set @machine = 'myComputerName' select top 1 sys.name0 as 'name' , usr.systemconsoleuser0 as 'user' , usr.numberofconsolelogons0 as '# logons' , usr.totaluserconsoleminutes0 as '# mins' from v_r_system sys inner join v_gs_system_console_user usr on sys.resourceid = usr.resourceid where sys.name0 like @machine order by usr.totaluserconsoleminutes0 desc   and something for fun, i gathered from this post .  if you want the second most active or top user, then you’d run the query like this:

cmd shell is not dead: redirection and conditional execution...

sometimes, going back to your roots can be the fastest way to get something done.  i visit so often when i'm looking for things related to batch that i feel like i should be donating to it.  it's the cat's meow. here's two links to things i use often when dealing with the cmd shell: redirection conditional execution this is one of the best gems of redirection that i love.  just using a redirect in a statement will only generate half of the expected output if the application truly writes to all of the available data streams.  that's when you do something like this which will output both stdout and stderr to the same file. command > file.txt 2>&1

system center capacity planner and jonathan hardwick

i had the pleasure of going up to redmond for a couple of a days when the capacity planner team had opened up invitations for mvps.  it was pretty fun.  i was there with a couple of exchange mvps and a room full of tap customers. it looks like the product has matured quite a bit from what i saw back then.  since we’re getting ready to plan for opsmgr, i thought it might be worthwhile to try it out.  anyway, jonathan made his announcement here which i seemed to have missed.  :)  oops. that’s okay though.  it looks like i’m finding it just in time for me since the opsmgr module was released not too long ago . 

monitoring dns [revisited] …

update: i revised this script to add the “debug” parameter because i was having some issues with it reporting inaccurately about looking up domains.  if you set this parameter to true, you’ll find a log called “dns_debug.log” in your %windir%\temp directory.  anyway, i finally got it all fixed.  i went ahead and updated this post along with the post date. you might recall a previous post about monitoring dns synthetically .  after much frustration with how poorly i wrote it the first time (lacking key things like sleep and retry attempts), i decided to update it a little bit to make it work better.  instead of the previous two parameters, you’ll now need four. HostNames – comma-delimited list of hosts to query (“,,”) or whatever… LogSuccessEvent –boolean value to log successes (very noisy) Repeat – how often to try before determining the query fails Sleep – interval between queries (in milliseconds) Debug – boolean value s

how to use sleep or wait in a simple command execution

well, the obvious is to use “sleep.exe”. what if you don’t have it available? this is something i ran into today when i was on a server, needed to loop through a log and keep searching for a value… and didn’t want to sit around waiting. simply, this was the command i was trying to get to run: for /l %a in (1,1,5000) do find /i “failure” myLog.log & sleep 10 this didn’t work because sleep.exe wasn’t there. so, i did what any good internet citizen would do: google. i came up with this link: . it gives a couple of examples using choice and ping. since choice was available, i decided to try this. my constructed command became: for /l %a in (1,1,5000) do choice /t 10 /d y >nul & find /i “failure” myLog.log now i get a 10 second delay between each loop. :)

smug coming july 28th!

this is just an informal announcement to clear your plates july 28th.  we’ve scheduled the next smug.  here’s the line up so far: Powershell Tips and Tricks - Hal Rottenberg IMX Solution - iVision Vision Connectors for SCOM - (likely to be removed) InstallShield demonstration - Acresso Software SC Virtual Machine Manager v2 - ? i’ve moved the mailing list to yahoo groups.  unfortunately, that means you need to go register if you want to receive smug updates.  if you were a previous recipient of our update emails, you’ll be receiving an invitation to join.  for the rest of you, here’s how: subscribe: unsubscribe: lastly, we’ve moved our smug group page from to .  please update your bookmarks to our new page.  we’ll have more details and registration links posted on our homepage as soon as we get it. look forwa

process and memory monitoring in mom 2005 [revisited]…

awhile back, a long while back, as it turns out, i wrote a couple of scripts that you could inject as responses in mom 2005 to generate a list of top cpu or memory processes.  here are the links to the old posts, in case you’ve forgotten about it. mom: monitoring cpu spikes the right way mom: memory processes anyway, i realized today while daydreaming in between meetings and outage summaries, that i could write the information directly to the alert stream.  it’s so simple i could kick myself. all i needed was one additional line.  now look at this… this is the old way i did it. sMessage = "The processes using greater than " & Z & "k of memory are:" & VbCrLf & VbCrLf For i = 0 To x - 1 If aProcess(0,i) > z Then sMessage = sMessage & aProcess(1,i) & " : " & aProcess(0,i) & VbCrLf End If Next sMessage = sMessage & VbCrLf & "(There are " & x & " pr

what makes a sysadmin? (a response to call out)

i hope this ends up being a terse response to hal’s call out .  you should have seen his original “bio”.  wow.   how old were you when you started using computers? i don’t remember.  i was just a kid.  it was sometime after the commodore vic-20 was released because i was insanely jealous of my neighbor.  i ended up getting a commodore 64 not long after that.  i guess whatever time frame that is… what was your first machine? read above.  the commode-door 64.  my sister ruined it with kool-aid and markers.  ended up with a commode-door 128, master-flush cover edition. what was the first real script you wrote? i didn’t write any of my own.  my parents had no interest in getting me any programming books so i wrote all the examples in the crappy manual that came with the c64.  i don’t even remember what they did. what scripting languages have you used? batch, vbscript, and breaking into powershell. what was your first professional sysadmin gig? i han