Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

manual:087:4_help.3_maintenance [2010/12/27 06:54]
gandalf optimizing ssh
manual:087:4_help.3_maintenance [2010/12/28 11:57] (current)
Linegod add syntax highlighting
Line 11: Line 11:
 The logrotate function is well described in the man pages. My setup is as follows: The logrotate function is well described in the man pages. My setup is as follows:
  
-<code># logrotate cacti.log+<code bash># logrotate cacti.log
 /var/www/html/cacti/log/cacti.log { /var/www/html/cacti/log/cacti.log {
 # keep 7 versions online # keep 7 versions online
Line 32: Line 32:
 logrotate configuration files are tested by running logrotate configuration files are tested by running
  
-<code>logrotate -fd /etc/logrotate.d/cacti +<code bash>logrotate -fd /etc/logrotate.d/cacti 
 reading config file /etc/logrotate.d/cacti reading config file /etc/logrotate.d/cacti
 reading config info for /var/www/html/cacti/log/cacti.log  reading config info for /var/www/html/cacti/log/cacti.log 
Line 51: Line 51:
 Now we will request log rotation using Now we will request log rotation using
  
-<code>logrotate -f /etc/logrotate.d/cacti</code>+<code bash>logrotate -f /etc/logrotate.d/cacti</code>
  
 No output is produced, but you will see the effect  No output is produced, but you will see the effect 
Line 87: Line 87:
 It is absolutely necessary for this example, that a single dump file already exists. Else, logrotate will skip any execution due to a missing "log" file. My setup is as follows: It is absolutely necessary for this example, that a single dump file already exists. Else, logrotate will skip any execution due to a missing "log" file. My setup is as follows:
  
-<code># logrotate sql dump file+<code bash># logrotate sql dump file
 /var/www/html/cacti/log/cacti_dump.sql { /var/www/html/cacti/log/cacti_dump.sql {
 # keep 31 generations online # keep 31 generations online
Line 114: Line 114:
 Now run the test as follows Now run the test as follows
  
-<code>logrotate -fv /etc/logrotate.d/cacti+<code bash>logrotate -fv /etc/logrotate.d/cacti
 reading config file /etc/logrotate.d/cacti reading config file /etc/logrotate.d/cacti
 reading config info for /var/www/html/cacti/log/cacti_dump.sql  reading config info for /var/www/html/cacti/log/cacti_dump.sql 
Line 132: Line 132:
 Now list the results Now list the results
  
-<code>ls -l /var/www/html/log/cacti_dump*+<code bash>ls -l /var/www/html/log/cacti_dump*
 -rw-r--r-- 1 cactiuser cactiuser      0  4. Okt 22:10 cacti_dump.sql -rw-r--r-- 1 cactiuser cactiuser      0  4. Okt 22:10 cacti_dump.sql
 -rw-r--r-- 1 cactiuser cactiuser 318441  4. Okt 22:10 cacti_dump.sql-20071004</code> -rw-r--r-- 1 cactiuser cactiuser 318441  4. Okt 22:10 cacti_dump.sql-20071004</code>
Line 138: Line 138:
 ==== Migrating RRD Files between Architectures ==== ==== Migrating RRD Files between Architectures ====
  
-  - Run this Script on source-host.<code>#/bin/csh+  - Run this Script on source-host.<code bash>#/bin/csh
 # This scripts dumps all rrd in the working dir # This scripts dumps all rrd in the working dir
 # into xml files. # into xml files.
Line 175: Line 175:
 This will dump, move and restore all rrd files, one by one, to the target host **target** using **cactiuser** and a given ssh key. It will use a minimal space overhead, only for the current rrd file. Do not expect that this is as fast as scp-ing rrd files between servers. So, please test in advance, of there's a real need for rrdtool dump and restore! This will dump, move and restore all rrd files, one by one, to the target host **target** using **cactiuser** and a given ssh key. It will use a minimal space overhead, only for the current rrd file. Do not expect that this is as fast as scp-ing rrd files between servers. So, please test in advance, of there's a real need for rrdtool dump and restore!
  
-<code>#!/usr/bin/perl+<code perl>#!/usr/bin/perl
 # ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
  





Personal Tools