命令不显示完整输出

命令不显示完整输出

我的 linux (debian) 服务器上有一些奇怪的行为。命令的输出未完全显示有时。例如top只会这样显示。

top - 10:23:05 up 25 min,  4 users,  load average: 4.00, 4.00, 3.32
Tasks: 156 total,   1 running, 155 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.2 us,  1.0 sy,  0.0 ni, 98.5 id,  0.1 wa,  0.0 hi,  0.2 si,  0.0 st
KiB Mem :   949036 total,   805344 free,    35172 used,   108520 buff/cache
KiB Swap:        0 total,        0 free,        0 used.   858128 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1381 pi        20   0    8264   3012   2480 R  11.1  0.3   0:00.06 top
  183 root     -39   0       0      0      0 D   5.6  0.0   0:25.99 piControl I/O
    1 root      20   0   27016   6024   4900 S   0.0  0.6   0:02.91 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S   0.0  0.0   0:00.20 ksoftirqd/0
    4 root      -2   0       0      0      0 S   0.0  0.0   0:15.57 ktimersoftd/0
    6 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.03 rcu_preempt
    9 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_sched
   10 root      20   0       0      0      0 S   0.0  0.0   0:00.07 rcuc/0
   11 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kswork
   12 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 posixcputmr/0

而不是在同一服务器上

top - 10:23:37 up 26 min,  4 users,  load average: 4.00, 4.00, 3.33
Tasks: 156 total,   1 running, 155 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.2 us,  1.5 sy,  0.0 ni, 98.1 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st
KiB Mem :   949036 total,   805184 free,    35416 used,   108436 buff/cache
KiB Swap:        0 total,        0 free,        0 used.   858000 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
  183 root     -39   0       0      0      0 D   1.7  0.0   0:26.30 piControl I/O
    4 root      -2   0       0      0      0 S   0.9  0.0   0:16.03 ktimersoftd/0
   18 root      -2   0       0      0      0 S   0.9  0.0   0:15.65 ktimersoftd/1
    1 root      20   0   27988   6028   4900 S   0.0  0.6   0:03.03 systemd
    1 root      20   0   27988   6028   4900 S   0.0  0.6   0:03.03 systemd
    2 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kthreadd
    3 root      20   0       0      0      0 S   0.0  0.0   0:00.19 ksoftirqd/0
    4 root      -2   0       0      0      0 S   0.0  0.0   0:16.02 ktimersoftd/0
    6 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/0:0H
    8 root      20   0       0      0      0 S   0.0  0.0   0:00.03 rcu_preempt
    9 root      20   0       0      0      0 S   0.0  0.0   0:00.00 rcu_sched
   10 root      20   0       0      0      0 S   0.0  0.0   0:00.07 rcuc/0
   11 root      20   0       0      0      0 S   0.0  0.0   0:00.00 kswork
   12 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 posixcputmr/0
   13 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/0
   14 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/0
   15 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/1
   16 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/1
   17 root      20   0       0      0      0 S   0.0  0.0   0:00.06 rcuc/1
   19 root      20   0       0      0      0 S   0.0  0.0   0:00.09 ksoftirqd/1
   21 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/1:0H
   22 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 posixcputmr/1
   23 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/2
   24 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/2
   25 root      20   0       0      0      0 S   0.0  0.0   0:00.06 rcuc/2
   26 root      -2   0       0      0      0 S   0.0  0.0   0:00.07 ktimersoftd/2
   27 root      20   0       0      0      0 S   0.0  0.0   0:00.04 ksoftirqd/2
   29 root       0 -20       0      0      0 S   0.0  0.0   0:00.00 kworker/2:0H
   30 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 posixcputmr/2
   31 root      20   0       0      0      0 S   0.0  0.0   0:00.00 cpuhp/3
   32 root      rt   0       0      0      0 S   0.0  0.0   0:00.00 migration/3
   35 root      20   0       0      0      0 S   0.0  0.0   0:00.18 ksoftirqd/3
   36 root      20   0       0      0      0 S   0.0  0.0   0:00.27 kworker/3:0

运行git只会输出这个。

user@srvapp1:$ git
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone      Clone a repository into a new directory
   init       Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add        Add file contents to the index
   mv         Move or rename a file, a directory, or a symlink

检查内存free -h给了我。

              total        used        free      shared  buff/cache   available
Mem:           926M         37M        783M        6.1M        105M        834M
Swap:            0B          0B          0B

朗尼格uptime回归。

10:26:05 up 28 min,  5 users,  load average: 4.02, 4.01, 3.44

我的stty size输出stty -a是。

40 150
---
speed 38400 baud; rows 40; columns 150; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

我还可以检查什么,或者此行为是否暗示硬件问题?

相关内容