Crontab Doubt

Crontab Doubt

am 02.01.2008 21:03:08 von apogeusistemas

Hi:

I put a job in crontab, but I didn=B4t get log=B4s output, how could I
search for errors in cron execution ?

# crontab -l
10 0 1 * * /var/adm/sa/sar_autom > /usr/user/logs/1.lis


# ls -l 1.lis
-rw-r--r-- 1 root other 0 Jan 1 00:10 1.lis

Thank You.

Re: Crontab Doubt

am 02.01.2008 21:18:09 von Cyrus Kriticos

apogeusistemas@gmail.com wrote:
>
> I put a job in crontab, but I didn´t get log´s output, how could I
> search for errors in cron execution ?
>
> # crontab -l
> 10 0 1 * * /var/adm/sa/sar_autom > /usr/user/logs/1.lis

Is there output if you start this as root in your shell?

/var/adm/sa/sar_autom

> # ls -l 1.lis
> -rw-r--r-- 1 root other 0 Jan 1 00:10 1.lis

--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.

Re: Crontab Doubt

am 02.01.2008 21:22:48 von apogeusistemas

On 2 jan, 18:18, Cyrus Kriticos wrote:
> apogeusiste...@gmail.com wrote:
>
> > I put a job in crontab, but I didn=B4t get log=B4s output, how could I
> > search for errors in cron execution ?
>
> > # crontab -l
> > 10 0 1 * * /var/adm/sa/sar_autom > /usr/user/logs/1.lis
>
> Is there output if you start this as root in your shell?
>
> /var/adm/sa/sar_autom
>
> > # ls -l 1.lis
> > -rw-r--r-- =A0 1 root =A0 =A0 other =A0 =A0 =A0 =A0 =A00 Jan =A01 00:10 =
1.lis
>
> --
> =A0 =A0Best regards =A0| =A0Be nice to America or they'll bring democracy =
to
> =A0 =A0Cyrus =A0 =A0 =A0 =A0 | =A0your country.

Yes, if I execute the script in command line it works fine, but
in crontab I don=B4t get no output...

Re: Crontab Doubt

am 02.01.2008 21:35:19 von Cyrus Kriticos

apogeusistemas@gmail.com wrote:
> On 2 jan, 18:18, Cyrus Kriticos wrote:
>> apogeusiste...@gmail.com wrote:
>>
>>> I put a job in crontab, but I didn´t get log´s output, how could I
>>> search for errors in cron execution ?
>>> # crontab -l
>>> 10 0 1 * * /var/adm/sa/sar_autom > /usr/user/logs/1.lis
>> Is there output if you start this as root in your shell?
>>
>> /var/adm/sa/sar_autom
>>
>>> # ls -l 1.lis
>>> -rw-r--r-- 1 root other 0 Jan 1 00:10 1.lis
>
> Yes, if I execute the script in command line it works fine, but
> in crontab I don´t get no output...

ok, is there still output:

/var/adm/sa/sar_autom 2>/dev/null

--
Best regards | Be nice to America or they'll bring democracy to
Cyrus | your country.

Re: Crontab Doubt

am 02.01.2008 21:45:21 von apogeusistemas

On 2 jan, 18:35, Cyrus Kriticos wrote:
> apogeusiste...@gmail.com wrote:
> > On 2 jan, 18:18, Cyrus Kriticos wrote:
> >> apogeusiste...@gmail.com wrote:
>
> >>> I put a job in crontab, but I didn=B4t get log=B4s output, how could I=

> >>> search for errors in cron execution ?
> >>> # crontab -l
> >>> 10 0 1 * * /var/adm/sa/sar_autom > /usr/user/logs/1.lis
> >> Is there output if you start this as root in your shell?
>
> >> /var/adm/sa/sar_autom
>
> >>> # ls -l 1.lis
> >>> -rw-r--r-- =A0 1 root =A0 =A0 other =A0 =A0 =A0 =A0 =A00 Jan =A01 00:1=
0 1.lis
>
> > Yes, if I execute the script in command line it works fine, but
> > in crontab I don=B4t get no output...
>
> ok, is there still output:
>
> /var/adm/sa/sar_autom 2>/dev/null
>
> --
> =A0 =A0Best regards =A0| =A0Be nice to America or they'll bring democracy =
to
> =A0 =A0Cyrus =A0 =A0 =A0 =A0 | =A0your country.- Ocultar texto entre aspas=
-
>
> - Mostrar texto entre aspas -

Running this command:

/var/adm/sa/sar_autom 2>/dev/null

I don=B4t get video=B4s output, but script works, because I put
a file=B4s output inside the script:

echo "${linha[*]}" >> $output/sar-cpu-mensal-$pmt-$year.txt

and I have this file:

-rw-r--r-- 1 root other 8957 Jan 2 18:40 sar-cpu-
mensal-12-2007.txt