'top' command 'hanging' (Mandrake) - Mandriva

This is a discussion on 'top' command 'hanging' (Mandrake) - Mandriva ; Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux Hi all, Where is the first place I should be looking as a source of the problem, if the 'top' command is ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: 'top' command 'hanging' (Mandrake)

  1. 'top' command 'hanging' (Mandrake)

    Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux

    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



  2. Re: 'top' command 'hanging' (Mandrake)

    EJ ha scritto:
    > Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    > 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    >
    > 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
    >
    >

    What happens if you type 'ps -ef'? I think you have an hanged 'top'.

    Andrew


  3. Re: 'top' command 'hanging' (Mandrake)

    Quasimodo wrote:
    > EJ ha scritto:
    >
    >> Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    >> 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    >>
    >> 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
    >>
    >>

    > What happens if you type 'ps -ef'? I think you have an hanged 'top'.


    Silly questions:
    - does `which top` show what you would expect?
    - is the terminal emulator messed up?

    (Second question prompted by cutmp3 -- after I run it, if I do `su`, I
    cannot enter a password. Password is rejected immediately after the
    first key is pressed. Terminal is messed up somehow. But you restarted
    it, so it's a silly question.)

  4. Re: 'top' command 'hanging' (Mandrake)

    On Thursday 23 October 2008 10:14, someone identifying as *EJ* wrote
    in /alt.os.linux.mandriva:/

    > Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    > 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    >
    > 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,


    Please do not multipost. If you want to post a message to multiple
    newsgroups in order to increase your chances at a usable reply, use
    crossposting instead, i.e. put multiple newsgroups - Netiquette generally
    recommends keeping the number to a maximum of four - in the "Groups" field
    of your newsreader's composer, as I have done now to consolidate this
    thread.

    I (and others) have already replied to your post in /alt.os.linux.mandrake/
    and if you had used crossposting instead, the other people in this
    newsgroup here would also have seen the replies you got over there, plus
    that the newsreaders of those of us who reside in both groups will
    recognize crossposted articles and will mark them as read when they have
    already been picked up in the other group.

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  5. Re: 'top' command 'hanging' (Mandrake)

    Frank Peelo writes:

    >Quasimodo wrote:
    >> EJ ha scritto:
    >>
    >>> Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    >>> 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    >>>
    >>> 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
    >>>
    >>>

    >> What happens if you type 'ps -ef'? I think you have an hanged 'top'.


    >Silly questions:
    >- does `which top` show what you would expect?
    >- is the terminal emulator messed up?


    >(Second question prompted by cutmp3 -- after I run it, if I do `su`, I
    >cannot enter a password. Password is rejected immediately after the
    >first key is pressed. Terminal is messed up somehow. But you restarted
    >it, so it's a silly question.)



    And it is of course possible that " a commercial machine serving 300 people
    in a corporation" could be subject to an attack, and this is the latest
    manifestation. First thing is to do
    rpm -Va>/tmp/verify
    and look through that at the ones with a 5 in the third letter to see if
    the changed files make sense. (/etc/passwd should be changed. /usr/bin/top
    shoult not)


  6. Re: 'top' command 'hanging' (Mandrake)

    On Thu, 23 Oct 2008 04:14:09 -0400, EJ wrote:

    > Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    > 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    > 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,


    If this is really a Mandrake system, that means it hasn't been supported for
    many years. Note that Mandrake changed their name to Mandriva. See
    http://www.mandriva.com/en/mandriva-...ifetime-policy

    The most likely scenario I can think of, is that this system has had various
    patches applied manually, but is still running the original version of top,
    which would have been written for a 2.4 kernel.

    See if you can install a version of top written for a 2.6.8 kernel.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  7. Re: 'top' command 'hanging' (Mandrake)

    "EJ" writes:

    > Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    > 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    >
    > 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.


    I've seen similar behavior.
    Sometimes just trying to do:

    ls -l /proc
    or
    ps -ef

    will also hang.

    strace is a good place to start.

    I can't say for certain what the cause is but I'd suspect a process
    consuming a lot of memory or otherwise hung.

    Rebooting will almost certainly clear it up.


  8. Re: 'top' command 'hanging' (Mandrake)

    On Thursday 23 October 2008 18:58, someone identifying as *David W. Hodgins*
    wrote in /alt.os.linux.mandriva:/

    > On Thu, 23 Oct 2008 04:14:09 -0400, EJ wrote:
    >
    >> Linux 2.6.8.1-12mdksmp #1 SMP Fri Oct 1 11:24:45 CEST
    >> 2004 i686 Intel(R) Xeon(TM) MP CPU 3.00GHz unknown GNU/Linux
    >> 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,

    >
    > If this is really a Mandrake system, that means it hasn't been supported
    > for many years. Note that Mandrake changed their name to Mandriva. See
    > http://www.mandriva.com/en/mandriva-...ifetime-policy


    The abovementioned kernel image build clearly indicates that the pertaining
    distribution on that system is Mandrake 10.1.

    > The most likely scenario I can think of, is that this system has had
    > various patches applied manually, but is still running the original
    > version of top, which would have been written for a 2.4 kernel.


    This was also my idea. In Mandrake 10.0 and 10.1, most of the stuff was
    actually still built for a 2.4 kernel while 2.6 kernels were supplied
    alongside, and I have personally had some problems - not with either one of
    those two distributions and /top,/ but various custom-built 2.6.x kernels
    on Mandrake 9.2 and the /iptables/ userspace software that came with the
    distribution. Even a custom-built /iptables/ userland wouldn't work, using
    the actual compiler that came with the distribution itself and with which I
    had built my 2.6 kernels.

    Eventually, the culprit turned out to be /glibc,/ and back at the time, it
    seemed a bit too daunting to replace or rebuild *that* beast. ;-)

    > See if you can install a version of top written for a 2.6.8 kernel.


    It /could/ always work, in which case the OP would be served, but I suspect
    that somehow it won't. Aside from the recommended looks at the /dmesg/
    output and */var/log/messages* and an eventual verification of the
    hardware's reliability, I would recommend installing a newer distribution,
    and while he's at it, he can then also take out the time to check the
    hardware more properly as he'll need to reboot anyway.

    --
    *Aragorn*
    (registered GNU/Linux user #223157)

  9. Re: 'top' command 'hanging' (Mandrake)

    On 2008-10-23, Unruh wrote:
    >
    > And it is of course possible that " a commercial machine serving 300 people
    > in a corporation" could be subject to an attack, and this is the latest
    > manifestation. First thing is to do
    > rpm -Va>/tmp/verify
    > and look through that at the ones with a 5 in the third letter to see if
    > the changed files make sense. (/etc/passwd should be changed. /usr/bin/top
    > shoult not)


    That check will probably find many files that mismatch. The
    real way to use RPM to check for corruption is to run it
    once right after completion of installation and then every
    so often as you do package updates. Save the results to
    files and diff the files to see what changed. On my primary
    MandrX 2008.0 system with 1794 packages, I have 74 files
    that have a '5' in the third character position. Maybe a
    little over half of them are configuration files that are
    not a surprise to have changed. Nearly half simply differ,
    possibly as a result of sloppiness in packaging.

    I have a script I run immediately before and then after each
    batch of package updates or other significant system
    maintenance action. The script runs 'rpm -qa' and puts the
    results in a file. Then, it iterates over the package list,
    writing a header line with the package name, the output of
    "rpm -V $pkg", and a trailer line with the package name to a
    second file. (I could use just one file if I wanted.) I
    compare pairs of files adjacent in time. Comparing the
    before a package update confirms nothing major changed since
    right after the previous action, and comparing right after a
    package update shows that the update didn't hose anything,
    and it keeps the database up to date for the next check.

    Tripwire is another useful tool for intrusion detection,
    even though it takes a lot of maintenance to keep up with
    package updates.

    --
    Robert Riches
    spamtrap42@verizon.net
    (Yes, that is one of my email addresses.)

  10. Re: 'top' command 'hanging' (Mandrake)

    Robert Riches writes:

    >On 2008-10-23, Unruh wrote:
    >>
    >> And it is of course possible that " a commercial machine serving 300 people
    >> in a corporation" could be subject to an attack, and this is the latest
    >> manifestation. First thing is to do
    >> rpm -Va>/tmp/verify
    >> and look through that at the ones with a 5 in the third letter to see if
    >> the changed files make sense. (/etc/passwd should be changed. /usr/bin/top
    >> shoult not)


    >That check will probably find many files that mismatch. The


    Of course. All the configuration files. But it is not that many.
    ( about 50 max) and the config files usually have a c indicating they are
    config files. And they are pretty obvious.



    >real way to use RPM to check for corruption is to run it
    >once right after completion of installation and then every
    >so often as you do package updates. Save the results to


    Nuts. rpm already has a checksum as to what the file looked like
    "immediately upon install." config files get changed after install. You add
    users after installing.


    >files and diff the files to see what changed. On my primary
    >MandrX 2008.0 system with 1794 packages, I have 74 files
    >that have a '5' in the third character position. Maybe a
    >little over half of them are configuration files that are
    >not a surprise to have changed. Nearly half simply differ,
    >possibly as a result of sloppiness in packaging.


    No if you look closely they are things like font directory files.
    And 75 files is NOT difficult to chech through quickly. Most are obvious,
    and the ones that are not obvious are pretty straight forward.
    And if you see
    /usr/bin/ps
    in that list you KNOW you have been rooted.
    There is no doubt ( well, unless you upgraded rather than installed in
    which case it could be that mandriva changed the package name and the file
    is listed in two packages. Ie, doing
    rpm -qf name.of.suspect.file
    and if yo uget two package names, you know
    it is a package problem.





    >I have a script I run immediately before and then after each
    >batch of package updates or other significant system
    >maintenance action. The script runs 'rpm -qa' and puts the
    >results in a file. Then, it iterates over the package list,
    >writing a header line with the package name, the output of
    >"rpm -V $pkg", and a trailer line with the package name to a
    >second file. (I could use just one file if I wanted.) I
    >compare pairs of files adjacent in time. Comparing the
    >before a package update confirms nothing major changed since
    >right after the previous action, and comparing right after a
    >package update shows that the update didn't hose anything,
    >and it keeps the database up to date for the next check.


    >Tripwire is another useful tool for intrusion detection,
    >even though it takes a lot of maintenance to keep up with
    >package updates.


    tripwire also keeps track of files not installed via rpm.


    >--
    >Robert Riches
    >spamtrap42@verizon.net
    >(Yes, that is one of my email addresses.)


+ Reply to Thread