the problem I end up with is that if I use a *.rrd, the source directory becomes part of the $FILE.
That is why I was thinking of cleaning up the whole 'cd' to directory, and then do stuff. I don't think it's necessary, and I don't know how to strip the /var/www/html/rra out of the $FILE variable so that when it writes the xml to /backup/cacti_xml, it won't include all of this information.
In that case do this.
Moderator's Comments:
Please use code tags when posting data and code samples!
Last edited by vgersh99; 10-17-2011 at 01:13 PM..
Reason: code tags, please!
Just I'm trying to find script, which will do the following job:
1. as a CRON-Job it shoult
a) delete files which will be either older than 24 hours or
b) all files within
a) a directory deleting recursive
b) only a special directory.
2. write an error-/Delete_log... (9 Replies)
Thanks for the all the help last evening on CRON jobs. It's now working.
Is it possible with cron to save a backup of a file to a different server or location? The idea being that if one host goes arse over tit, I'll have a backup of the DB on another server?
Many thanks,
Ed Ludlow (3 Replies)
Due to downsizing and attrition, I have inherited SysAdmin tasks, but unfortunately not all the required knowledge and skills came to me along with the assignment -> so I appreciate any advice and help ( be patient with my newbie terms and questions).
We moved a central server and changed it's... (1 Reply)
Hi All,
I have created 2 shell scripts and set Cron jobs which runs it at various frequencies.The first one which runs every 2 minutes Monday to Friday and another cron job runs at 11PM on the last Sunday of every month. I have given the cron job entries below.
Was wondering whether instead... (5 Replies)
Hi everyone! I'm sorry, I'm a total noob but would really appreciate any advice or help. I want to create a cron job that would run every hour and would look inside a few different folders. If any new files were created within those folders within the last hour they would be destroyed, but any... (2 Replies)
Hey Guys,
i was trying out a shell script which has to remove a file for every 90 mins. this is the code i came up with .
$ crontab -e file1
file1 contains
30 1 * * * * rm -r /folder1/folder2/somefile.txt
Now i need the cron to run for every 90 mins. the problem with this is... (8 Replies)
Despite my best efforts, my media streaming server still dies sometimes and I am in a random place trying to ssh into the server to restart it on my cell phone after customers start calling.... I tried using google to track down a script that would do the following
Every 5 min execute:
sudo... (1 Reply)
Hello,
How do I schedule a cron job for a phython script to run every hour?
Also, in case in future I decide to edit/cancel the job how should i do it?
Does it matter where my phython script is located? Also, I have am using mailx utility in my script to send me an email and dont want... (7 Replies)
i have a text file in this format: which creates a new one everyday in the form of filename _zing__r200_2012_8_10_log.txt
Fri Aug 10 07:29:17 EDT 2012, usera(192.168.0.245) to anotheruser: hey top, this is a private test
Fri Aug 10 07:29:28 EDT 2012, anotheruser(192.168.0.245) to usera: got... (2 Replies)
I'm new to shell scripting, and I want to set up a cron job that scans the date/time stamp of all files in a directory, and then if any file is, say, less than 10 minutes old, I want it to execute a command on that file. What would be the best way to go about this? Thanks.
Not sure if it makes a... (1 Reply)
Discussion started by: DavidHoffman
1 Replies
LEARN ABOUT DEBIAN
rrdcollect.conf
RRDCOLLECT.CONF(5) RRDcollect RRDCOLLECT.CONF(5)NAME
rrdcollect.conf -- RRDcollect configuration file.
SYNOPSIS
/etc/rrdcollect.conf
DESCRIPTION
The rrdcollect.conf file contains information where to look for data and to which database file put it.
Variables
# Configuration values:
step = 60
directory = /var/local/rrd
loglevel = LOG_NOTICE
Patterns
# System statistics:
file:///proc/stat
"cpu %d %d %d %d" stat.rrd:user,nice,system,idle
"processes %u" stat.rrd:processes
"swap %u %u" stat.rrd:swap_in,swap_out
# System load: 1, 5 and 15 min. average
file:///proc/loadavg
"%f %f %f" avg1.rrd:load,avg5.rrd:load,avg15.rrd:load
# Memory usage:
file:///proc/meminfo
"Mem: %*d %d %d %d %d %d" memory.rrd:used,free,shared,buffers,cached
"Swap: %*d %d %*d" memory.rrd:swap_used
# S.M.A.R.T. HDD temperature:
file:///proc/ide/hda/smart_values
7:"%*04x %*04x %02x%*02x" temperature.rrd:hda
Regular expressions
# Using regular expressions:
file:///proc/stat
/cpu (d+) (d+) (d+) (d+)/ stat.rrd:user,nice,system,idle
Please look into examples/ directory for working examples.
FILES
/etc/rrdcollect.conf
SEE ALSO rrdcollect(8), rrdtool(1), pcre(3)AUTHOR
Dawid Kuroczko <qnex@knm.org.pl>
Artur R. Czechowski <arturcz@hell.pl>
2 September 2002 RRDcollect 0.2.10 RRDCOLLECT.CONF(5)