Does anyone know how to setup a program document to run the “Show Stat Server.ExpansionFactor” command?
I wish to update/cahnge our SAI’s on 3 cluster members (using Server_TranInfo_range setting for ini file) and want to get as much data as possible for this figure, so am planning on running this command ever 10-15 mins on each server for a day or two during core busy hours.
I am unsure exactly what to populate the “Program Name” & “Command Line” fields in the document.
I have tried a few variations, but none seem to work.
Any advice would be appreciated.
Subject: Run program document on schedule to grab expansion factor
You could make an scheduled LotusScript agent:
Sub Initialize
Dim session As New NotesSession
session.SendConsoleCommand "","Show Stat Server.ExpansionFactor"
End Sub
or, if you prefer using program documents:
make a program document with the following content:
Program Name: concmd
Command Line: “YourServerName” “Show Stat Server.ExpansionFactor”
Server to run on: YourServerName
and download concmd.exe from http://siipi.com/support/siipi.nsf/pages/BDA72E04E4B2C6C3C225704800687573?OpenDocument
and copy it to your server’s program directory.
Subject: RE: Run program document on schedule to grab expansion factor
Thanks for that. I tried the agent menthod and it produced an error on the console “Restricted operation on server”. So I then tried the prog doc method using the concmd.exe and it seemed to issue the command but produced this on console: (Marge is the name of our server, and margeadm is the user profile signed onto windows for this server.)
[1230:0066-0930] 08/03/2007 15:40:18 Running Program document for ‘concmd “marge” “show stat server.expansionfactor”’
show stat server.expansionfactor >C:\DOCUME~1\margeadm\LOCALS~1\Temp\rem14614.con
The file names number changes each time cmd is issued, but then I opened this folder and there is no such file?
I made the assumption that the results of the command issued would appear on the console? Is this what is supposed to happen?
Subject: RE: Run program document on schedule to grab expansion factor
Regarding the Agent method: You need to set security level 2 (Allow Restricted agents) in the Agent’s security tab.
Regarding both methods: Check out the server’s log.nsf, it will have the detailed command and result there. The “.con” file is just an internal temp file of domino which domino uses to gather the result text into the log.nsf.
Subject: RE: Run program document on schedule to grab expansion factor
Thanks… I changed teh agent properties to run restricted and now the agent displays the same results as the program document.
I also checked the log (not sure why I didn’t think of that!) however it does not show any results in the log either.
Subject: RE: Run program document on schedule to grab expansion factor
In responce to the original question:
Program name = nserver
Command = -c “Show Stat Server.ExpansionFactor”
Subject: RE: Run program document on schedule to grab expansion factor
The entries will come with a little delay in the log.nsf (remember to press F9 also). A domino server with no configuration document (=default settings), will show the entries in the log.nsf, make sure you don’t have any configuration settings which prevent displaying server console commands.
Subject: RE: Run program document on schedule to grab expansion factor
Sorry for the delay in repling, I have been unable to sign into Notes.net for a few days… kept looping when did a “sign In”!!!
I got round this problem by running a scheduled agent every 15 mins and then I write out the result on the console for the expansion factor, to a csv file on a network drive, along with the date and time and server.
I now have a few days worth of expansion factor results for all my servers, and I have now just disabled the agents so they can be used again in the future.
NB: anyone wishing to do this can use the code below in a scheduled agent, however please bare in mind that your domino server will need to have access to write files to your network for it to work.
Sub Initialize
'This was a temp agent to test sending console commands.....
Dim session As New NotesSession
'*******************************
'Set the server name here and also in the pathname section of code below.
'*******************************
theresult = session.SendConsoleCommand ("Marge","Show Stat Server.ExpansionFactor")
newresult = Strrightback( theresult, "= " )
ResultAsNumber = Strleftback( newresult, "1 statistics found" )
GetNumberOnly = Fulltrim(ResultAsNumber)
JustNumber = Strleftback( GetNumberOnly, Chr(13))
'Get Date & Time
Dim TheDateTime As New NotesDateTime(Now)
TheDate = TheDateTime.DateOnly
TheTime = TheDateTime.TimeOnly
Dim stream As NotesStream
Dim pathname As String
'Set the server name here too, aswell as above.
pathname = ""\\**YourNetworkServer**\**Foldername**\**FileName**.csv"
Set stream = session.CreateStream
If Not stream.Open(pathname, "ASCII") Then
' Messagebox pathname,, "Open failed"
End If
'Write out record to my folder of j drive and append line ready for the next one!!
Call stream.WriteText(Cstr(TheDate) & ";" & Cstr(TheTime) & ";" & JustNumber, EOL_CRLF)
Call stream.Close
Exiting:
Exit Sub
Handler:
Call ReportErrorToAdmin(Error$)
Goto Exiting
End Sub
Subject: RE: Run program document on schedule to grab expansion factor
Hi,
Why not parse the starep.nsf database?
There is a field called Server.AvailabilityIndex.
JYR
Subject: Run program document on schedule to grab expansion factor
You should use Perfmon - the Lotus Notes object has Server.ExpansionFactor.
Subject: RE: Run program document on schedule to grab expansion factor
Thanks for your reply, I have tried this with “Perfmon” in the program name field and “Show Stat Server.ExpansionFactor” however this appears on the console, as “running program document…etc etc” but then nothing else. The actual result of the expansion factor does not appear after this nor do any errors?
Am I putting the correct data in these prog doc fields?
Subject: RE: Run program document on schedule to grab expansion factor
I don’t mean that you should use perfom in a program document.
I mean that you should use windows performance monitor (perfmon)