Loading ...
Sorry, an error occurred while loading the content.
 

dstat utility

Expand Messages
  • mackowiakp
    I try to install dstat utility. Code: -bash-3.2# ipkg install dstat Installing dstat (0.6.6-1) to root... Downloading
    Message 1 of 8 , Nov 8, 2007
      I try to install dstat utility. Code:

      -bash-3.2# ipkg install dstat
      Installing dstat (0.6.6-1) to root...
      Downloading
      http://ipkg.nslu2-linux.org/feeds/optware/nslu2/cross/stable/dstat_0.6.6-1_armeb.ipk
      Configuring dstat
      -bash-3.2# dstat
      -bash: /opt/bin/dstat: /usr/bin/env: bad interpreter: No such file or
      directory

      What the problem is? Why dstat raports an error (bad interpreter)
    • Brian Zhou
      /opt/bin/dstat is actually a python script. The Unix convention of invoking an interpreter is to have a first line like #!/usr/bin/env python based on this,
      Message 2 of 8 , Nov 9, 2007
        /opt/bin/dstat is actually a python script. The Unix convention of
        invoking an interpreter is to have a first line like

        #!/usr/bin/env python

        based on this, your shell (bash in this case) will locate the first
        python in your PATH, and use it as interpreter for the rest of the
        script. But all this assumes there is a /usr/bin/env installed.

        Unfortunately Linksys firmware does not have /usr/bin/env. To be
        bug-compatible with Linksys firmware, unslung also does not have
        /usr/bin/env.

        Optware coreutils for unslung will install /usr/bin/env and link it to
        /opt/bin/env. So the easiest workaround is to "ipkg install
        coreutils". I've added coreutils to dstat dependencies on unslung. The
        coreutils is one of the few packages I always install anyway.

        -Brian Zhou


        --- In nslu2-general@yahoogroups.com, "mackowiakp" <mackowiakp@...> wrote:
        >
        > I try to install dstat utility. Code:
        >
        > -bash-3.2# ipkg install dstat
        > Installing dstat (0.6.6-1) to root...
        > Downloading
        >
        http://ipkg.nslu2-linux.org/feeds/optware/nslu2/cross/stable/dstat_0.6.6-1_armeb.ipk
        > Configuring dstat
        > -bash-3.2# dstat
        > -bash: /opt/bin/dstat: /usr/bin/env: bad interpreter: No such file or
        > directory
        >
        > What the problem is? Why dstat raports an error (bad interpreter)
        >
      • Marcel Nijenhof
        ... Thanks for the quick fix. Maybe we should fix this by correcting the #!/usr/bin/env python with #!/opt/bin/python because as packagers we know that we
        Message 3 of 8 , Nov 9, 2007
          On Fri, 2007-11-09 at 17:26 +0000, Brian Zhou wrote:

          > Optware coreutils for unslung will install /usr/bin/env and link it to
          > /opt/bin/env. So the easiest workaround is to "ipkg install
          > coreutils". I've added coreutils to dstat dependencies on unslung. The
          > coreutils is one of the few packages I always install anyway.

          Thanks for the quick fix.

          Maybe we should fix this by correcting the "#!/usr/bin/env python"
          with "#!/opt/bin/python" because as packagers we know that we want
          that python binary.

          What do you think is the best fix?

          --
          marceln
        • Brian Zhou
          Yeah, #!/opt/bin/python is a better idea. -Brian Zhou
          Message 4 of 8 , Nov 9, 2007
            Yeah, #!/opt/bin/python is a better idea.

            -Brian Zhou

            --- In nslu2-general@yahoogroups.com, Marcel Nijenhof <nslu2@...> wrote:
            >
            > On Fri, 2007-11-09 at 17:26 +0000, Brian Zhou wrote:
            >
            > > Optware coreutils for unslung will install /usr/bin/env and link it to
            > > /opt/bin/env. So the easiest workaround is to "ipkg install
            > > coreutils". I've added coreutils to dstat dependencies on unslung. The
            > > coreutils is one of the few packages I always install anyway.
            >
            > Thanks for the quick fix.
            >
            > Maybe we should fix this by correcting the "#!/usr/bin/env python"
            > with "#!/opt/bin/python" because as packagers we know that we want
            > that python binary.
            >
            > What do you think is the best fix?
            >
            > --
            > marceln
            >
          • Piotr Mackowiak
            But loot to the result if one of coreutils usage. code -bash-3.2# uptime uptime: couldn t get boot time: No such file or directory What the problem is? _____
            Message 5 of 8 , Nov 9, 2007
              But loot to the result if one of coreutils usage. code

              -bash-3.2# uptime
              uptime: couldn't get boot time: No such file or directory

              What the problem is?

              _____

              From: nslu2-general@yahoogroups.com [mailto:nslu2-general@yahoogroups.com]
              On Behalf Of Brian Zhou
              Sent: Friday, November 09, 2007 11:56 PM
              To: nslu2-general@yahoogroups.com
              Subject: [nslu2-general] Re: dstat utility



              Yeah, #!/opt/bin/python is a better idea.

              -Brian Zhou

              --- In nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
              yahoogroups.com, Marcel Nijenhof <nslu2@...> wrote:
              >
              > On Fri, 2007-11-09 at 17:26 +0000, Brian Zhou wrote:
              >
              > > Optware coreutils for unslung will install /usr/bin/env and link it to
              > > /opt/bin/env. So the easiest workaround is to "ipkg install
              > > coreutils". I've added coreutils to dstat dependencies on unslung. The
              > > coreutils is one of the few packages I always install anyway.
              >
              > Thanks for the quick fix.
              >
              > Maybe we should fix this by correcting the "#!/usr/bin/env python"
              > with "#!/opt/bin/python" because as packagers we know that we want
              > that python binary.
              >
              > What do you think is the best fix?
              >
              > --
              > marceln
              >






              [Non-text portions of this message have been removed]
            • Marcel Nijenhof
              ... I have changed it. -- marceln
              Message 6 of 8 , Nov 10, 2007
                On Fri, 2007-11-09 at 22:55 +0000, Brian Zhou wrote:

                > Yeah, #!/opt/bin/python is a better idea.

                I have changed it.

                --
                marceln
              • Brian Zhou
                From strace, coreutils uptime is looking to read eith /var/run/utmpx or /var/run/utmp, those files do not exist on unslung. The coreutils uptime is working
                Message 7 of 8 , Nov 10, 2007
                  From strace, coreutils uptime is looking to read eith /var/run/utmpx
                  or /var/run/utmp, those files do not exist on unslung. The coreutils
                  uptime is working fine on other optware platforms.

                  Not a big problem though, you can install procps, which has a working
                  uptime. Or use "/opt/bin/busybox uptime".

                  -Brian Zhou

                  --- In nslu2-general@yahoogroups.com, "Piotr Mackowiak"
                  <mackowiakp@...> wrote:
                  >
                  > But loot to the result if one of coreutils usage. code
                  >
                  > -bash-3.2# uptime
                  > uptime: couldn't get boot time: No such file or directory
                  >
                  > What the problem is?
                  >
                  > _____
                  >
                  > From: nslu2-general@yahoogroups.com
                  [mailto:nslu2-general@yahoogroups.com]
                  > On Behalf Of Brian Zhou
                  > Sent: Friday, November 09, 2007 11:56 PM
                  > To: nslu2-general@yahoogroups.com
                  > Subject: [nslu2-general] Re: dstat utility
                  >
                  >
                  >
                  > Yeah, #!/opt/bin/python is a better idea.
                  >
                  > -Brian Zhou
                  >
                  > --- In nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
                  > yahoogroups.com, Marcel Nijenhof <nslu2@> wrote:
                  > >
                  > > On Fri, 2007-11-09 at 17:26 +0000, Brian Zhou wrote:
                  > >
                  > > > Optware coreutils for unslung will install /usr/bin/env and link
                  it to
                  > > > /opt/bin/env. So the easiest workaround is to "ipkg install
                  > > > coreutils". I've added coreutils to dstat dependencies on
                  unslung. The
                  > > > coreutils is one of the few packages I always install anyway.
                  > >
                  > > Thanks for the quick fix.
                  > >
                  > > Maybe we should fix this by correcting the "#!/usr/bin/env python"
                  > > with "#!/opt/bin/python" because as packagers we know that we want
                  > > that python binary.
                  > >
                  > > What do you think is the best fix?
                  > >
                  > > --
                  > > marceln
                  > >
                  >
                  >
                  >
                  >
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                • Piotr Mackowiak
                  THX after installing procps works fine ! _____ From: nslu2-general@yahoogroups.com [mailto:nslu2-general@yahoogroups.com] On Behalf Of Brian Zhou Sent:
                  Message 8 of 8 , Nov 10, 2007
                    THX after installing procps works fine !

                    _____

                    From: nslu2-general@yahoogroups.com [mailto:nslu2-general@yahoogroups.com]
                    On Behalf Of Brian Zhou
                    Sent: Saturday, November 10, 2007 4:38 PM
                    To: nslu2-general@yahoogroups.com
                    Subject: [nslu2-general] Re: dstat utility



                    From strace, coreutils uptime is looking to read eith /var/run/utmpx
                    or /var/run/utmp, those files do not exist on unslung. The coreutils
                    uptime is working fine on other optware platforms.

                    Not a big problem though, you can install procps, which has a working
                    uptime. Or use "/opt/bin/busybox uptime".

                    -Brian Zhou

                    --- In nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
                    yahoogroups.com, "Piotr Mackowiak"
                    <mackowiakp@...> wrote:
                    >
                    > But loot to the result if one of coreutils usage. code
                    >
                    > -bash-3.2# uptime
                    > uptime: couldn't get boot time: No such file or directory
                    >
                    > What the problem is?
                    >
                    > _____
                    >
                    > From: nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
                    yahoogroups.com
                    [mailto:nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
                    yahoogroups.com]
                    > On Behalf Of Brian Zhou
                    > Sent: Friday, November 09, 2007 11:56 PM
                    > To: nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
                    yahoogroups.com
                    > Subject: [nslu2-general] Re: dstat utility
                    >
                    >
                    >
                    > Yeah, #!/opt/bin/python is a better idea.
                    >
                    > -Brian Zhou
                    >
                    > --- In nslu2-general@ <mailto:nslu2-general%40yahoogroups.com>
                    > yahoogroups.com, Marcel Nijenhof <nslu2@> wrote:
                    > >
                    > > On Fri, 2007-11-09 at 17:26 +0000, Brian Zhou wrote:
                    > >
                    > > > Optware coreutils for unslung will install /usr/bin/env and link
                    it to
                    > > > /opt/bin/env. So the easiest workaround is to "ipkg install
                    > > > coreutils". I've added coreutils to dstat dependencies on
                    unslung. The
                    > > > coreutils is one of the few packages I always install anyway.
                    > >
                    > > Thanks for the quick fix.
                    > >
                    > > Maybe we should fix this by correcting the "#!/usr/bin/env python"
                    > > with "#!/opt/bin/python" because as packagers we know that we want
                    > > that python binary.
                    > >
                    > > What do you think is the best fix?
                    > >
                    > > --
                    > > marceln
                    > >
                    >
                    >
                    >
                    >
                    >
                    >
                    > [Non-text portions of this message have been removed]
                    >






                    [Non-text portions of this message have been removed]
                  Your message has been successfully submitted and would be delivered to recipients shortly.