Thursday, December 13, 2007

Edgesight for Loadtesting Semi-Free!

Here's some news. Load testing on Citrix is still a pain in the ass.

Citrix is attempting to round out that chasm of product functionality with a new product called "Edgesight for Load Testing". Actually to say that it's a new product is a fat lie. Like many other products (Edgesight included) Citrix just bought up a company and slapped their logo on their product. So in addition to the name being completely lame, it's also incorrect. This product is in no way related to Edgesight. No doubt future integration is planned, but for now it has about as much to do with Edgesight as notepad does.

According to the press release found here:
"Citrix EdgeSight for Loading Testing 2.5 will be available on June 25, 2007, and suggested retail pricing starts at $7,500. Citrix EdgeSight for NetScaler is available as part of the Citrix NetScaler 8.0 Platinum Edition."

In other words, this shit ain't cheap.

Unless of course you found some way to get a license for some kind of discount.

Recently I took a class on Edgesight 4.5, specifically CTX-1800AI. It's a moderately interesting course, but the cool part is that you get a demo license for Edgesight for Load Testing. So what? Well.. the "demo" license you get is good for 2 years! 2 friggin years! What the hell were these guys thinking?

So why pay 7500 for a product when you can get the same product for around 1200 and some change? Just take the course and conduct a very extensive demo of the product. I think most people would agree that two years is adequate to make a determination as to whether or not you actually want to go forward and pay the full licensing cost.

-CG

Wednesday, October 31, 2007

Edgesight Licensing Hole

Edgesight is a cool product. There's no doubt about it. But why pay for it if you don't have to?

A little history is probably in order..

Edgesight was actually developed by another company called Reflectant. Citrix bought Reflectant as a means to round out their suite of products. Let's face it, Resource Manager is about as useful as loose bowels. Oh sure, it was probably grand back in the days, but it's a dinosaur by modern standards. Hence the need for Citrix to find something to monitor their stuff.

A little known fact is that shortly after acquiring Reflectant, Citrix promptly told most of the other competing vendors (EG Innovations, etc) to go fuck themselves. Citrix is no longer including these vendors in the development process of the Metaframe product suite. Downright bastardly if you ask me, but many of us have seen the big red dot toss its weight around before for no other apparent reason than just to be catty. They refunded their iForum exhibition fees and did a tremendous job in showing their ass.

So anyways, after Citrix purchased reflectant they were in a rush to re-brand the product and get it out there. As is often the case, certain compromises were made with the product conversion for the sake of some deadline. Long story short is that the licensing in 4.0 and 4.2 is not perfect.

It's so imperfect in fact that it is not enforced by the product. Edgesight is licensed by concurrent connection in the same fashion that MPS is. What is supposed to happen is that the product gathers data on the number of users that you are licensed for and then stops once it hits the ceiling. With version 4.0 and 4.2 this doesn't happen. You could be licensed for 10 users and collect data on 10,000. Pretty sweet.

This little bug is fixed in 4.5, which may explain why Citrix is pushing folks so hard to upgrade even though the improvements are somewhat minor in the newer version.

Sometimes the latest and greatest turns out not to be.

-CG

Wednesday, October 17, 2007

Free TS CALs Forever!

I've given you a way to get around the Citrix licensing. It's only fair that I illustrate how to give the finger to Microsoft as well.

You'll note from my last entry, that I'm a little pissed at old Billy Gates. So I got to thinking.. As a Citrix engineer, how can I screw Microsoft? Of course the answer is licensing - the same way MS screws us. It's kinda poetic when you think about it.

There's potentially two ways to do this. Both of them are illegal, so you're on your own if you get caught.

User Mode licensing - TS User licensing with Win2003 is something that most Citrix Engineers don't mess with much. The idea is that you set up user level licensing and then you pay for each user who would be accessing a terminal server in your environment. In reality, it works much differently.

You see user level TS licensing is a new feature with Win2k3 server. Unfortunately, it's half baked. If you log on to a terminal server that's running in user licensing mode, it checks to see if there is a TS Licensing server on the network. That's it. If it finds a license server you're in. Money in the bank. So you can have a TS License server set up with only 1 CAL installed, and thousands of users would still be able to connect as long as your Terminal Servers are using user licensing. Nice huh?

Now if you opt to stay with device cals (the older win2k model that most of us are probably familiar with) the solution is a bit more extensive, but is still within reach.

The device CAL is stored on each workstation in the following registry location
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSLicensing\Store\

If the device tries to connect and doesn't have an entry there, a CAL is issued.. or if no CALs are available - a *temporary* CAL is issued. The temporary CALs expire in 120 days, which is plenty of time to get your users working. The problem of course is that after 120 days they get an error if there are no legitimate device CALs available.

So the way to get around that is to have a TS Licensing server that has a few device CALs installed, but all of them being in use. In this scenario, workstations that connect without a CAL are issued a temporary one. If the temporary CAL is deleted before it expires, it will get another temporary CAL, and so on.

It's the "and so on.." part that we're most concerned with. If you keep deleting the temporary CAL at login, they get a new one the next time they connect. This can be done over and over.

So a simple line or two in the login script to delete the license store (the registry key above) when users logon is enough to keep your entire enterprise running on temporary CALs.

Now go get busy,
-CG

TS License Server and the Chamber of Secrets

So here's the scoop. We're retiring our main TS Licensing server and replacing it with a new box. Sounds simple yes? Yeah not so much.

The basic process is this you get on the phone with the MS Licensing Clearinghouse, which is a boiler room operation somewhere overseas, give them a bunch of numbers, and if the stars line up just right, then they give you a bunch of licenses to install.

So after the myriad of mindless voice prompts:
"Please say the operating system you're caling about"

"Windows 2003"

"It sounded like you said Windows XP. Is this correct?"

"No."
"I'm sorry, please say the name of the operating .."

"Windows 2003"

"It sounded like you said Windows 2003. Is that correct?"

"Yes. Damn this is a pain"

"Are you calling about licensing for terminal server, licensing for.."

"Yes. Terminal Server"

"I'm sorry. Please say your selection again.."

"Terminal server. Terminal Server! Terminal-fucking-server. What the mickey mouse fuck is your problem? None of your other products even sound remotely like the words 'terminal server'. You blind horse fucking toaster.."

"Transferring you to an operator"

"Mother Fucker!"

---Operator picks up---

[in a very thick indian accent] "Halo and tank you fah callind microsoft lichsing. My name is Bill. How can I assist you today?"

"Your name isn't Bill is it?"

"My name is Bill, yes"

"Seriously, what's your name"

[quietly] "It is.. uh.. Prasheid"

"Uh huh.. you guys in Redmond?"

"Redmond?"

"Nevermind."

"Look I need 90 thousand TS device CALs."

"What?" [Noises of the guy shitting a golden and curry scented brick can be faintly heard in the background]

"TS CALs - 90 thousand of em"

"90?"

"Ninety .. Nine.. zero.. thousand. Nine.. Zero.. Zero..Zero.. Zero."

"Hold on"

[Shitty hold music ensues]

"Sir I can't give you that many licenses."

"Our SA agreement should cover that amount.. what's the problem?"

"I'm not allowed to give you 90 thousand licenses"

"But we paid for that many. How am I supposed to get them?"

"You need to call back."

"What?"

"I can only grant 9999 per call"

"So I have to call back 9 more times to get the licenses that we paid for?"

"Yes sir"

"That's bullshit."

"I'm sorry?"

"Nevermind.. alright then.. so let go ahead with it.

"Okay sir.."

"Buttfucker"
----------------------


F-ing rediculous.

Friday, May 11, 2007

Make Your Own Citrix CALs!

It's all about design.

The licensing model has been vastly improved since the days of XP. It's easier and more secure to manage your Citrix licenses. In fact, there used to be a cool utility called TFLKey.exe that would puke up Citrix licenses all day long, including licenses for unlimited servers and connections. You could even activate your existing cals with it.

Of course, using such a utility violates the license agreement (which I guess you wouldn't really need if you had the tool) and may get you thrown in Jail - which is bad because being Bubba's bitch is never fun.

But if it's an architectural design flaw that is a security hole - and you happen to build your environment in such a way that exposes it.. is it still illegal? You're not exploiting or in violation of licensing - and all your servers are working normally. Or are you just leveraging an aspect of the product's design in an unconventional way? Hmm.

Consider the following:

Let's say your environment consists of:
-10 MPS4 servers
-1 Citrix License Server with 100 CALs installed
-1000 users

In this scenario, we're going to potentially consume 100 Citrix CALs, but we're going to get our 1000 concurrent users up and running.

How the hell do we do that? We're simply going to leverage the 30 day Citrix Licensing grace period. You see, each of those 10 MPS servers keeps its own running tally of how many CALs are available. So with the license server up and running you have a max concurrency of 100 users.

Here's where it gets fun.

Kick off all your users and wait a few minutes. At some point, each server will recognize that there are 100 CALs available.

Shut down your license server.

Now you have entered the 30 day grace period where each server thinks that there are 100 licenses available. And since there's no license server to update as users logon and logoff, each server now has the capability to issue 100 cals.

As long as that license server stays offline (for up to 30 days), you can host all of those 1000 users using only 100 CALs.

Obviously the way around this is to bring it back up every 29 days when no users are online for a little while. Once you verify in the event logs on each server that the grace period has been reset you can take it down again, and drive on for another 29 days.

You've just saved your company 315,000 dollars (assuming 350 bucks per CAL).

Is this legal? I honestly don't know.. I think it might be a gray area that could be argued either way. Chances are that Citrix can pay for better lawyers than you or I, so I don't suggest doing something like this.

Is it ethical? No, but all that aside, from a technical perspective it is a pretty cool hack.

-CG

Thursday, May 10, 2007

Tuesday, May 8, 2007

USB Gets Silly

It was bound to happen sooner or later.

Someone has written a worm that leverages USB drives as a means of propagation. I'm surprised that it took this long.

Think about it. What are thumbdrives used for? I plug it into my computer, copy a file or two, and then you take it and copy the file to your machine. You might as well be having unprotected sex, except with a bunch of little ones and zeros.

Here's the skinny from Sophos. Ha get it? Worm.. skinny? Ha! Nevermind.

------------------------------------------

Security researchers at Sophos are warning of a new Trojan worm virus that is being spread via infected USB device.

According to the security software maker, the W32/SillyFD-AA program, or Silly worm, automatically spreads itself to any USB storage device connected to a PC it has infected, and then passes itself along to any subsequent machines to which the removable thumb drive is inserted.

Once loaded onto a computer, the worm creates a hidden file labeled as "autorun.inf" from which it continues to propagate itself. Among the only discernable affects of the attack is that it changes the title of users' Internet Explorer browsers to read: Hacked by 1BYTE.

The same type of attack could be used to spread far more malicious programs such as spyware or rootkits.
Such attempts to infect via physical interface could become increasingly popular. According to a recent report published by Centennial Software, removable storage drives have actually become the leading cause of security concern for IT administrators, based on a survey the company conducted at a European conference.

------------------------------------------

Personally, if I were a l33t hax0r filled with all that post pubescent angst trying to stick it to the man, fuck the system, and all that - I would be kinda pissed that my worm got named Silly.

-CG

Monday, May 7, 2007

Code Monkey

For all you dev heads out there. This bud's for you.

Tuesday, May 1, 2007

Citrix Cutting Edge Update Notifications

One of the great features about the Citrix support website is the ability to subscribe to sections so that you get email notifications when things are added or updated. Of course I subscribe to several sections in the interest of keeping myself in the know and having something to blab about on this site.

I received the following email from this system today which demonstrates the effectiveness of this tool.

---------------------------------------------
You asked to be notified if there were any updates to the document type "Tool " in the Citrix Knowledge Base. The following entry was added or updated on Oct 26, 2006 3:17:38 PM:
ProcessHistory v1.1 for 32-bit and 64-bit platforms
To view this entry, please visit:
http://support.citrix.com/kb/entry.jspa?entryID=11487&categoryID=686

If you wish to remove this watch, visit:
http://support.citrix.com/kb/accountEditWatches!default.jspa
Citrix Technical Support

----------------------------------------------

See what I mean? Cutting edge.. give or take 6 months or so. I expect my updated Winframe 1.7 admin guide any day now.

-CG

Edgesight ADM

Yes, it's been a while since the last post. Sorry. Have you looked outside lately? The sun is out. I have a life. That means the give-a-shit quotent regarding things in the office takes a sharp decline. Since I pilfer work hours to update this blog, citrixguy.net falls within the scope of that phenominon.

Anyways, I came up with a basic ADM Template that I thought might be useful for some of you wokies that play with Edgesight. It allows you to set some fundamental settings that make managing your deployment a little less painful. Like most of these things, it's not as pretty as it could be (see also: give-a-shit quotent above), but it gets the job done and gives you something to play with.

There's five parameters I'm setting with this:
- the edgesight app server name
- the app server path
- the app server port
- The Department Name
- The Company Name

If you don't know how to make this work as a GPO, take your hands off the keyboard immediately and go fling yourself in front of the nearest bus. I hate to be the one to break it to you, but you are a pus-filled boil on the ass of the IT industry.

All you not so dumb people, please enjoy with my compliments.

-CG

--------------------------------------------------

CLASS MACHINE

CATEGORY "Edgesight Server Configuration"

POLICY "Server Port"

#if VERSION >= 3 EXPLAIN "This policy defines the port on which the Edgesight web server is running. The default is 80" #endif

KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\4.00\NetAccess\"

PART "Server Port" EDITTEXT VALUENAME "ServerPort" DEFAULT "80" #if VERSION >= 2 EXPANDABLETEXT #endif END PART

END POLICY ; Server Port

POLICY "Server Path"

KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\4.00\NetAccess\"

PART "ServerPath" EDITTEXT KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\4.00\NetAccess\" VALUENAME "ServerPath" END PART

END POLICY ; Server Path

POLICY "ServerName"

#if VERSION >= 3 EXPLAIN "This defines the name of the Edgesight server. The default is EATABAGOFDICKS" #endif

KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\4.00\NetAccess"

PART "ServerName" EDITTEXT VALUENAME "ServerName" DEFAULT "ENTER YOUR STUPID SERVER NAME HERE" END PART

END POLICY ; ServerName

POLICY "Department"

#if VERSION >= 3 EXPLAIN "This defines the Department name which usually corresponds to the partinular Farm." #endif

KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\"

PART "Department" EDITTEXT VALUENAME "Department" DEFAULT "ENTER YOUR DEPARTMENT" END PART

END POLICY ; Department

POLICY "Company"

KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\"

PART "Company" EDITTEXT KEYNAME "SOFTWARE\Citrix\System Monitoring\Agent\EdgeSight\" VALUENAME "Company" DEFAULT "ENTER YOUR COMPANY NAME" #if VERSION >= 2 EXPANDABLETEXT #endif END PART

END POLICY ; Company

END CATEGORY ; Edgesight Server Configuration

[STRINGS]

Friday, March 9, 2007

The PDF From Hell!!

We've all had those days. We've all reached that point. Something is broken.

Everyone, their brother, and some dude name Cletis is on a conference call. It's chaos. Citrix is Down! People are eating each other alive and flinging small children out of windows. And one more MBA-sucking assclown manager wanting a status decides to ask you for an update on the crisis de jour .

"Well Frank, It's just about the same as it was 2 minutes ago the last time you asked me."

But this time the blackberry toting walrus has done it. That's it. You can't take it anymore. It's done. You f-ing quit!

.....

But wouldn't it be icing on the cake if you could really show them all just how far down the crapper they're going to be without your able hands on deck? Of course, I'm not talking about corporate espionage or anything of the sort, rather just illustrating the cumulative impact of very inefficient computing.

Enter the PDF from Hell.

Consider the following stats: (from loginconsultants.com)
  • Memory a couple of seconds after opening the doc: 80MB
  • Memory after browsing extensively: 150MB
  • Memory after printing : 216 MB
  • CPU 100% for a couple of seconds while browsing to the next page.
  • Starting a Printjob: 100% CPU for about 2 minutes
  • Printjob spoolfile size: a whopping 741MB!
Chances are that if your company is using thin computing one of the apps they're delivering is email. Get it? Imagine sending this little puppy to several thousand email users at once. If you figure about oh I dunno ~50 or so users per server the impact is immediate and ugly. In other words..tell those servers to bend over and kiss their dual core asses goodbye.

Of course, this type of thing is very useful when load testing and capacity planning too.

Play nice kiddies.

-CG

Tuesday, March 6, 2007

Deliver this.

Is it me, or this just disturbing?

Look, I get the whole podcast thing. I have a number of audio books that I follow via podcast. Really, I'm one pod-happy dude.

But please, we buy your stuff already. We spend thousands on licensing, training, and getting hammered at iForum. We've built our careers on your technology. Leave it at that and save the propaganda for the sales ferrets.

We're engineers, not corporate sluts.

-CG

New ICA Client Connection Tool

Released from Citrix today is the new version of the Client Connection Tool. You old school peeps no doubt remember the CSTK, which was a pretty decent hack for down and dirty load testing. Well this is like that, but with a little crystal meth thrown for good measure.

In our environment, it's only slightly more pleasant than rectal surgery to get users and business units to actually perform valid load testing. They're like little three year olds - slobbering all over their power ties with thick spittle that smells slightly of the lunchable that they just polished off.

They want it now and don't care whether or not it works. That is, they don't care whether or not it works as long as it works. As soon as it breaks or starts to run slow, they're the quickest to start screaming like that guy in Deliverance.

While admittedly this little tool won't help you slash you users' tires or send them threatening emails from their manager's mailbox, it will make simple load testing a little easier. The main bells and whistles include: A well constructed PDF that explains how to use the tool, an account creation utility, the actual connection tool itself, and a couple runtime files.

I'd like to give Citrix props for having the foresight to bundle all this stuff together. It's refreshing to not have to ferret out all the various dependencies that are needed to get the thing going.

So anyways, there's three basic features you can leverage with this thing:
  1. Custom Application Creator - this is the equivalent of your standard Loadrunner load generator, but with down syndrome. It does all the fundamentals, but nothing terribly intelligent. Of course for me, this is perfect because I couldn't give two shits about how to write Loadrunner scripts.
  2. Customer Application Duplicator - this is cool because it lets you basically define a template ICA session and then spawn several inbred step children from it. It automatically plugs in different user names and such to streamline the process. Kudos.
  3. Application Test Set - If you're the die hard application set kinda person, this setting can run published apps from the app set. I don't know how useful this really is since everyone I know uses Web Interface or PNAgent, but there ya go.

It's not terribly robust, but it gets the job done.. oh and hey it's free. Definitely worth checking out.

-CG

Tuesday, February 27, 2007

ICA v10.0

As the dawn breaks anew over the thin computing landscape, Citrix admins awake with a tingle in their arms and legs. They know. Somehow they know. It's what sets them apart from your average server wonkie. They feel it.

A new ICA client has been released.

There's actually a couple new releases. There's one specifically for Vista, and then there's the one that most of us refer to as the Win32 client which should also work on Vista. There's also a new "streaming client" which is consistent with the new desktop application streaming product offering. Pretty cool stuff.

I'd love to give you more info on them, but as of this writing the admin guides have yet to be updated to reference the new version. Helloooo? Citrix?? Can you hear me?

So don't take my word for it. Be the envy of all your friends and neighbors; download the new ICA client today! You won't be sorry. (But if you are, that's too damn bad because there's no docs to help you in troubleshooting)

Happy clicking!

Monday, February 26, 2007

Customers to Dell: "Give us Linux, Dammit!"

Here's a fun story that my brother sent me this morning.

Apparently Dell opened a customer feedback site. Now while this is pretty astounding by itself, even more surprising is what the top 5 requests are.

1. Pre-install Linux
2. Pre-install Open Office
3. Native Linux Build - basically the same as #1
4. No extra software installed (I really hate that crap too)
5. Install Firefox as the default browser

I think it's coming down to this. I don't think people are sick of MS necessarily, but people are getting smarter and more tech savy. At the same time, Linux is now much more than a command line. It's robust, very flexible, and pretty easy to use. Add to that the fact that more and more companies are writing software to run on Linux and you've got good recipe for a supportable software platform.

As a result, people aren't as intimidated by it as they once were and are willing to explore it as an alternative to Windows. To that I say Fuck Yeah!

What does this mean to Citrix?

Disclaimer: I don't work for Citrix, so anything I say about them is pure speculation on my part and probably a lie. Do your own homework.

For a long time the Windows platform has been the bread and butter for Citrix both on the server and client side. Of course Citrix already has a Linux client, but if they want to keep their head in the game they need to start paying more attention to where this thing is headed. They need to start putting some resources into rounding out their product offerings to include better than average software on the Linux side of the house - especially on the server platform.

Ideally, you could run a mixed farm of Windows and Linux servers and access applications from most any OS though Web interface. You could be running Gimp and Paint from the same farm. We're talking sick integration here, people. Stuff that today would only be allowed in Massachusetts and California.

Will it happen? Who knows. Remember that Microsoft owns terminal server, and the two companies are in bed pretty closely. It would be interesting to see what kind of pressure Microsoft puts on Citrix if they were to start offering a Linux suite.

-CG

Wednesday, February 21, 2007

Dear Microsoft, Suck it.

In case you haven't heard, DST is the new Y2K. That is, the hysteria once owed to the Y2K bug is now circling around the Daylight Savings Time bug.

You see, this year our esteemed government has decided to change the daylight savings dates around a bit. Of course, the typical PC with the typical operating system wasn't invited to that meeting and knows nothing about that decision or the impending collapse of civilization that will come from it.

In a mad rush to save us all from the inadequacies of their own products, Microsoft has released some patches to head off this calamity at the last minute. Swell, right? They only knew about it since August 2005. It's not like we server wonkies have anything else to do, right?

Well, they're only releasing patches for the newer OS's. That's right. Bastards. Oh, because no one in their right mind would still be running Windows 2000, right? That is so, like, old and stuff.

Well, I have news for you Microsoft. Your track record of stable OS releases is less than stellar. Hence, many companies have taken the wait and see approach so that they don't have to devote copious resources to keeping their environments running. So even though they're not on the most fashionable release of Windows, their stuff works and they get to do a little business on the side to keep the lights on. The point is that there are alot of legacy servers out there that are humming right along.

But that's not okay by you is it? You can't get any license revenue if folks don't constantly have to upgrade their stuff. So instead you publish a knowledge base article that outlines the slew of registry updates that have to be made just to get your stuff to work like it's supposed to. (http://support.microsoft.com/kb/914387/en-us).

In a situation such as this, Microsoft should step up and own the fix for their products, legacy or no. It's naive to think that everyone has moved on to Windows 2003 when 2000 is still a viable solution for many companies. Based on the scripts for updating Win2k that are listed on the above site, it would take slightly more than a gorilla to compile those into an MSI or MSP.

I wish I could run a company where the business model was, "screw the customers". It would sure make things alot simpler around here.

Tuesday, February 13, 2007

Server Uptime Script

The thing that you have to understand about J & E (former coworkers) is that they can script a sunny day. Script demons these guys were. Me? Yeah, not so much.

So as you might imagine, I was actually quite pleased with myself when I wrote my first vb script to pull server uptime. Of course it shelled out to uptime.exe and was very basic in it's functionality. My gleee was short-lived as J was quick to inform me that only people without penises shell out to stand alone exe's to accomplish tasks.

Alas, with J & E gone it has fallen on me to script things as needed. This is pretty scary when you consider the size company I work for and my relative skill set when it comes to scripting. The flip side is that it's given me a chance to improve.. which is coolio. So today I crafted a script that is pretty handy for pulling server uptime.

It's still pretty basic, but is flexable enough to use logic against the uptime value. i.e. if a server has been up too long, reboot it. Is it the most efficient code? Oh Hell no. E would probably crap a brick if he ever comes across it. Instantiating objects over and over again was one of his pet peaves.

Still it works, and my shabby development skills definitely allow for you to improve it when you steal it for your own use and claim to your manager that you came up with the idea. Hey it's cool; I know how it works. There's one guy in the world who actually knows how to write code, and he posts to the internet. Everyone else downloads, plagurizes, and re-posts it somewhere else. It's the great circle of life.

So here ya go.

'
'Try this in Production first. Just for grins.
'// USAGE: cscript.exe uptime.vbs (duh)

option explicit
'//Declarations
Dim strComputer, thefarm, aServer, intsystemuptime, objWMIService, colOperatingSystems, objOS

'// Get the farm 411
Set theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")
theFarm.Initialize 1

'// If this doesn't work we're screwed so exit
if Err.Number <> 0 Then
WScript.Echo "Can't create MetaFrameFarm object"
WScript.Echo "(" & Err.Number & ") " & Err.Description
WScript.Echo ""
WScript.Quit Err.Number
End if

'// Loop through the server name
For each aServer in thefarm.servers

'// set the hostname based on where we are in the loop
strComputer = aServer.servername

'// Compensate for small penis and crappy coding
on error resume next

IF not strComputer = "" then
wscript.echo "Checking " & strcomputer
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

'// Will error if the server is offline. You might want to know about that.
if Err.Number <> 0 Then
WScript.Echo "Something is jacked up. "
WScript.Echo "(" & Err.Number & ") " & Err.Description
WScript.Echo ""
End If

Set colOperatingSystems = objWMIService.ExecQuery _
("Select * From Win32_PerfFormattedData_PerfOS_System")

'//Nested For loop to enumerate the objects in the collection, yo.

For Each objOS in colOperatingSystems

'\\Get the number of seconds and divide by 3600 to get hours
'\\set as an integer because decimals are for nerds!

intSystemUptime = Int(objOS.SystemUpTime / 3600)
Wscript.Echo strComputer & " has been up for " & intSystemUptime & " hours."
wscript.echo ""
Next
Set objWMIService = nothing
Set colOperatingSystems = nothing
End If
Next

Monday, February 12, 2007

Resource Manager Web Interface

It's no secret that the resource manager summary database, while robust and filled with wholesome goodness, can be a pain in the ass to deal with. It's gotten better with the introduction of report center in PS3 and PS4, but it's still pretty basic. On several occasions, I've asked Citrix about this, and the response has always been, "It's all there, just write a query."

Fair enough, but if you're like me you don't really have time to devote to doing sql and asp.net development just to provide some useful metrics to some assclown manager. Fortunately if your name happens to the Jason Conger, you're nothing like me. In fact, I would wager that you're a fair bit smarter because this is exactly what Jason has done.

Enter Web Interface for Resource Manager. Just like it sounds - it's an easy way to pull meaningful data from the RM Summary Database and display it in a simple graphical format. Wow. Truly a deeper shade of soul.

Just to be fair, one of the managers at Citrix did author a similar tool a couple years back that was asp based. It's good, but it's not on the level with Jason's. I think it can still be downloaded from the Citrix website if you want to compare.

J turned me on to his website at www.jasonconger.com. Kudos to JC for a job well done. He's got some other cool toys for you MFCom code junkies out there too.

Tuesday, February 6, 2007

I hate web applications.

The problem with publishing a browser in Citrix is that it becomes very difficult to control what the hell these tards that call themselves users are actually doing.

Case in point, we have a slew of applications on our intranet that are accessed via a central login provided by websphere. Hence to access any one of them, a user needs to log in to the main page first. So it's just about impossible to limit what these wankers can get to since they all have the same launch page to get there.

So as one might imagine we're having performance problems with a web app. Surprise! Of course as we all know, some crap application going bulimic on system resources is always a Citrix issue. Oh right, because the chance of some half-cocked web application having problems is far and remote! Never mind that it was written by some 2 dollar outsourced developer who could likely not even spell "Terminal Services" much less write anything to run on it.

Like any other homicidally frustrated system admin, we went back to the original business group who absolutely had to have the application published or the company would never make another dime and we calmly said to them, "Hey, your shit is broken."

Then we said it again.

...and again.

...and again.

(you get the idea)

Finally, I consider taking a hostage when I receive an email from one of these business whelks saying that they have no reason to believe that the application is causing performance issues.

AGGGH!! WHAT??

How about the edgesight reports (great product, btw), screenshots, perfmons, and RM reports we sent you? How about the 15 years of experience I bring to the table that might lead me to believe that perhaps I would be able to spot a problem application when it repeatedly projectile vomits all over my damn servers? How about because I friggin say so?

Sometimes it's not even worth bringing the KY.

-CG

Friday, February 2, 2007

The very first post!!

Hi Folks,

Citrix guy here. And yes, this is the first post. You found it. Lucky friggin you.

Normally, the first post is reserved for fruity little blitherings about who I am, what I do, things I like, and other little factoids to help you get to know me.

Well screw that. I don't really care if you know me, and honestly it's probably better that you don't. I'm kind of an ass hole sometimes.

So on to the Citrix stuff. It's been a week from hell. Our normally stable environment has been riddled with stability problems. All of which have landed squarely on my lap. There's nothing better than some tard of a manager on a crisis call trying to tell you how to do your job. Yes please yell at me some more and then ask me again if the server has been rebooted.

The diagnosis is easy enough. It's a ticketing black hole. The ZDC logs show that some LLS ticketing request crapped out. Then low and behold Web Interface requests start to queue up on the xml broker and pretty soon things start to break down into dung.

The problem is that I'm probably too dumb to figure out what is randomly causing my Metaframe servers to take a dump when trying to issue tickets. It's one of those things that is going to turn out to be exceedingly simple like setting the "GOCOMPLETELYTOSHIT" value to zero in the registry. Of course, I could call my friend J who would listen to the sound of the mouse click over the phone and determine that a .dll file was the wrong version on three of the servers, but that would be the easy way out.

J of course is smarter than me and no longer works for our company.