Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 01-29-2011, 05:17 PM   #1
LQ Newbie
Registered: Jan 2010
Posts: 6

Rep: Reputation: 0
sadc output file creation behaviour when run from cron

Does anybody know why sadc (a front end for sar data collection) would append a "?" to the output file when run from cron? And more particularly, how should I correct it?

I have a RHEL 5.4 system which is doing this.

/usr/lib64/sa/sadc -d 10 6 /tmp/test

produces output file /tmp/test when run from the command line but when run from cron the file produced is called "/tmp/test?"

Normal system logging with sysstat, which uses the same sadc command (with a couple of other options, and none of the options -d, -F, -L affect this behaviour), produces output files /var/log/sa/sadd where "dd" is the day of the month. There does not seem to be any control over this within the sysstat start-up scripts, other than use of option "-" to generate standard output files, so I expect that the dd is being done within the code. Is this associated with the "?" ?.

Whatever is going on, the appended query seems to get added to everything as it still happens if I make the output file /tmp/test_$(/bin/date +\%d).

Is this a bug or am I missing something fundamental about cron?
Old 01-31-2011, 06:22 AM   #2
Senior Member
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
sadc is back-end to sar command -
Did you try that?

From a quick online search, I would be inclined to agree that the dd is added automatically.
This could be an explanation, but it seems that sadc command uses lock of output file - this could be
another piece of the puzzle - and isn't supposed to be run more than once in parallell.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to run a script in the background redirect the output to a file jdwalk Linux - Newbie 5 02-12-2010 08:50 AM
getting different output when ls is run by cron. JPMallory Linux - General 2 03-06-2009 03:27 PM
Cron output to a file Temujin_12 Linux - General 5 02-23-2005 02:52 PM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 08:17 PM
Can I run localhost/file.php with CRON function kondor5 Linux - General 1 03-28-2004 07:44 AM > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration