【问题标题】:Rstudio Shiny how can I display the version of the Shiny server in the Shiny page?Rstudio Shiny 如何在 Shiny 页面中显示 Shiny 服务器的版本?
【发布时间】:2014-11-17 12:21:22
【问题描述】:

是否有查询正在运行的 RStudio Shiny 网页以显示正在运行的服务器版本的变量或方法?例如。在网页上显示类似shiny-0.10.1 的内容。

有什么想法吗?

【问题讨论】:

    标签: r shiny shiny-server


    【解决方案1】:

    您可以使用packageVersion获取正在运行的闪亮版本:

    > packageVersion("shiny")
    [1] ‘0.10.1’
    

    如果您想了解服务器的详细信息,您可以进行系统调用:

    > system('shiny-server --version', intern = TRUE)
    [1] "Shiny Server v1.1.0.10000" "Node.js v0.10.21" 
    

    或者,如果您正在运行闪亮的服务器专业版,则有一个健康检查端点,因此调用

    http://my-shiny-ip-address/__health-check__
    

    如果服务器在线,将返回带有服务器信息的 http 响应,例如:

    server-version: 1.2.3.4
    active-connections: 8
    active-apps: 2
    active-processes: 3
    cpu-percent: 13
    memory-percent: 49
    swap-percent: 39.1
    load-average: 1.01953125
    

    http://rstudio.github.io/shiny-server/latest/#monitoring-the-server

    【讨论】:

    • 是否可以在闪亮的免费版本中创建端点?
    猜你喜欢
    • 2019-01-24
    • 1970-01-01
    • 2015-01-20
    • 2020-11-25
    • 2017-04-29
    • 2018-07-17
    • 2018-03-12
    • 2015-06-21
    • 2012-11-04
    相关资源
    最近更新 更多