Features:
The top-level object of the Server UCX component.
Provides information about the server, such as name, description, and processor utilization.
Provides network and file I/O statistics.
Provides information about login status.
Acts as the entry point to other objects.
Returns a collection of client connections.
object.Clients
Connections.
Read-only.
See Sample in *****.
Returns or sets the date of the default file server.
object.Date[=DateValue As Date]
Date.
Read/write.
DateValue is an optional parameter that represents the date you want to set the default file server to.
See sample in Example.
Sets or returns the ServerInfo object that contains information about the company that distributed NetWare.
object.Description
ServerInfo.
Read-only.
See sample in Example.
Returns the statistics related to disk activity.
object.DiskStat
DiskStat.
Read-only.
See sample in Example.
Returns the statistics pertinent to the file system.
object.FATStat
FATStat.
Read-only.
See sample in Example.
Returns the file I/O-related statistics.
object.FileStat
FileStat.
Read-only.
See sample in Example.
Returns a collection of network boards on the server.
object.LanBoards
LanBoards.
Read-only.
See sample in Example.
Returns or sets the login status.
object.LoginStatus[=LoginValue As Boolean]
Boolean.
Read/write.
LoginValue is an optional parameter that enables (TRUE) or disables (FALSE) the login status.
See sample in Example.
Returns a collection of NLMs loaded on the server.
object.Modules
Modules.
Read-only.
See sample in Example.
Returns the name of the default file server.
object.Name
String.
Read-only.
See sample in Example.
Returns the network-related statistics.
object.NetStat
NetStat.
Read-only.
See sample in Example.
Returns a Params object.
object.Params
Params.
Read-only.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
See sample in Example.
Returns the number of server requests serviced by the server.
object.Requests
Integer.
Read-only.
See sample in Example.
Returns a collection object representing the screens on the server console.
object.Screens
Screens.
Read-only.
See sample in Example.
Returns or sets the tracking status.
object.Transaction[=Status As Boolean]
Boolean.
Read/write.
Status is an optional parameter that enables (TRUE) or disables (FALSE) the tracking status.
See sample in Example.
Returns the percentage utilization of the server processor time.
object.Utilization
Integer.
Read-only.
See sample in Example.
Attaches to the specified server and returns the server ID.
object.Attach(
ServerName As String)
The name of the NetWare server.
Long. Returns the server ID.
In case of an error, this method returns -1.
See sample in Example.
Detaches the connection from a NetWare server.
object.Detach(
ServerID As Long)
The ID of the server. This value is obtained from the Attach method.
Boolean. Returns TRUE if successful; otherwise, returns FALSE.
This example detaches from server NWServer_1.
’Sets the variable to the server object
Set srv = CreateObject ("UCX:Server")
’Returns the date of the file server
Print srv.Date
’Returns the name of the file server
Print ("The server name is: "&Srv.Name)
’Returns the name of the company that distributed the NetWare
’OS
Set info = srv.Description
Print (info.company)&" distributed the NetWare OS"
’Returns the number of bytes read from the disk
Set diskstat = srv.Diskstat
Print ("Number of bytes read: "&diskstat.bytesread)
’Returns the nuber of dirty sectors in the file allocation
’table
Set fatstat = srv.Fatstat
Print ("The number of sectors modified are:
"&fatstat.dirtysectors)
’Returns the number of bytes read from the disk
Set filestat = srv.Filestat
Print ("Number of bytes read from the disk is:
"&filestat.bytesread)
’Returns the login status
If (srv.Loginstatus) then
Print ("Login status is enabled")
’Disables the login status of the server
srv.Loginstatus = FALSE
Else
Print ("Login status is disabled")
’Enables the login status of the server
srv.Loginstatus = TRUE
End If
’Returns the collection of NLMs loaded in the server and also
the name of a specific NLM
Set Modulesobj = srv.Modules
Set module = Modulesobj.Element("CLIB")
Print "NLM Name: "&Module.Name
’Returns the Network related statistics such as the bytes sent
’to the server
Set netstat = srv.Netstat
Print ("Number of bytes sent:" &netstat.Bytessent)
’Returns the Param object and the specifc property of that
’param object
Set srvparams = srv.Params
Set paramObj = srvparams.Get("Time Zone")
Print("Is StartupOnly is set to: " & paramObj.StartupOnly)
’Returns the number of server requests processed bythe server
Print (srv.requests) &" requests are served by the server"
’Returns the collection object corresponding to the screens
’in the server console and also the name of the active screen
Set screensobj = srv.Screens
Set screen = screensobj.CurrentScreen
Print "Current screen: "&screen.name
’Returns the tracking status
If (srv.Transaction) then
Print ("Transaction tracking is on")
’Sets the tracking status to OFF
srv.Transaction = FALSE
Else
Print ("Transaction tracking is off")
’Sets the tracking status to TRUE
srv.Transaction = TRUE
End If
’Returns the processor utilization time in percentage
Print (srv.Utilization &"% of server processor time is being
utilized")
’Attaches to the specific server and returns the connection
’state and the server connection ID
srvId = srv.attach("Appsdoc")
Print ("The server Id is: "&srvid)
If (srvId<>-1) Then
Print "Successfully attached to the server"
Else
Print "Unable to attach to the server"
End if
’Disconnects from the server
res=srv.Detach (srvId)
If (res=TRUE) Then
Print "Detached from the server"
Else
Print "Failed to detach from the server"
End If
Shuts down the default file server.
object.Down(
[force As Boolean])
Optional. If TRUE, the server is forced to shut down. If FALSE (the default), normal shutdown occurs.
Boolean. Returns TRUE if the server is forced to shut down; otherwise, FALSE.
Normal shutdown is the default behavior. If files are open on the server, this command returns FALSE. If Force is TRUE, the server is forced to shut down and all open files are closed without warning.
If the Web-based script is not authenticated to eDirectory with appropriate rights, an error is returned.
This example shuts down the default file server.
Set srv = CreateObject ("ucx:Server")
Print "Preparing to down the file server..."
srv.Down()
IMPORTANT:Down only brings down the file services and does not return the server to DOS prompt.
Allows a user to log in to the default file server.
object.Login(
ClientName As String,
ClientType As Integer,
Password As String)
The name of the object logging in to the server.
The type of the object logging in to the server. This parameter is used to specify whether the object is the user object, the server object, or another type.
The password associated with the object.
Boolean. Returns TRUE if the login is successful; otherwise, FALSE.
See sample in Example
Initiates logout from the server.
object.Logout(
ServerID As Integer)
The server you want to log the user out of. If this parameter is not specified, the user is logged out of all servers.
Boolean. Returns TRUE if the logout is successful else returns FALSE.
This example logs the user out of all servers.
Set srv = CreateObject ("ucx:Server")
If (srv.Login ("username", OT_USER, "password")) then
Print ("Logged on to the server"
If (srv.logout()) Then
Print "Successfully logged out"
End If
Else
Print ("Verify User name and password, then try again")
End If