Showing posts with label Citrix. Show all posts
Showing posts with label Citrix. Show all posts

Wednesday, 23 January 2013

XenApp qfarm commands

List server loads

Command qfarm /load

Server Name           Server Load
--------------------  ------------
XASRV1               0                   
XASRV2               1900                
XASRV3               2317                
XASRV4               0                   
XASRV5               2140                
XASRVA1              0                   
XASRVA2              1100                
XASRVT               100                 

Load ranges from 0 (no load) to 10000 (full load).  The load is configured by default to take into account the number of users on each server and assign a set "load" to each user.  This will evenly distribute users across the farm but does not take into account that perhaps users on one server are undertaking much more CPU intensive tasks than users on another server.  The load balancing settings can be found in the Citrix Delivery Services Console/App Ceneter (XA 6.0/6.5 respectively) XenApp>XenApp Farm > load Evaluators.

At my company I have setup the load to be evaluated by instead taking into account the CPU Utilisation and RAM usage and actually ignore the number of users on the server as a factor to calculating which server a user should be pointed to when logging onto the farm.  I have also set the "Impact of logons on load" to high, meaning that when a user logs on I want that to make a significant impact on the load value assigned to that server.  This will help prevent several users all logging onto the same server at the same time and thus causing it to slow down while it processes all of those logons.

Server Load Error Codes

In some cases the server load when queried using the qfarm /load command will be an error code (any value above 10000 is an error)

  • qfarm /load = 10000 100% Full load on the server
  • qfarm /load = 20000 XenApp is configured to an incorrect server edition or the license server is unavailable
  • qfarm /load = 99990 You do not have rights to run qfarm commands!
  • qfarm /load = 99999 There is no load evaluator is configured.

View status of servers

Command qfarm /online

Server Name          Zone Name               LBOff
-------------------- ---------------------- -------
XASRV1              192.168.102.0        D   
XASRV2              192.168.102.0            
XASRV3              192.168.102.0            
XASRV4              192.168.102.0            
XASRV5              192.168102.0            
XASRVA1             192.168.102.0            
XASRVA2             192.168.102.0            
XASRVT              192.168.102.0                     

The qfarm /online command gives you a list of all servers that the farm believes are online.

You can see that there is a "D" next to XASRV1 - This is to indicate that it is the zone data collector for the 192.141.168.0.   If we have muliple zones e.g. servers in different geographic loacations they would be listed as well as long as they are part of the same farm and we would see more servers marked as Zone Data Collectors (each zone must have its own data collector).

Command qfarm /offline

Same as above but will list the servers that are known to be offline

Wednesday, 17 October 2012

Citrix XenApp 6.5 - Adding a shortcut to users local directory (not included in special folder redirection)

You want to give a user a convenient with a link to the users local client folder e.g. a C:\SpecialFolder folderwhich is used by an old application or a legacy proecure that users dont want to change :)

Wrong Solution 1 (only to be used as a one off)
Talk the user through browsing through the file system on their mapped client drive e.g. \\cleint\c$\SpecialFolder - however users will quickly get bored of that and wont want to do that if they regularly need access to files on their local documents folder.

Wrong Solution 2 (you could try this and see if you can find out why the shortcut breaks)
Another thing I then thought was well - now that I have browsed to that location - cant I just add it as a favorite and then the user just clicks the "SpecialFolder" item in theit favorite.  Yes this worked... but only until they logged off and back on again.  At which point the shotcut breaks and clicking on it produces an error - darn!

My Working Solution (use this)
On each of the XenApp severs there is a hidden folder (E:\Hidden) and within that there are symbolic links to the locations that are not covered by "Special Folder redirection", in the below example I create a symbolic link to the local workstation users directory for the current user - (script to create this hidden folder and symbolic links is avialable below) - this could by a symbolic link ton anywhere however!
Symbolic links to the users local machine profile UNC path in Citrix XenApp

Browse to this location and then select the appropriate LocalProfile link
This takes you to the root of the user profiles directory on the machine
You can then add this location to Favourites
This location can then easily be reached from the favorites menu in many open/save dialogues.

Script to create hidden folder with symbolic links to a client machines local users folder and a link to c:\SpecialFolder (copy and paste and save as .BAT) Note: Run as Administrator!
mkdir E:\Hidden attrib +s +h +r E:\Hidden 
mklink /D "E:\Hidden\LocalProfileXP" "\\client\c$\documents and settings\" 
mklink /D "E:\Hidden\LocalProfileWin7" "\\client\c$\users\" 
mklink /D "E:\Hidden\C-SpecialFolder" ""\\client\c$\SpecialFolder"
pause