Find the answer to your Linux question:
Results 1 to 4 of 4
Ubuntu Server 12.04 I must of uninstall a critical package. I had a script that was working fine but now is causing a zombie process along with actually running the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie Mad Professor's Avatar
    Join Date
    May 2006
    Posts
    142

    Now why is it doing that?


    Ubuntu Server 12.04
    I must of uninstall a critical package.

    I had a script that was working fine but now is causing a zombie process along with actually running the application and then the script hanging. This occurred after I removed KDE.

    When I ran the script, it went through but then listed the directory of where "I" was in then followed by the output, then hung hard and had to kill it from another window.

    Now when I ran the line of where the problem was, I had to run it as root since my user even with sudo didn't have permission to run the line in question.

    Code:
    root@pvr0:/home/pvr# echo `/usr/bin/service mythbackend status`
    Desktop Documents Downloads index.html Music mythtv mythtv0.22 mythtv0.27 nxclient_3.5.0-7_i386.deb nxnode_3.5.0-9_i386.deb nxserver_3.5.0-11_i386.deb perl5 Pictures Public Templates Videos mythbackend is not running
    my script
    Code:
    #!/bin/sh
    # print status
    STATUS=`/usr/bin/service mythbackend status | grep -E "mythbackend .*is running"`
    echo `date`: $STATUS
    FILEDATE=`date +%Y%m%d_%H%M%S`
    mv -f /mythauto/log/mythbackend-status /mythauto/log/mythbackend-status.previous
    RESULT=`wget --timeout=10 --output-document=/mythauto/log/mythbackend-status --retry-connrefused --tries=4 http://127.0.0.1:6544 2>&1`
    if [ "$?" -ne "0" ]
    then
            mv /mythauto/log/mythbackend-status.previous /mythauto/log/mythbackend-status.crashed.$FILEDATE
            echo -- ERROR: mythbackend is not responding... must restart: $RESULT
            echo `/usr/bin/service mythbackend status`
            echo `/usr/bin/service mythbackend stop`
            echo `/usr/bin/service mythbackend start`
            echo `date`: Restart done
    else
            echo Service is responding: $RESULT | sed "s/Saving.*//"
            rm /mythauto/log/mythbackend-status.previous
    fi

    What's wrong and what did I do?

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,379
    My guess is that mythtv or one of those other components requires either KDE or some KDE-related libararies to run. Why did you remove KDE? If you dno't need it, don't run it. However, some of its dependent libraries may be needed for other stuff.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Newbie Mad Professor's Avatar
    Join Date
    May 2006
    Posts
    142
    mythtv was compiled on minimal base. I had some problems with NX figured KDE would solve it but it didn't and it bogged down the system quite bad. so I removed it.

    Now just running mythbackend as a command it doesn't do that, it has something to do with /usr/bin/service or echo, not sure which. I wanted to see if anyone knew what it was, since no error is thrown in any of the logs in /var/log.

    I'll just do a wipe and reload ubuntu server again. Not a big deal.

  4. #4
    Linux Newbie Mad Professor's Avatar
    Join Date
    May 2006
    Posts
    142
    well that didn't work, waste of time.
    It must have been doing it long before I removed KDE and I'm just noticing it now.

    I changed the script, which works better and doesn't create zombie processes. I changed echo to eval for three step restart.

    Code:
    #!/bin/sh
    # print status
    STATUS=`/usr/bin/service mythbackend status | grep -E "mythbackend .*is running"`
    echo `date`: $STATUS
    FILEDATE=`date +%Y%m%d_%H%M%S`
    mv -f /mythauto/log/mythbackend-status /mythauto/log/mythbackend-status.previous
    RESULT=`wget --timeout=10 --output-document=/mythauto/log/mythbackend-status --retry-connrefused --tries=4 http://127.0.0.1:6544 2>&1`
    if [ "$?" -ne "0" ]
    then
            mv /mythauto/log/mythbackend-status.previous /mythauto/log/mythbackend-status.crashed.$FILEDATE
            echo -- ERROR: mythbackend is not responding... must restart: $RESULT
            eval "/usr/bin/service mythbackend status"
            eval "/usr/bin/service mythbackend stop"
            eval "/usr/bin/service mythbackend start"
            echo `date`: Restart done
    else
            echo Service is responding: $RESULT | sed "s/Saving.*//"
            rm /mythauto/log/mythbackend-status.previous
    fi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •