• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2033
  • Last Modified:

How to find load for specific Citrix servers

Is there any command available to calculate the load of specific Citrix servers out of multiple servers?

For example, we have following XenApp servers in our farm-

XEN-1
XEN-2
XEN-3
XEN-4
XEN-5

I want to use QFARM /LOAD command to check the load of following servers-

XEN-1
XEN-3
XEN-4

I can check the load of a single server with QFARM /LOAD XEN-1 command, but I am unable to do so for multiple servers.

Please note that I don't want to use PowerShell to do so. If any batch file or command available please let me know.

Thanks for your help in advance.
0
hchabria
Asked:
hchabria
  • 2
  • 2
1 Solution
 
Sekar ChinnakannuSenior EngineerCommented:
for specific server qfarm /load servername
also check this different commands for qfarm http://support.citrix.com/proddocs/topic/xenapp65-admin/ps-commands-query-farm-v2.html
0
 
oBdACommented:
A simple "qfarm /load" will display the load for all servers in the farm.
You can then filter that output with findstr:
qfarm /load | findstr "XEN-1 XEN-3 XEN-4"

Open in new window

Or you can embed the qfarm command in a for loop:
for %a in (XEN-1 XEN-3 XEN-4) do @qfarm /load %a

Open in new window

To use that in a batch script, use double percent signs for the loop variable:
for %%a in (XEN-1 XEN-3 XEN-4) do @qfarm /load %%a

Open in new window

0
 
hchabriaAuthor Commented:
Excellent oBdA! That is exactly what I wanted.  The output of "qfarm /load | findstr "XEN-1 XEN-3 XEN-4" is what I looking for. Thank you so much.

Is it possible to get this same type of output using a batch file?
0
 
oBdACommented:
Just take the line as it is and put it into a batch file. Well, nearly as it is, as I just noticed something missing, sorry: add a "/i" to the findstr command, so that it ignores the case and will show you results for xen-1 as well.
qfarm.exe /load | findstr.exe /i "XEN-1 XEN-3 XEN-4"

Open in new window

If you want to pass the servers as arguments instead of hardcoding them, you can use
@echo off
qfarm.exe /load | findstr.exe /i "%*"

Open in new window

and then run that like Whatever.cmd XEN-1 XEN-3 XEN-4
0
 
hchabriaAuthor Commented:
Awesome! Thank you so much for the quick resolution.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now