LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 01-29-2011, 04:17 PM   #1
pukeko
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.

e.g.
/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, 05:22 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
sadc is back-end to sar command - http://linuxcommand.org/man_pages/sadc8.html.
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.
http://sebastien.godard.pagesperso-o.../man_sadc.html
 
  


Reply


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 07:50 AM
getting different output when ls is run by cron. JPMallory Linux - General 2 03-06-2009 02:27 PM
Cron output to a file Temujin_12 Linux - General 5 02-23-2005 01:52 PM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 07:17 PM
Can I run localhost/file.php with CRON function kondor5 Linux - General 1 03-28-2004 06:44 AM


All times are GMT -5. The time now is 04:21 PM.

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