0

Sorry that I can't be very specific, only symtoms are provided:

  • Monday morning
  • a CentOS box, 1GB ram, Pentium 4
  • web server (thin, rails) does not response (too slow) to a browser of another PC
  • ping it, ok
  • ssh into it, ok
  • a few minutes later, the web server is back to normal speed, serving web requests well
  • ping it, ok
  • ssh into it, ok
  • however, top does not run

what should I look at, about this 'top does not run' symptom? thx

ohho
  • 1,005
  • 8
  • 19
  • 34
  • What happens when you try to run top? – EEAA Mar 29 '10 at 02:18
  • 1
    Yeah, we need an error message, or code, or something more than "it doesn't run". – Chris S Mar 29 '10 at 02:34
  • nothing, just freezed there – ohho Mar 29 '10 at 03:47
  • have you figured out what the problem was? – Marco Ramos May 15 '10 at 23:25
  • Not really. However, it's related to _another_ issue. There was an IP address collision on the network (another Windows XP use the same IP address of this server). That's the cause of web server not responding (the browser tries to connects to the XP). After the IP address issue is cleared up, the TOP issue does not happen again. – ohho May 25 '10 at 01:56

5 Answers5

1

You might try to strace top and take a look at its output:

strace -f -o strace.out top

You might as well take a look at the shared libraries dependencies with ldd. Maybe libncurses is missing.

Hope this helps.

Marco Ramos
  • 3,120
  • 23
  • 25
0

Sounds like the serve could be swapping furiously would be one thought. Also, do you have sufficient swap space reserved?

You can 'cat /proc/meminfo' and find these things out.

mdpc
  • 11,856
  • 28
  • 53
  • 67
  • # cat /proc/meminfo MemTotal: 1026652 kB MemFree: 307972 kB Buffers: 54572 kB Cached: 467120 kB SwapCached: 0 kB Active: 292504 kB Inactive: 319432 kB HighTotal: 122304 kB HighFree: 232 kB – ohho Mar 29 '10 at 03:49
  • LowTotal: 904348 kB LowFree: 307740 kB SwapTotal: 1012084 kB SwapFree: 1012084 kB Dirty: 7528 kB Writeback: 0 kB AnonPages: 90272 kB – ohho Mar 29 '10 at 03:49
  • Mapped: 23280 kB Slab: 40668 kB PageTables: 2000 kB NFS_Unstable: 0 kB Bounce: 0 kB CommitLimit: 1525408 kB Committed_AS: 285288 kB VmallocTotal: 114680 kB VmallocUsed: 4576 kB VmallocChunk: 109684 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 Hugepagesize: 4096 kB – ohho Mar 29 '10 at 03:50
  • run top after meminfo, freeze and no message, ctrl-c can break it though – ohho Mar 29 '10 at 03:51
0

when you try to run run top; what's the msg it spit out? please copy and paste that msg here..so we can look into it and provide you the result.

unixbhaskar
  • 109
  • 5
0

did you try if ps works? for example

ps axOpcpu k-pcpu  | head
Unreason
  • 1,146
  • 1
  • 8
  • 22
0

Which top? That is, run which top to make sure you've got what you expect in your path.

mpez0
  • 1,512
  • 9
  • 9