[mrtg] Re: MRTG migration from NT 4 to Linux

Soffen, Matthew msoffen at iso-ne.com
Fri Sep 21 16:01:08 MEST 2001


Also, here is a quick little perl that I created to strip the ^M's from Dos
files.  Just give it a list of filenames.

Also, just remember to transfer from NT to UNIX as ASCII (not binary).  If
you transfer as ASCII it will (should) correct the CRLM vs CR problems.

#!/usr/bin/perl

foreach $arg (@ARGV) {
  print "Opening $arg\n\n";
  open (FILE, "+< $arg");

  @lines = <FILE>;
  seek (FILE, 0, 0);
  truncate (FILE, 0);

  foreach $line (@lines) {
    $line =~ s/\015\n/\n/g;
    $line =~ s/\015/\n/g;
    print FILE "$line";
  }
  close (FILE);
}

> I'm not a *nix user, but you could use TextPad (www.textpad.com), it has
> the
> ability to save text files as either PC or Unix format.
> 
> > From:	Paul C. Williamson [SMTP:pwilliamson at mandtbank.com]
> > 
> > 
> > The configs or the logs?  I guess it really doesn't matter.
> > 
> > You could ftp them from one box to the other (ftp -i x.x.x.x 
> > 
> > Paul
> > 
> > >>> <RCayton at horine.com> 09/20/01 05:06PM >>>
> > 
> > my boss has MRTG set up on a nt 4 server
> > we want to move it to our redhat 7.1 server.
> > is the there an easy way to convert the files to the linux cfg files?
> > we want to use rrd and some other linux tools.
> 

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list