hostInfo() - Return driver system information command
Returns a document that describes the underlying system on which the driver runs.
Syntax diagram
Command parameters
No parameters.
Output
Values for the following parameters are returned:
- currentTime
- Current data and time.
- hostName
- Name of the host.
- numCores
- Maximum number of processors available to the virtual machine.
- OS name
- Current operating system name.
- OS version
- Current operating system version.
- OS architecture
- Current chip set.
Examples
The following example shows the command syntax for retrieving information about the runtime that
is used to start the driver instance:
db.hostInfo()The following example shows
the syntax of values returned from running the hostInfo
command:{
"system" :
{
"currentTime" :Fri Aug 09 14:48:33 IST 2024,
"hostName" :"IBM DB2 JDBC Universal Driver Architecture",
"numCores" :8,
},
"os" :
{
"name" :"Windows 10",
"version" :"10.0",
"architecture" :"amd64",
},
"ok" : 1
}