Discussion:
[rancid] Newbie question: I get an email every hour even when nothing has changed.
Alan Evans
2007-07-10 00:31:05 UTC
Permalink
Hello group,

I just installed rancid today and I think I've done something wrong but
can't figure out what.
I get an email every hour even though nothing has changed. Below is a
snipet from the email.

It looks to me like the output from "dir /all nvram:" keeps changing
every time rancid-run executes.
Sometimes the prefix is "!Flash: nvram:" and sometimes the prefix is
"!Flash: :".

Anyone have any clues of what I've done wrong?

Thanks in advance
AlanE

retrieving revision 1.7
diff -u -4 -r1.7 10.10.26.62
@@ -28,52 +28,52 @@
!Variable: BOOT variable =
bootdisk:s72033-ipservices_wan-mz.122-18.SXF4.bin,1;
!Variable: CONFIG_FILE variable does not exist
!Variable: BOOTLDR variable =
!
- !Flash: nvram: Directory of nvram:/
- !Flash: nvram: 1918 -rw- 30609 <no date>
startup-config
- !Flash: nvram: 1919 ---- 5 <no date>
private-config
- !Flash: nvram: 1920 -rw- 30609 <no date>
underlying-config
- !Flash: nvram: 1 ---- 4 <no date>
rf_cold_starts
- !Flash: nvram: 2 ---- 49 <no date>
persistent-data
- !Flash: nvram: 3 -rw- 0 <no date>
ifIndex-table
- !Flash: nvram: 1964024 bytes total (1930286 bytes free)
+ !Flash: : Directory of nvram:/
+ !Flash: : 1918 -rw- 30609 <no date>
startup-config
+ !Flash: : 1919 ---- 5 <no date>
private-config
+ !Flash: : 1920 -rw- 30609 <no date>
underlying-config
+ !Flash: : 1 ---- 4 <no date>
rf_cold_starts
+ !Flash: : 2 ---- 49 <no date>
persistent-data
+ !Flash: : 3 -rw- 0 <no date>
ifIndex-table
+ !Flash: : 1964024 bytes total (1930286 bytes free)
!
Alan Evans
2007-07-13 00:56:18 UTC
Permalink
Quick update on my problem.

My initial thoughts were wrong. The problem was that I got different
results when rancid was run from a cronjob and when it was run from the
command line.

Cron looked like this:
!Flash: nvram: 1920 -rw- 30609 <no date> underlying-config
Command line looked like this:
!Flash: : 1920 -rw- 30609 <no date> underlying-config

Notice the missing "nvram" when run from the command line.
I managed to figure out that if I changed the $dev regex in rancid
script (line#1898)
From:
my($dev) = (/\s([^\s]+):/);
To:
my($dev) = /\S+\s+(\S+):/;

Then the nvram appears in both cron and command line outputs.
I have no explanation why, but it works for me.

Cheers
AlanE

Loading...