- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Forum
- :
- Re: How to check for more than one feature using lmstat in lmtools?
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
We want to use "lmutil.exe lmstat -f X" to report features in use to a Powershell script.
This works for one instance of X, but we want to check for 4 different features (X, Y, Z, Q).
Is there a syntax that allows us to do this, or do we need to run lmutil 4 times, ie once for each feature went want to check?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Here is some powershell to accomplish that functionality:
foreach ($feature in $M3i, $M3a, $M2p, $M2l) {
&$Cmd lmstat -c 28000@our_server -f $feature
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
That is not an answer to what I was asking.
My notififications said that there was two replies to this topic, but I'm only seeing one (the unhelpful one).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
This is the script I'm working on:
$Cmd = "X:\path_to_lmtools\lmutil.exe"
$Arg = "lmstat -c 28000@our_server -f"
$Arg = $Arg.Split(" ")# NX93300: = Mach 3 Industrial Design
# NX93110: = Mach 3 Additive
# NX92100: = Mach 2 Product Design
# NX12100N: = Mach 2 Legacy
$M3i = "NX93300"
$M3a = "NX93110"
$M2p = "NX92100"
$M2l = "NX12100N"$Arg1 = $Arg += $M3i
& "$Cmd" $Arg1$Arg2 = $Arg += $M3a
& "$Cmd" $Arg2$Arg3 = $Arg += $M2p
& "$Cmd" $Arg3$Arg4 = $Arg += $M2l
& "$Cmd" $Arg4
The problem is that I get a result only the first time I query lmtools in this script. The other three times I only get the default help text.
I can comment out each query, and it works separately, but apparently lmtools has some built in throttling of queries?
So, before I put in a delay and make everyone using this script annoyed, is there really no way to check for multiple features in one go?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
`lmstat -c 28000@server -a`
will give you all of the features at once.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Here is some powershell to accomplish that functionality:
foreach ($feature in $M3i, $M3a, $M2p, $M2l) {
&$Cmd lmstat -c 28000@our_server -f $feature
}
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks, so in other words, each user running this script will query the server 4 times.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
That is correct. My other reply has the lmutil command for a single call. You can use powershell to parse that for the individual features.
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)