`ps -ax` gets cut off when run from cron

Discussion in 'Ruby' started by Carl Lerche, Sep 8, 2006.

  1. Carl Lerche

    Carl Lerche Guest

    Hello,

    I have a simple ruby script that writes the content of `ps -ax` to a
    file, when I call it myself, it runs fine, however when I set the
    script in a cron job and cron calls it, the output is truncated at 80
    characters, which is quite annoying. Any ideas as to why this is? I
    have my PATH set in the crontab:

    PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

    Thanks,
    Carl Lerche
     
    Carl Lerche, Sep 8, 2006
    #1
    1. Advertising

  2. Carl Lerche

    Paul Battley Guest

    On 08/09/06, Carl Lerche <> wrote:
    > I have a simple ruby script that writes the content of `ps -ax` to a
    > file, when I call it myself, it runs fine, however when I set the
    > script in a cron job and cron calls it, the output is truncated at 80
    > characters, which is quite annoying. Any ideas as to why this is? I
    > have my PATH set in the crontab:


    Try `ps -axwww` instead.

    Paul
     
    Paul Battley, Sep 8, 2006
    #2
    1. Advertising

  3. Carl Lerche

    Carl Lerche Guest

    Hey, that did it! Dumb of me not to check the man pages for ps...
    didn't think of it.

    Thanks for the help!
    -carl

    On Sep 8, 2006, at 12:09 AM, Paul Battley wrote:

    > On 08/09/06, Carl Lerche <> wrote:
    >> I have a simple ruby script that writes the content of `ps -ax` to a
    >> file, when I call it myself, it runs fine, however when I set the
    >> script in a cron job and cron calls it, the output is truncated at 80
    >> characters, which is quite annoying. Any ideas as to why this is? I
    >> have my PATH set in the crontab:

    >
    > Try `ps -axwww` instead.
    >
    > Paul
    >
     
    Carl Lerche, Sep 8, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. adiel
    Replies:
    1
    Views:
    1,007
    makthar
    Nov 24, 2003
  2. Replies:
    1
    Views:
    597
    Peter Blum
    Jun 2, 2005
  3. novel
    Replies:
    3
    Views:
    391
    David Postill
    Dec 7, 2003
  4. Replies:
    2
    Views:
    2,203
    Mark Parnell
    Aug 24, 2004
  5. Bodidily
    Replies:
    0
    Views:
    457
    Bodidily
    Aug 25, 2004
Loading...

Share This Page