Re: 'top' command hanging
On 2008-10-23, EJ <ej@blob.com> wrote:[color=blue]
> Hi all,
>
> Where is the first place I should be looking as a source of the problem, if
> the 'top' command is hanging? By this I mean, I type the command, hit enter,
> and nothing happens, the cursor goes to the next line, but nothing else. No
> top results, no new command prompt. CTRL-C, won't back out of it, I have to
> close my terminal emulator window.
>
> I can't just reboot as it's a business system server handling 300 users. I
> can schedule a reboot as a last resort, but I'd prefer to know the source of
> the problem, in case it's a symptom of a bigger impending issue.
>
> Thanks for any advice in advance.
>
> Best Regards,
>
> EJ[/color]
Is the top executable present and un-corrupted? (Probably /usr/bin/top).
I'd be preparing myself to find either a failing hard disc or a rootkit
:((
--
-- ^^^^^^^^^^
-- Whiskers
-- ~~~~~~~~~~
Re: 'top' command hanging
On Thu, 23 Oct 2008 09:10:14 +0100, EJ wrote:
[color=blue]
> Hi all,
>
> Where is the first place I should be looking as a source of the problem,
> if the 'top' command is hanging? By this I mean, I type the command, hit
> enter, and nothing happens, the cursor goes to the next line, but
> nothing else. No top results, no new command prompt. CTRL-C, won't back
> out of it, I have to close my terminal emulator window.
>
> I can't just reboot as it's a business system server handling 300 users.
> I can schedule a reboot as a last resort, but I'd prefer to know the
> source of the problem, in case it's a symptom of a bigger impending
> issue.
>
> Thanks for any advice in advance.[/color]
Check aliases that redirect output of top. Like top >null or top >some
file. Might also try bypassing the path and give it the direct file name.
Here it's /usr/bin/top.
--
Want the ultimate in free OTA SD/HDTV Recorder? [url]http://mythtv.org[/url]
My Tivo Experience [url]http://wesnewell.no-ip.com/tivo.htm[/url]
Tivo HD/S3 compared [url]http://wesnewell.no-ip.com/mythtivo.htm[/url]
AMD cpu help [url]http://wesnewell.no-ip.com/cpu.php[/url]
Re: 'top' command hanging
On Thursday 23 October 2008 10:10, someone identifying as *EJ* wrote
in /alt.os.linux.mandrake:/
[color=blue]
> Hi all,
>
> Where is the first place I should be looking as a source of the problem,
> if the 'top' command is hanging?[/color]
In addition to what the others have already said, you can get a similar
functionality - i.e. an overview of running processes - by using the /ps/
command or by downloading and installing /ntop./
If the version of /top/ as called by your shell with the set /$PATH/ is
genuine and uncorrupted, then you could try running it through /strace/ to
see where it hangs. See the /man/ page for details, but a short example
would be...
strace top
[color=blue]
> By this I mean, I type the command, hit enter, and nothing happens, the
> cursor goes to the next line, but nothing else. No top results, no new
> command prompt. CTRL-C, won't back out of it, I have to close my terminal
> emulator window.[/color]
Sounds like it's hanging allright. Check with /strace/ where it hangs. It
might be that you're running a kernel compiled with a different version
of /gcc/ than your /glibc/ and /top/ were, or that your /glibc/ was
compiled with a different compiler than /top./
It's hard to say, really. There are so many things that can go wrong, and
some of those may be - alas! - foul play, as the other posters noted.
[color=blue]
> I can't just reboot as it's a business system server handling 300 users. I
> can schedule a reboot as a last resort, but I'd prefer to know the source
> of the problem, in case it's a symptom of a bigger impending issue.[/color]
I don't suspect that it's the result of a bigger problem - except for a
hardware problem, which could (and will) of course lead to all kinds of
mayhem - but it would of course never hurt to check and - if within your
financial capabilities - run a full diagnostic on the hardware using a
hardware-based diagnostic card.
This said, it may also be a good idea to periodically check what /dmesg/ and
*/var/log/messages* have to say.
--
*Aragorn*
(registered GNU/Linux user #223157)