Page 1 sur 1

Domino 32/64 bits

MessagePublié: 03 Oct 2013 à 09:02
par Michael DELIQUE
Bonjour

je cherche un moyen de déterminer si mon serveur est en 32 ou 64 bits

Re: Domino 32/64 bits

MessagePublié: 04 Oct 2013 à 22:25
par Jérôme Deniau
Ben sous windaube tu attaques le registre!
Sinon tu attaques une fonction 64 bits si le retour est ok tu es en 64 sinon en 32

Comme y'a domino 64 et 32 sous Linux même combat!

Re: Domino 32/64 bits

MessagePublié: 04 Oct 2013 à 22:28
par Michael DELIQUE
tu aurais un example de fonction ?

Re: Domino 32/64 bits

MessagePublié: 08 Oct 2013 à 00:51
par Jérôme Deniau
Ben tu peux faire simple:
sendconsole command("sh server")
ou "show stat Server.Version.Architecture" ->
Server.Version.Architecture = 64 Bit
1 statistics found

sous domino et traveler: NTS_64_BITS= false ou true (notes.ini)

Si sametime forcément 32 bits (chercher staddin dans servertasks)

Si quickr: forcément 32 bits

Re: Domino 32/64 bits

MessagePublié: 08 Oct 2013 à 09:49
par Michael DELIQUE
Super, Merci.

ça me donne ces fonctions

Code : Tout sélectionner
Public Function ServerVersionArchitecture(wServer As String) As Integer
   
   Dim Retour  As String
   Dim nmServer As NotesName
   Dim Array (0 To 2) As String
   
   On Error GoTo CatchError

   ServerVersionArchitecture = 0
   
   If Session Is Nothing Or DB Is Nothing Then
      Set Session = New NotesSession
      Set DB = Session.Currentdatabase
   End If
   
   If Trim(wServer) = "" Then
      Set nmServer = New NotesName(DB.Server)
   Else
      Set nmServer = New NotesName(Trim(wServer))
   End If
   
   Retour = Session.Sendconsolecommand(nmServer.Abbreviated, {show stat Server.Version.Architecture})
   
   If Trim(Retour) <> "" Then
      Array(0) = Chr(9)
      Array(1) = Chr(10)
      Array(2) = Chr(13)
      Retour = UCase(Replace(Retour,Array,""))
      Erase Array
      If InStr(Retour,"SERVER.VERSION.ARCHITECTURE")> 0 Then
         If InStr(Retour,"BIT") > 0 Then
            Retour = Trim(StrRight(Trim(StrLeft(Retour,"BIT")),"="))
            If IsNumeric(Retour) = True Then
               ServerVersionArchitecture = CInt(Retour)
            End If            
         End If
      End If
      Retour = ""
   End If

   Exit Function
CatchError:
   MsgBox "("+Cstr(GetThreadInfo (1))+" Call by "+Cstr(GetThreadInfo(10))+")"+Chr(10)+"Error " + CStr(Err) + " : "+Chr(10) + CStr(Error)+". "+Chr(10)+"Line # "+Cstr(Erl),16," ERROR !"   
   ServerVersionArchitecture = 0
   Exit Function
End Function

Public Function ServerShow(wServer As String, wnbTagName As Boolean) As Variant
   Dim Retour  As String
   Dim nmServer As NotesName
   Dim Array (0 To 2) As String
   Dim vrValue As Variant
   Dim i As Integer
   Dim lstRetour List As String
   
   On Error GoTo CatchError

   ServerShow = Null
   
   If Session Is Nothing Or DB Is Nothing Then
      Set Session = New NotesSession
      Set DB = Session.Currentdatabase
   End If
   
   If Trim(wServer) = "" Then
      Set nmServer = New NotesName(DB.Server)
   Else
      Set nmServer = New NotesName(Trim(wServer))
   End If
   
   Retour = Session.Sendconsolecommand(nmServer.Abbreviated, {Show Server})
   If Trim(Retour) <> "" Then
      
      vrValue = Split(Retour,Chr(10))      
      Retour = ""
      Array(0) = Chr(9)
      Array(1) = Chr(10)
      Array(2) = Chr(13)      
      i=0
      ForAll Value In vrValue
         Value = Trim(Replace(CStr(Value),Array,""))
         If Trim(CStr(Value)) <> "" Then
            If wnbTagName = False Then
               lstRetour(i) = Trim(Replace(CStr(Value),Array,""))
               i=i+1
            Else
               If i = 0 Then                  
                  lstRetour("RELEASE") = Trim(CStr(Value))
               Else
                  lstRetour(UCase(Trim(CStr(StrLeft(Value,":"))))) =Trim(CStr(StrRight(Value,":")))
               End If               
               i=i+1
            End If
         End If
      End ForAll
      
      vrValue = Null
      ServerShow = lstRetour      
      Erase lstRetour      
   End If

   Exit Function
CatchError:
   MsgBox "("+Cstr(GetThreadInfo (1))+" Call by "+Cstr(GetThreadInfo(10))+")"+Chr(10)+"Error " + CStr(Err) + " : "+Chr(10) + CStr(Error)+". "+Chr(10)+"Line # "+Cstr(Erl),16," ERROR !"
   Erase lstRetour
   ServerShow = Null
   Exit Function
End Function