【解决方法】

  1. 用Format属性:

    这个其实解决不了截断的问题,不过可以显示更少的列,看起来更清楚。

Formatting

The formatting options (--format) pretty-prints tasks output using a Go template.

Valid placeholders for the Go template are listed below:

Placeholder

Description

.ID

Task ID

.Name

Task name

.Image

Task image

.Node

Node ID

.DesiredState

Desired state of the task (running, shutdown, or accepted)

.CurrentState

Current state of the task

.Error

Error

.Ports

Task published ports

When using the --format option, the service ps command will either output the data exactly as the template declares or, when using thetable directive, includes column headers as well.

The following example uses a template without headers and outputs the Name and Image entries separated by a colon for all tasks:

$ docker service ps --format "{{.Name}}: {{.Image}}" top

top.1: busybox

top.2: busybox

top.3: busybox

 

  1. 用—no-trunc属性

    docker service ps --no-trunc <service name>

     

     

当然,解决方法1和2可以联合起来用。

docker service ps打印出来的错误信息被截断了怎么办?的更多相关文章

  1. Chrome浏览器console控制台不打印任何js错误信息

    手欠在Chrome控制台在错误信息,右键:Hide messages from vue 看不到 报错信息 这里删除成 默认的Filter 报错就出现了

  2. 如何打印consul的错误信息

    在配置文件中添加 management: endpoints: web: exposure: include: "*" endpoint: shutdown: enabled: t ...

  3. Docker - 通过swarm 管理 docker service

    创建一个 Docker service $ docker service create --replicas 1 --name myhelloworld alpine ping docker.com ...

  4. docker探索-使用docker service管理swarm(十一 )

    本文转自:https://www.cnblogs.com/atuotuo/p/6265541.html 1.创建一个 Docker service $ docker service create -- ...

  5. 37. docker swarm docker service 的更新

    在service 运行的情况下 进行更新 1. 创建 名为 demo 的 overlay 网络 docker network create -d overlay demo 2. 创建 python-f ...

  6. 【原】iOS学习之Xcode8关于控制台不打印错误信息

    前几天将我的Xcode升到了8,但是在运行程序时,会打印很多没有用的信息,如下图: Xcode8运行程序时打印的乱码 于是各种寻求答案,找到如下答案: Edit Scheme-> Run -&g ...

  7. 为什么PHP(CLI)同一个错误信息会打印两次?

    第一个信息是display_errors输出的,在fpm环境下输出到浏览器那里,而在CLI环境下会打印到屏幕上. display_errors = On 第二个信息是log_errors输出的. lo ...

  8. shell脚本中sqlite3命令查询数据库失败返回空,并将错误信息打印到标准错误输出

    shell脚本中sqlite3命令查询数据库失败返回空,并将错误信息打印到标准错误输出 如: #/bin/sh local ret='sqlite3 test.db "select test ...

  9. [SoapUI] 重载JSONComparator比对JSON Response,忽略小数点后几位,将科学计数法转换为普通数字进行比对,在错误信息中打印当前循环的case number及其他附加信息

    重载JSONComparator比对JSON Response,忽略小数点后几位,将科学计数法转换为普通数字进行比对,在错误信息中打印当前循环的case number及其他附加信息 package d ...

随机推荐

  1. 【汇总】PHP-FPM 配置优化(转)

    -----------------------开启php-fpm慢脚本日志 request_slowlog_timeout = 30sslowlog = /usr/local/php/var/log/ ...

  2. POJ 1386 Play on Words (有向图欧拉路径判定)

    Play on Words Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 8768   Accepted: 3065 Des ...

  3. [Go] sync.Once 的用法

    sync.Once.Do(f func()) 是一个非常有意思的东西,能保证 once 只执行一次,无论你是否更换 once.Do(xx) 这里的方法,这个 sync.Once块 只会执行一次. pa ...

  4. WebLogic使用总结(五)——Web项目使用Sigar在WebLogic服务器部署遇到的问题

    今天在WebLogic 12c服务器上部署Web项目时,碰到了一个问题.项目中使用到了"Sigar.jar"监控Window平台下的cpu使用率.内存使用率和硬盘信息,sigar. ...

  5. MyEclipse使用总结——设置MyEclipse使用的Tomcat服务器

    一.设置使用的Tomcat服务器 如果不想使用MyEclipse自带的tomcat服务器版本,那么可以在MyEclipse中设置我们自己安装好的tomcat服务器 设置步骤如下: Window→Pre ...

  6. Android 自动编译、打包生成apk文件 2 - 使用原生Ant方式

    from://http://blog.csdn.net/androiddevelop/article/details/11100109 相关文章列表: <Android 自动编译.打包生成apk ...

  7. struct net_device网络设备结构体详解

    转自:http://blog.csdn.net/viewsky11/article/details/53046787 在linux中使用struct net_device结构体来描述每一个网络设备.同 ...

  8. Android之用自定义的shape去实现shadow效果

    直接上xml文件, 并且附上相应的解析: <?xml version="1.0" encoding="utf-8"?> <selector x ...

  9. Kubernetes基础:查看状态、管理服务

    目标 了解Kubernetes Pod 了解Kubernetes Node 学习如何调试部署问题 了解如何通过Service暴露应用 Kubernetes Pods 在Kubernetes中创建一个D ...

  10. 在ubuntu中搜索文件或文件夹的方法

    版权声明:本文为博主原创文章,转载请注明出处. https://blog.csdn.net/dcrmg/article/details/78000961 1. whereis+文件名 用于程序名的搜索 ...