系统信息处理程序
此 API 提供仪表板上显示的相同信息。
系统信息可通过两个不同的 URL 获得
http://localhost:8983/solr/admin/system
和
http://localhost:8983/solr/<collection-name>/admin/system
唯一的区别是填充结果中的core
键。
结果中的键是
模式
-
solrcloud
或std
,指示 Solr 运行的模式 lucene
-
包含 Solr 和 Lucene 版本信息的对象
jvm
-
包含 JVM 信息的对象
系统
-
系统信息。
solr_home
-
Solr 基本目录。仅在
/solr/admin/system
下可用。 zkHost
-
在云模式下运行时的 Zookeeper 主机。
节点
-
在云模式下运行时的节点名称。
核心
-
包含核心基本信息的对象,仅在提供核心/集合名称时出现
Lucene 和 Solr 信息对象
响应中的solr
键是一个包含以下键的对象
lucene-spec-version
-
Lucene 包的规范版本。
lucene-impl-version
-
Lucene 包的实现版本。
solr-spec-version
-
Solr 包的规范版本。
solr-impl-version
-
Solr 包的实现版本。
系统信息对象
响应中的system
键是一个包含以下键及更多键的对象
名称
-
操作系统名称。
uname
-
运行
uname -a
的结果。Windows 上不可用。 正常运行时间
-
运行
uptime
的结果。Windows 上不可用。
系统信息 API 示例
从云模式中的节点检索系统信息。
curl http://localhost:8983/solr/admin/info/system
{
"responseHeader":{
"status":0,
"QTime":13},
"mode":"solrcloud",
"zkHost":"192.168.32.3:2181",
"solr_home":"/var/solr/data",
"lucene":{
"solr-spec-version":"8.1.1",
"solr-impl-version":"8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab - 2019-05-22 15:20:01",
"lucene-spec-version":"8.1.1",
"lucene-impl-version":"8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab - 2019-05-22 15:15:24"},
"jvm":{
"version":"11.0.3 11.0.3+7",
"name":"Oracle Corporation OpenJDK 64-Bit Server VM",
"spec":{
"vendor":"Oracle Corporation",
"name":"Java Platform API Specification",
"version":"11"},
"jre":{
"vendor":"Oracle Corporation",
"version":"11.0.3"},
"vm":{
"vendor":"Oracle Corporation",
"name":"OpenJDK 64-Bit Server VM",
"version":"11.0.3+7"},
"processors":4,
"memory":{
"free":"396 MB",
"total":"512 MB",
"max":"512 MB",
"used":"116 MB (%22.7)",
"raw":{
"free":415213560,
"total":536870912,
"max":536870912,
"used":121657352,
"used%":22.660447657108307}},
"jmx":{
"classpath":"start.jar",
"commandLineArgs":["-Xms512m",
"-Xmx512m",
"-XX:+UseG1GC",
"-XX:+PerfDisableSharedMem",
"-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=250",
"-XX:+UseLargePages",
"-XX:+AlwaysPreTouch",
"-Xlog:gc*:file=/var/solr/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M",
"-Dcom.sun.management.jmxremote",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.ssl=false",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.port=18983",
"-Dcom.sun.management.jmxremote.rmi.port=18983",
"-DzkClientTimeout=15000",
"-DzkHost=192.168.32.3:2181",
"-Dsolr.log.dir=/var/solr/logs",
"-Djetty.port=8983",
"-DSTOP.PORT=7983",
"-DSTOP.KEY=solrrocks",
"-Duser.timezone=UTC",
"-Djetty.home=/opt/solr/server",
"-Dsolr.solr.home=/var/solr/data",
"-Dsolr.data.home=",
"-Dsolr.install.dir=/opt/solr",
"-Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf",
"-Dlog4j.configurationFile=file:/var/solr/log4j2.xml",
"-Xss256k",
"-Dsolr.jetty.https.port=8983"],
"startTime":"2019-07-18T11:16:00.769Z",
"upTimeMS":1339007}},
"system":{
"name":"Linux",
"arch":"amd64",
"availableProcessors":4,
"systemLoadAverage":0.92,
"version":"4.9.0-9-amd64",
"committedVirtualMemorySize":4317540352,
"freePhysicalMemorySize":117563392,
"freeSwapSpaceSize":11583721472,
"processCpuLoad":0.0,
"processCpuTime":42690000000,
"systemCpuLoad":0.0,
"totalPhysicalMemorySize":4005376000,
"totalSwapSpaceSize":12884897792,
"maxFileDescriptorCount":1048576,
"openFileDescriptorCount":225,
"uname":"Linux f0281c6ee880 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux\n",
"uptime":" 11:38:19 up 28 days, 22:41, 0 users, load average: 0.92, 0.57, 0.51\n"},
"node":"172.17.0.4:8983_solr"}
从核心检索系统信息,不使用云模式。
curl http://localhost:8983/solr/gettingstarted/admin/system
{
"responseHeader":{
"status":0,
"QTime":23},
"core":{
"schema":"default-config",
"host":"fd7fbdff8b3e",
"now":"2019-07-18T11:56:51.472Z",
"start":"2019-07-18T11:54:52.509Z",
"directory":{
"cwd":"/opt/solr-8.1.1/server",
"instance":"/var/solr/data/gettingstarted",
"data":"/var/solr/data/gettingstarted/data",
"dirimpl":"org.apache.solr.core.NRTCachingDirectoryFactory",
"index":"/var/solr/data/gettingstarted/data/index"}},
"mode":"std",
"lucene":{
"solr-spec-version":"8.1.1",
"solr-impl-version":"8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab - 2019-05-22 15:20:01",
"lucene-spec-version":"8.1.1",
"lucene-impl-version":"8.1.1 fcbe46c28cef11bc058779afba09521de1b19bef - ab - 2019-05-22 15:15:24"},
"jvm":{
"version":"11.0.3 11.0.3+7",
"name":"Oracle Corporation OpenJDK 64-Bit Server VM",
"spec":{
"vendor":"Oracle Corporation",
"name":"Java Platform API Specification",
"version":"11"},
"jre":{
"vendor":"Oracle Corporation",
"version":"11.0.3"},
"vm":{
"vendor":"Oracle Corporation",
"name":"OpenJDK 64-Bit Server VM",
"version":"11.0.3+7"},
"processors":4,
"memory":{
"free":"394.9 MB",
"total":"512 MB",
"max":"512 MB",
"used":"117.1 MB (%22.9)",
"raw":{
"free":414074904,
"total":536870912,
"max":536870912,
"used":122796008,
"used%":22.87253886461258}},
"jmx":{
"classpath":"start.jar",
"commandLineArgs":["-Xms512m",
"-Xmx512m",
"-XX:+UseG1GC",
"-XX:+PerfDisableSharedMem",
"-XX:+ParallelRefProcEnabled",
"-XX:MaxGCPauseMillis=250",
"-XX:+UseLargePages",
"-XX:+AlwaysPreTouch",
"-Xlog:gc*:file=/var/solr/logs/solr_gc.log:time,uptime:filecount=9,filesize=20M",
"-Dcom.sun.management.jmxremote",
"-Dcom.sun.management.jmxremote.local.only=false",
"-Dcom.sun.management.jmxremote.ssl=false",
"-Dcom.sun.management.jmxremote.authenticate=false",
"-Dcom.sun.management.jmxremote.port=18983",
"-Dcom.sun.management.jmxremote.rmi.port=18983",
"-Dsolr.log.dir=/var/solr/logs",
"-Djetty.port=8983",
"-DSTOP.PORT=7983",
"-DSTOP.KEY=solrrocks",
"-Duser.timezone=UTC",
"-Djetty.home=/opt/solr/server",
"-Dsolr.solr.home=/var/solr/data",
"-Dsolr.data.home=",
"-Dsolr.install.dir=/opt/solr",
"-Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf",
"-Dlog4j.configurationFile=file:/var/solr/log4j2.xml",
"-Xss256k",
"-Dsolr.jetty.https.port=8983"],
"startTime":"2019-07-16T05:52:16.213Z",
"upTimeMS":194675370}},
"system":{
"name":"Linux",
"arch":"amd64",
"availableProcessors":4,
"systemLoadAverage":0.88,
"version":"4.9.0-9-amd64",
"committedVirtualMemorySize":4306059264,
"freePhysicalMemorySize":144179200,
"freeSwapSpaceSize":11626409984,
"processCpuLoad":0.0,
"processCpuTime":557920000000,
"systemCpuLoad":0.0,
"totalPhysicalMemorySize":4005376000,
"totalSwapSpaceSize":12884897792,
"maxFileDescriptorCount":1048576,
"openFileDescriptorCount":223,
"uname":"Linux fd7fbdff8b3e 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u3 (2019-06-16) x86_64 GNU/Linux\n",
"uptime":" 11:56:51 up 28 days, 23:00, 0 users, load average: 0.88, 0.65, 0.62\n"}}