From heas at shrubbery.net Mon May 4 20:28:27 2026 From: heas at shrubbery.net (heasley) Date: Mon, 4 May 2026 20:28:27 +0000 Subject: [rancid] [ERROR] lib/rancid/rancid.pm In-Reply-To: References: Message-ID: Wed, Apr 22, 2026 at 12:13:22PM +0000, Pan Affa: > Dear Haussli, > > I have a situation about that when rancid fetch Cisco device's configuration if the last command 'write term' occurs error. The script 'rancid' will not keep the xxx.new file. After I debuged it, I found the codes in the lib/rancid/rancid.pm will result in the 'rancid' script doesn't show the error message (the missing cmd: xxx). > > # Use an array to preserve the order of the commands and a hash for mapping > # commands to the subroutine and track commands that have been completed. > @commands = map(keys(%$_), @commandtable); > %commands = map(%$_, @commandtable); > $commandcnt = scalar(keys(%commands)); that implies to me that it did see the command (match it), but the filter function exited with non-zero before it finished consuming the input. Does that match your debugging? Perhaps you can share an example with me directly? From aweaver at ee.net Wed May 13 18:37:00 2026 From: aweaver at ee.net (Andrew Weaver) Date: Wed, 13 May 2026 14:37:00 -0400 Subject: [rancid] Completely disable mail functionality in 3.14? Message-ID: <73af9dde56734a95e58b0ae630da3b84@ee.net> Hello, I noticed that the logs on our RANCID machine were growing quite large. I determined that it is because it's writing 10MB of this half of the time rancid-run runs: No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc So then I created a blank .esmtprc file that caused it to start logging two lines for each thing that I don't want it doing in the first place. ;) File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) permissions. open: /home/rancid/.esmtprc: Success OK fine, I fixed that. How do I just disable every single thing to do with SMTP .esmtprc, etc? Thank you so much if anyone can assist me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweaver at ee.net Wed May 13 18:55:14 2026 From: aweaver at ee.net (Andrew Weaver) Date: Wed, 13 May 2026 14:55:14 -0400 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: <73af9dde56734a95e58b0ae630da3b84@ee.net> References: <73af9dde56734a95e58b0ae630da3b84@ee.net> Message-ID: <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> Hello, I apologize for replying to myself but it seems like the reason it's trying to send that many emails is because it thinks that this is a change and so it's creating a diff for things like this: 38,39c38,39 < ! syslog1.sys r- 131072 -- 26-Apr-2016 15:15:24 < ! syslog2.sys r- 131072 -- 26-Apr-2016 15:15:24 --- > ! syslog1.sys r- 131072 -- 26-Apr-2016 > 15:26:39 > ! syslog2.sys r- 131072 -- 26-Apr-2016 > 15:26:39 We're solely using RANCID as a way to backup the configuration files on our devices. Is there any way to globally disable it checking the file dates on the syslog files on network devices? I noticed on other switches it appears to think that the wattage being used by the PSUs is a configuration change. Do I need to make a custom version of whatever commands it's running to exclude things that change constantly? On 2026-05-13 14:37, Andrew Weaver wrote: > Hello, > > I noticed that the logs on our RANCID machine were growing quite large. > > I determined that it is because it's writing 10MB of this half of the > time rancid-run runs: > > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > > So then I created a blank .esmtprc file that caused it to start logging > two lines for each thing that I don't want it doing in the first place. > ;) > > File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) > permissions. > open: /home/rancid/.esmtprc: Success > > OK fine, I fixed that. > > How do I just disable every single thing to do with SMTP .esmtprc, etc? > > Thank you so much if anyone can assist me. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From jethro.binks at strath.ac.uk Thu May 14 09:40:51 2026 From: jethro.binks at strath.ac.uk (Jethro Binks) Date: Thu, 14 May 2026 09:40:51 +0000 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: <73af9dde56734a95e58b0ae630da3b84@ee.net> References: <73af9dde56734a95e58b0ae630da3b84@ee.net> Message-ID: Don't know your environment or anything about esmtp (I guess client for sending email called by cron?), but does this help: https://unix.stackexchange.com/questions/711728/spam-messages-cb-crond1288-no-configuration-file-found-at-root-esmtprc-or/727772#727772 Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Rancid-discuss on behalf of Andrew Weaver Sent: 13 May 2026 7:37 PM To: rancid-discuss at www.shrubbery.net Subject: [rancid] Completely disable mail functionality in 3.14? Hello, I noticed that the logs on our RANCID machine were growing quite large. I determined that it is because it's writing 10MB of this half of the time rancid-run runs: No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc So then I created a blank .esmtprc file that caused it to start logging two lines for each thing that I don't want it doing in the first place. ;) File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) permissions. open: /home/rancid/.esmtprc: Success OK fine, I fixed that. How do I just disable every single thing to do with SMTP .esmtprc, etc? Thank you so much if anyone can assist me. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jethro.binks at strath.ac.uk Thu May 14 09:43:44 2026 From: jethro.binks at strath.ac.uk (Jethro Binks) Date: Thu, 14 May 2026 09:43:44 +0000 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> Message-ID: What "devices" are you backing up? What rancid type are you using? Many of the rancid types have an exclusion for filenames that are known to be volatile and change and filter them out from processing, or else the time fields are filtered out. (eg in ios.pm: sub ShowFlash { ... # Drop these files entirely. /\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ && Next; ) Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Rancid-discuss on behalf of Andrew Weaver Sent: 13 May 2026 7:55 PM To: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] Completely disable mail functionality in 3.14? Hello, I apologize for replying to myself but it seems like the reason it's trying to send that many emails is because it thinks that this is a change and so it's creating a diff for things like this: 38,39c38,39 < ! syslog1.sys r- 131072 -- 26-Apr-2016 15:15:24 < ! syslog2.sys r- 131072 -- 26-Apr-2016 15:15:24 --- > ! syslog1.sys r- 131072 -- 26-Apr-2016 15:26:39 > ! syslog2.sys r- 131072 -- 26-Apr-2016 15:26:39 We're solely using RANCID as a way to backup the configuration files on our devices. Is there any way to globally disable it checking the file dates on the syslog files on network devices? I noticed on other switches it appears to think that the wattage being used by the PSUs is a configuration change. Do I need to make a custom version of whatever commands it's running to exclude things that change constantly? On 2026-05-13 14:37, Andrew Weaver wrote: Hello, I noticed that the logs on our RANCID machine were growing quite large. I determined that it is because it's writing 10MB of this half of the time rancid-run runs: No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc So then I created a blank .esmtprc file that caused it to start logging two lines for each thing that I don't want it doing in the first place. ;) File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) permissions. open: /home/rancid/.esmtprc: Success OK fine, I fixed that. How do I just disable every single thing to do with SMTP .esmtprc, etc? Thank you so much if anyone can assist me. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweaver at ee.net Thu May 14 17:27:43 2026 From: aweaver at ee.net (Andrew Weaver) Date: Thu, 14 May 2026 13:27:43 -0400 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> Message-ID: <67d94e10a1b4025759a40773dec1883e@ee.net> We use many different types. The one I am trying to fix right now is "smc" it doesn't seem like it sends 'term length 0' before looking at the configuration so there ends up being spaces in the configuration file in weird places as it paginates so it counts the exact same "configuration file" as having a diff in it.. It was this: smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal datadump smc;command;smc::ShowSys;show system smc;command;smc::ShowVer;show version smc;command;smc::Dir;dir smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config I'm not sure what "terminal datadump" is supposed to do as that command doesn't exist on our dell switches. So we'll end up seeing things like this in the configs and the configs are "updated" every time RANCID goes out to check the configuration file and I cannot figure out why since the configurations almost never actually change. "! interface vlan 1" So I tried changing it to: smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal length 0 #smc;command;smc::ShowSys;show system #smc;command;smc::ShowVer;show version #smc;command;smc::Dir;dir #smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config Is there any way to log what it's actually doing when it is running like as far as the commands and the responses? I'd like to get it to stop thinking that there is a configuration change every single time rancid-run is ran. thanks. On 2026-05-14 05:43, Jethro Binks wrote: > What "devices" are you backing up? What rancid type are you using? > > Many of the rancid types have an exclusion for filenames that are known > to be volatile and change and filter them out from processing, or else > the time fields are filtered out. > > (eg in ios.pm: > > sub ShowFlash { > ... > # Drop these files entirely. > /\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ && > Next; > > ) > > Jethro. > > . . . . . . . . . . . . . . . . . . . . . . . . > . > > Jethro R Binks, Network Manager, > > Information Services Directorate, University Of Strathclyde, Glasgow, > UK > > The University of Strathclyde is a charitable body, registered in > Scotland, number SC015263. > > ------------------------- > > From: Rancid-discuss on > behalf of Andrew Weaver > Sent: 13 May 2026 7:55 PM > To: rancid-discuss at www.shrubbery.net > Subject: Re: [rancid] Completely disable mail functionality in 3.14? > > Hello, > > I apologize for replying to myself but it seems like the reason it's > trying to send that many emails is because it thinks that this is a > change and so it's creating a diff for things like this: > > 38,39c38,39 > < ! syslog1.sys r- 131072 -- 26-Apr-2016 > 15:15:24 > < ! syslog2.sys r- 131072 -- 26-Apr-2016 > 15:15:24 > --- >> ! syslog1.sys r- 131072 -- 26-Apr-2016 >> 15:26:39 >> ! syslog2.sys r- 131072 -- 26-Apr-2016 >> 15:26:39 > > We're solely using RANCID as a way to backup the configuration files on > our devices. > > Is there any way to globally disable it checking the file dates on the > syslog files on network devices? > > I noticed on other switches it appears to think that the wattage being > used by the PSUs is a configuration change. > > Do I need to make a custom version of whatever commands it's running to > exclude things that change constantly? > > On 2026-05-13 14:37, Andrew Weaver wrote: > >> Hello, >> >> I noticed that the logs on our RANCID machine were growing quite >> large. >> >> I determined that it is because it's writing 10MB of this half of the >> time rancid-run runs: >> >> No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc >> No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc >> No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc >> No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc >> No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc >> No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc >> >> So then I created a blank .esmtprc file that caused it to start >> logging two lines for each thing that I don't want it doing in the >> first place. ;) >> >> File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) >> permissions. >> open: /home/rancid/.esmtprc: Success >> >> OK fine, I fixed that. >> >> How do I just disable every single thing to do with SMTP .esmtprc, >> etc? >> >> Thank you so much if anyone can assist me. >> >> _______________________________________________ >> Rancid-discuss mailing list >> Rancid-discuss at www.shrubbery.net >> https://www.shrubbery.net/mailman/listinfo/rancid-discuss > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From jethro.binks at strath.ac.uk Thu May 14 18:38:09 2026 From: jethro.binks at strath.ac.uk (Jethro Binks) Date: Thu, 14 May 2026 18:38:09 +0000 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: <67d94e10a1b4025759a40773dec1883e@ee.net> References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> <67d94e10a1b4025759a40773dec1883e@ee.net> Message-ID: So rancid.types.base (from github repo) currently says: # SMC and Dell PowerConnect N2048, 34xx (config is incomplete), 35xx (3524, # 3524P, 3548, 3548P), N4032F, N4064, 62xxx, M6348, 64xx (6428), 7048, # M8024(-k), and R1-2401. smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal datadump smc;command;smc::ShowSys;show system smc;command;smc::ShowVer;show version smc;command;smc::Dir;dir smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config Is your device one of the listed models? It might be poorly tested if not. (It might be poorly tested if it is ? ). Anyway, it calls hlogin to log into the device and that was originally written for "hp" devices - but I guess it was functional enough to not need to write something specific. But it sends "no page" (directly in the script), which I guess isn't applicable for SMC. Google does suggest "terminal length 0" might work. On some systems there is no way to turn off paging (no idea about yours though), and so the parsing script has to handle finding and filtering out "--- more ---" lines and similar, which can often be painful. Smc.pm.in has several instances of: "# pager remnants like: ^H^H^H ^H^H^H content" so I guess there is some known paging imperfection here, and it might be a code versions have made changes. If your only problem is the directory listing changes, then simplest thing to do is to comment out the dir line: #smc;command;smc::Dir;dir If you want to keep all but the volatile ones, then you might look in smc.pm (or smc.pm.in if you are building from source) in sub Dir and modify it in some suitable way to match ones you don't want, maybe: ??????next if ( ????????/^aaafile\.prv/ || /^syslog\d+\.sys/ );???????? (is 'aaafile.prv' a real SMC file, or just a placeholder filename in the code?) It's very hard to keep on top of all the slight differences that appear even between different models in the same family or different code versions for a particular one from the same vendor, let alone between all vendors and their constantly shifting names, and the maintainer of rancid can only directly test a few of them and relies on reports or patches. Oxidized has similar issues, if their repo is anything to go by; I found the remark "I removed the "terminal datadump" from the porwerconnect.rb as these models doesn't have the command" in there at least. A well-written script should catch when an invalid command is sent and just move on. It should also catch valid commands for which the current user doesn't have permissions neatly too. For debugging, I'd do something like: env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin rancid -t smc -d devicename And you will get a .new and a .raw file that you can see a bit more about what's going on. Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Andrew Weaver Sent: 14 May 2026 6:27 PM To: Jethro Binks Cc: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] Completely disable mail functionality in 3.14? We use many different types. The one I am trying to fix right now is "smc" it doesn't seem like it sends 'term length 0' before looking at the configuration so there ends up being spaces in the configuration file in weird places as it paginates so it counts the exact same "configuration file" as having a diff in it.. It was this: smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal datadump smc;command;smc::ShowSys;show system smc;command;smc::ShowVer;show version smc;command;smc::Dir;dir smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config I'm not sure what "terminal datadump" is supposed to do as that command doesn't exist on our dell switches. So we'll end up seeing things like this in the configs and the configs are "updated" every time RANCID goes out to check the configuration file and I cannot figure out why since the configurations almost never actually change. "! interface vlan 1" So I tried changing it to: smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal length 0 #smc;command;smc::ShowSys;show system #smc;command;smc::ShowVer;show version #smc;command;smc::Dir;dir #smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config Is there any way to log what it's actually doing when it is running like as far as the commands and the responses? I'd like to get it to stop thinking that there is a configuration change every single time rancid-run is ran. thanks. On 2026-05-14 05:43, Jethro Binks wrote: What "devices" are you backing up? What rancid type are you using? Many of the rancid types have an exclusion for filenames that are known to be volatile and change and filter them out from processing, or else the time fields are filtered out. (eg in ios.pm: sub ShowFlash { ... # Drop these files entirely. /\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ && Next; ) Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Rancid-discuss on behalf of Andrew Weaver Sent: 13 May 2026 7:55 PM To: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] Completely disable mail functionality in 3.14? Hello, I apologize for replying to myself but it seems like the reason it's trying to send that many emails is because it thinks that this is a change and so it's creating a diff for things like this: 38,39c38,39 < ! syslog1.sys r- 131072 -- 26-Apr-2016 15:15:24 < ! syslog2.sys r- 131072 -- 26-Apr-2016 15:15:24 --- > ! syslog1.sys r- 131072 -- 26-Apr-2016 15:26:39 > ! syslog2.sys r- 131072 -- 26-Apr-2016 15:26:39 We're solely using RANCID as a way to backup the configuration files on our devices. Is there any way to globally disable it checking the file dates on the syslog files on network devices? I noticed on other switches it appears to think that the wattage being used by the PSUs is a configuration change. Do I need to make a custom version of whatever commands it's running to exclude things that change constantly? On 2026-05-13 14:37, Andrew Weaver wrote: Hello, I noticed that the logs on our RANCID machine were growing quite large. I determined that it is because it's writing 10MB of this half of the time rancid-run runs: No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc So then I created a blank .esmtprc file that caused it to start logging two lines for each thing that I don't want it doing in the first place. ;) File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) permissions. open: /home/rancid/.esmtprc: Success OK fine, I fixed that. How do I just disable every single thing to do with SMTP .esmtprc, etc? Thank you so much if anyone can assist me. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweaver at ee.net Thu May 14 19:21:18 2026 From: aweaver at ee.net (Andrew Weaver) Date: Thu, 14 May 2026 15:21:18 -0400 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> <67d94e10a1b4025759a40773dec1883e@ee.net> Message-ID: Okay, Thank you very much for that debug command that was helpful in illustrating another problem I'm having. Note: I specifically built version 3.14 with /opt/rancid (using these flags) because I have a 3.07 installed already in /usr/local/rancid... ./configure --prefix=/opt/rancid --localstatedir=/opt/rancid I created this in /opt/rancid/etc/rancid.types.conf [for NXOS] cisco-nx2;script;rancid -t cisco-nx cisco-nx2;login;clogin cisco-nx2;module;nxos cisco-nx2;inloop;nxos::inloop cisco-nx2;command;rancid::RunCommand;term no monitor-force cisco-nx2;command;nxos::WriteTerm;show running-config In router.db I have the device specified as this: nxlab1;cisco-nx2;up env NOPIPE=YES PATH=${PATH}:/opt/rancid/bin rancid -t cisco-nx2 -d nxlab1 loadtype: device type cisco-nx2 loadtype: found device type cisco-nx2 at /opt/rancid/etc/rancid.types.conf:21 executing clogin -t 90 -c"term no monitor-force;show running-config" nxlab1 PROMPT MATCH: NX65(\([^)#]+\))?\# HIT COMMAND:NX65# term no monitor-force In RunCommand: NX65# term no monitor-force HIT COMMAND:NX65# show running-config In WriteTerm: NX65# show running-config nxlab1: found exit nxlab1: End of run not found nxlab1: found_end is false The crazy part is that when rancid-run executes either in cron (using this rancid /opt/rancid/bin/rancid-run > /dev/null 2>&1) or run manually on the CLI like this: /opt/rancid/bin/rancid-run -r nxlab1 It's not actually using the cisco-nx2 "command" at all. I know this because I edited this line ProcessHistory("","","","!RANCID-CONTENT-TYPE: $devtype\n!\n"); to be ProcessHistory("","","","!RANCID-CONTENT-TYPE: QUICKLYLOSINGMYMIND\n!\n"); in /opt/rancid/lib/rancid/nxos.pm In the config file rancid-run creates it says this: !RANCID-CONTENT-TYPE: cisco In the config file that this creates env NOPIPE=YES PATH=${PATH}:/opt/rancid/bin rancid -t cisco-nx2 -d nxlab1 it says: !RANCID-CONTENT-TYPE: QUICKLYLOSINGMYMIND Do you have any idea why /opt/rancid/bin/rancid-run is doing it totally differently than the debug command? Also assuming I can even fix this issue is there some way to suppress the logging of "End of run not found" that you are aware of? Since it is expected that there would be no "end of run" for NXOS that message probably doesn't need to be logged. thank you very much. On 2026-05-14 14:38, Jethro Binks wrote: > So rancid.types.base (from github repo) currently says: > > # SMC and Dell PowerConnect N2048, 34xx (config is incomplete), 35xx > (3524, > # 3524P, 3548, 3548P), N4032F, N4064, 62xxx, M6348, 64xx (6428), 7048, > # M8024(-k), and R1-2401. > smc;script;rancid -t smc > smc;login;hlogin > smc;timeout;90 > smc;module;smc > smc;inloop;smc::inloop > smc;command;rancid::RunCommand;terminal datadump > smc;command;smc::ShowSys;show system > smc;command;smc::ShowVer;show version > smc;command;smc::Dir;dir > smc;command;smc::ShowVlan;show vlan > smc;command;smc::WriteTerm;show running-config > > Is your device one of the listed models? It might be poorly tested if > not. (It might be poorly tested if it is ? ). > > Anyway, it calls hlogin to log into the device and that was originally > written for "hp" devices - but I guess it was functional enough to not > need to write something specific. But it sends "no page" (directly in > the script), which I guess isn't applicable for SMC. Google does > suggest "terminal length 0" might work. On some systems there is no > way to turn off paging (no idea about yours though), and so the parsing > script has to handle finding and filtering out "--- more ---" lines and > similar, which can often be painful. > > Smc.pm.in has several instances of: "# pager remnants like: ^H^H^H > ^H^H^H content" so I guess there is some known paging imperfection > here, and it might be a code versions have made changes. > > If your only problem is the directory listing changes, then simplest > thing to do is to comment out the dir line: > > #smc;command;smc::Dir;dir > > If you want to keep all but the volatile ones, then you might look in > smc.pm (or smc.pm.in if you are building from source) in sub Dir and > modify it in some suitable way to match ones you don't want, maybe: > > ??????next if ( > ????????/^aaafile\.prv/ || > /^syslog\d+\.sys/ > );???????? > > (is 'aaafile.prv' a real SMC file, or just a placeholder filename in > the code?) > > It's very hard to keep on top of all the slight differences that appear > even between different models in the same family or different code > versions for a particular one from the same vendor, let alone between > all vendors and their constantly shifting names, and the maintainer of > rancid can only directly test a few of them and relies on reports or > patches. Oxidized has similar issues, if their repo is anything to go > by; I found the remark "I removed the "terminal datadump" from the > porwerconnect.rb as these models doesn't have the command" in there at > least. > > A well-written script should catch when an invalid command is sent and > just move on. It should also catch valid commands for which the > current user doesn't have permissions neatly too. > > For debugging, I'd do something like: > > env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin rancid -t smc -d > devicename > > And you will get a .new and a .raw file that you can see a bit more > about what's going on. > > Jethro. > > . . . . . . . . . . . . . . . . . . . . . . . . > . > > Jethro R Binks, Network Manager, > > Information Services Directorate, University Of Strathclyde, Glasgow, > UK > > The University of Strathclyde is a charitable body, registered in > Scotland, number SC015263. > > ------------------------- > > From: Andrew Weaver > Sent: 14 May 2026 6:27 PM > To: Jethro Binks > Cc: rancid-discuss at www.shrubbery.net > Subject: Re: [rancid] Completely disable mail functionality in 3.14? > > We use many different types. > > The one I am trying to fix right now is "smc" > > it doesn't seem like it sends 'term length 0' before looking at the > configuration so there ends up being spaces in the configuration file > in weird places as it paginates so it counts the exact same > "configuration file" as having a diff in it.. > > It was this: > > smc;script;rancid -t smc > smc;login;hlogin > smc;timeout;90 > smc;module;smc > smc;inloop;smc::inloop > smc;command;rancid::RunCommand;terminal datadump > smc;command;smc::ShowSys;show system > smc;command;smc::ShowVer;show version > smc;command;smc::Dir;dir > smc;command;smc::ShowVlan;show vlan > smc;command;smc::WriteTerm;show running-config > > I'm not sure what "terminal datadump" is supposed to do as that command > doesn't exist on our dell switches. > > So we'll end up seeing things like this in the configs and the configs > are "updated" every time RANCID goes out to check the configuration > file and I cannot figure out why since the configurations almost never > actually change. > > "! > > interface vlan 1" > > So I tried changing it to: > > smc;script;rancid -t smc > smc;login;hlogin > smc;timeout;90 > smc;module;smc > smc;inloop;smc::inloop > smc;command;rancid::RunCommand;terminal length 0 > #smc;command;smc::ShowSys;show system > #smc;command;smc::ShowVer;show version > #smc;command;smc::Dir;dir > #smc;command;smc::ShowVlan;show vlan > smc;command;smc::WriteTerm;show running-config > > Is there any way to log what it's actually doing when it is running > like as far as the commands and the responses? I'd like to get it to > stop thinking that there is a configuration change every single time > rancid-run is ran. > > thanks. > > On 2026-05-14 05:43, Jethro Binks wrote: > > What "devices" are you backing up? What rancid type are you using? > > Many of the rancid types have an exclusion for filenames that are known > to be volatile and change and filter them out from processing, or else > the time fields are filtered out. > > (eg in ios.pm: > > sub ShowFlash { > ... > # Drop these files entirely. > /\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ && > Next; > > ) > > Jethro. > > . . . . . . . . . . . . . . . . . . . . . . . . > . > > Jethro R Binks, Network Manager, > > Information Services Directorate, University Of Strathclyde, Glasgow, > UK > > The University of Strathclyde is a charitable body, registered in > Scotland, number SC015263. > > ------------------------- > > From: Rancid-discuss on > behalf of Andrew Weaver > Sent: 13 May 2026 7:55 PM > To: rancid-discuss at www.shrubbery.net > Subject: Re: [rancid] Completely disable mail functionality in 3.14? > > Hello, > > I apologize for replying to myself but it seems like the reason it's > trying to send that many emails is because it thinks that this is a > change and so it's creating a diff for things like this: > > 38,39c38,39 > < ! syslog1.sys r- 131072 -- 26-Apr-2016 > 15:15:24 > < ! syslog2.sys r- 131072 -- 26-Apr-2016 > 15:15:24 > --- >> ! syslog1.sys r- 131072 -- 26-Apr-2016 >> 15:26:39 >> ! syslog2.sys r- 131072 -- 26-Apr-2016 >> 15:26:39 > > We're solely using RANCID as a way to backup the configuration files on > our devices. > > Is there any way to globally disable it checking the file dates on the > syslog files on network devices? > > I noticed on other switches it appears to think that the wattage being > used by the PSUs is a configuration change. > > Do I need to make a custom version of whatever commands it's running to > exclude things that change constantly? > > On 2026-05-13 14:37, Andrew Weaver wrote: > > Hello, > > I noticed that the logs on our RANCID machine were growing quite large. > > I determined that it is because it's writing 10MB of this half of the > time rancid-run runs: > > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > > So then I created a blank .esmtprc file that caused it to start logging > two lines for each thing that I don't want it doing in the first place. > ;) > > File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) > permissions. > open: /home/rancid/.esmtprc: Success > > OK fine, I fixed that. > > How do I just disable every single thing to do with SMTP .esmtprc, etc? > > Thank you so much if anyone can assist me. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From jethro.binks at strath.ac.uk Fri May 15 08:14:54 2026 From: jethro.binks at strath.ac.uk (Jethro Binks) Date: Fri, 15 May 2026 08:14:54 +0000 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> <67d94e10a1b4025759a40773dec1883e@ee.net> Message-ID: Seems odd on the face of it, but a couple of suggestions: Verify which rancid.conf is in use; there are PATHs and PERL5LIB variables in there. Check ENVFILE in /opt/rancid/bin/rancid-run is pointing to where you think it is. Also perhaps: cisco-nx2;script;rancid -t cisco-nx Needs to be: cisco-nx2;script;rancid -t cisco-nx2 (I recently did an "alt version" like this for testing a dev version of a module that others has the same package name etc, and it took a couple of goes to get it right, it now works ok with: ### dev version arubaoscx-dev;script;rancid -t arubaoscx-dev arubaoscx-dev;login;clogin arubaoscx-dev;inloop;arubaoscx::inloop arubaoscx-dev;module;arubaoscx-dev arubaoscx-dev;command;rancid::RunCommand;no page arubaoscx-dev;command;arubaoscx::CommentOutput;show ip pim rp-set arubaoscx-dev;command;arubaoscx::ShowConfiguration;show running-config ) Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Andrew Weaver Sent: 14 May 2026 8:21 PM To: Jethro Binks Cc: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] Completely disable mail functionality in 3.14? Okay, Thank you very much for that debug command that was helpful in illustrating another problem I'm having. Note: I specifically built version 3.14 with /opt/rancid (using these flags) because I have a 3.07 installed already in /usr/local/rancid... ./configure --prefix=/opt/rancid --localstatedir=/opt/rancid I created this in /opt/rancid/etc/rancid.types.conf [for NXOS] cisco-nx2;script;rancid -t cisco-nx cisco-nx2;login;clogin cisco-nx2;module;nxos cisco-nx2;inloop;nxos::inloop cisco-nx2;command;rancid::RunCommand;term no monitor-force cisco-nx2;command;nxos::WriteTerm;show running-config In router.db I have the device specified as this: nxlab1;cisco-nx2;up env NOPIPE=YES PATH=${PATH}:/opt/rancid/bin rancid -t cisco-nx2 -d nxlab1 loadtype: device type cisco-nx2 loadtype: found device type cisco-nx2 at /opt/rancid/etc/rancid.types.conf:21 executing clogin -t 90 -c"term no monitor-force;show running-config" nxlab1 PROMPT MATCH: NX65(\([^)#]+\))?\# HIT COMMAND:NX65# term no monitor-force In RunCommand: NX65# term no monitor-force HIT COMMAND:NX65# show running-config In WriteTerm: NX65# show running-config nxlab1: found exit nxlab1: End of run not found nxlab1: found_end is false The crazy part is that when rancid-run executes either in cron (using this rancid /opt/rancid/bin/rancid-run > /dev/null 2>&1) or run manually on the CLI like this: /opt/rancid/bin/rancid-run -r nxlab1 It's not actually using the cisco-nx2 "command" at all. I know this because I edited this line ProcessHistory("","","","!RANCID-CONTENT-TYPE: $devtype\n!\n"); to be ProcessHistory("","","","!RANCID-CONTENT-TYPE: QUICKLYLOSINGMYMIND\n!\n"); in /opt/rancid/lib/rancid/nxos.pm In the config file rancid-run creates it says this: !RANCID-CONTENT-TYPE: cisco In the config file that this creates env NOPIPE=YES PATH=${PATH}:/opt/rancid/bin rancid -t cisco-nx2 -d nxlab1 it says: !RANCID-CONTENT-TYPE: QUICKLYLOSINGMYMIND Do you have any idea why /opt/rancid/bin/rancid-run is doing it totally differently than the debug command? Also assuming I can even fix this issue is there some way to suppress the logging of "End of run not found" that you are aware of? Since it is expected that there would be no "end of run" for NXOS that message probably doesn't need to be logged. thank you very much. On 2026-05-14 14:38, Jethro Binks wrote: So rancid.types.base (from github repo) currently says: # SMC and Dell PowerConnect N2048, 34xx (config is incomplete), 35xx (3524, # 3524P, 3548, 3548P), N4032F, N4064, 62xxx, M6348, 64xx (6428), 7048, # M8024(-k), and R1-2401. smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal datadump smc;command;smc::ShowSys;show system smc;command;smc::ShowVer;show version smc;command;smc::Dir;dir smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config Is your device one of the listed models? It might be poorly tested if not. (It might be poorly tested if it is ? ). Anyway, it calls hlogin to log into the device and that was originally written for "hp" devices - but I guess it was functional enough to not need to write something specific. But it sends "no page" (directly in the script), which I guess isn't applicable for SMC. Google does suggest "terminal length 0" might work. On some systems there is no way to turn off paging (no idea about yours though), and so the parsing script has to handle finding and filtering out "--- more ---" lines and similar, which can often be painful. Smc.pm.in has several instances of: "# pager remnants like: ^H^H^H ^H^H^H content" so I guess there is some known paging imperfection here, and it might be a code versions have made changes. If your only problem is the directory listing changes, then simplest thing to do is to comment out the dir line: #smc;command;smc::Dir;dir If you want to keep all but the volatile ones, then you might look in smc.pm (or smc.pm.in if you are building from source) in sub Dir and modify it in some suitable way to match ones you don't want, maybe: ??????next if ( ????????/^aaafile\.prv/ || /^syslog\d+\.sys/ );???????? (is 'aaafile.prv' a real SMC file, or just a placeholder filename in the code?) It's very hard to keep on top of all the slight differences that appear even between different models in the same family or different code versions for a particular one from the same vendor, let alone between all vendors and their constantly shifting names, and the maintainer of rancid can only directly test a few of them and relies on reports or patches. Oxidized has similar issues, if their repo is anything to go by; I found the remark "I removed the "terminal datadump" from the porwerconnect.rb as these models doesn't have the command" in there at least. A well-written script should catch when an invalid command is sent and just move on. It should also catch valid commands for which the current user doesn't have permissions neatly too. For debugging, I'd do something like: env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin rancid -t smc -d devicename And you will get a .new and a .raw file that you can see a bit more about what's going on. Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Andrew Weaver Sent: 14 May 2026 6:27 PM To: Jethro Binks Cc: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] Completely disable mail functionality in 3.14? We use many different types. The one I am trying to fix right now is "smc" it doesn't seem like it sends 'term length 0' before looking at the configuration so there ends up being spaces in the configuration file in weird places as it paginates so it counts the exact same "configuration file" as having a diff in it.. It was this: smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal datadump smc;command;smc::ShowSys;show system smc;command;smc::ShowVer;show version smc;command;smc::Dir;dir smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config I'm not sure what "terminal datadump" is supposed to do as that command doesn't exist on our dell switches. So we'll end up seeing things like this in the configs and the configs are "updated" every time RANCID goes out to check the configuration file and I cannot figure out why since the configurations almost never actually change. "! interface vlan 1" So I tried changing it to: smc;script;rancid -t smc smc;login;hlogin smc;timeout;90 smc;module;smc smc;inloop;smc::inloop smc;command;rancid::RunCommand;terminal length 0 #smc;command;smc::ShowSys;show system #smc;command;smc::ShowVer;show version #smc;command;smc::Dir;dir #smc;command;smc::ShowVlan;show vlan smc;command;smc::WriteTerm;show running-config Is there any way to log what it's actually doing when it is running like as far as the commands and the responses? I'd like to get it to stop thinking that there is a configuration change every single time rancid-run is ran. thanks. On 2026-05-14 05:43, Jethro Binks wrote: What "devices" are you backing up? What rancid type are you using? Many of the rancid types have an exclusion for filenames that are known to be volatile and change and filter them out from processing, or else the time fields are filtered out. (eg in ios.pm: sub ShowFlash { ... # Drop these files entirely. /\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ && Next; ) Jethro. . . . . . . . . . . . . . . . . . . . . . . . . . Jethro R Binks, Network Manager, Information Services Directorate, University Of Strathclyde, Glasgow, UK The University of Strathclyde is a charitable body, registered in Scotland, number SC015263. ________________________________ From: Rancid-discuss on behalf of Andrew Weaver Sent: 13 May 2026 7:55 PM To: rancid-discuss at www.shrubbery.net Subject: Re: [rancid] Completely disable mail functionality in 3.14? Hello, I apologize for replying to myself but it seems like the reason it's trying to send that many emails is because it thinks that this is a change and so it's creating a diff for things like this: 38,39c38,39 < ! syslog1.sys r- 131072 -- 26-Apr-2016 15:15:24 < ! syslog2.sys r- 131072 -- 26-Apr-2016 15:15:24 --- > ! syslog1.sys r- 131072 -- 26-Apr-2016 15:26:39 > ! syslog2.sys r- 131072 -- 26-Apr-2016 15:26:39 We're solely using RANCID as a way to backup the configuration files on our devices. Is there any way to globally disable it checking the file dates on the syslog files on network devices? I noticed on other switches it appears to think that the wattage being used by the PSUs is a configuration change. Do I need to make a custom version of whatever commands it's running to exclude things that change constantly? On 2026-05-13 14:37, Andrew Weaver wrote: Hello, I noticed that the logs on our RANCID machine were growing quite large. I determined that it is because it's writing 10MB of this half of the time rancid-run runs: No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc So then I created a blank .esmtprc file that caused it to start logging two lines for each thing that I don't want it doing in the first place. ;) File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) permissions. open: /home/rancid/.esmtprc: Success OK fine, I fixed that. How do I just disable every single thing to do with SMTP .esmtprc, etc? Thank you so much if anyone can assist me. _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From aweaver at ee.net Fri May 15 16:16:45 2026 From: aweaver at ee.net (Andrew Weaver) Date: Fri, 15 May 2026 12:16:45 -0400 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> <67d94e10a1b4025759a40773dec1883e@ee.net> Message-ID: <8398adaf850192235b295808f7036097@ee.net> Hi, I figured out that the reason it was always using the "cisco" type is because that is what I told it to do originally in router.db and I didn't know I needed to delete the device from router.db, re-run rancid-run so that it "deletes it", and then re-add it with the "right" type before it would notice that the type had changed. I quickly ran into an additional minor problem which is I noticed that the NXOS perl module breaks entirely if you remove this from the list of commands: cisco-nx3;command;nxos::ShowVersion;show version It stops polling updates entirely without that command. So this will work: cisco-nx3;script;rancid -t cisco-nx3 cisco-nx3;login;clogin cisco-nx3;module;nxos cisco-nx3;inloop;nxos::inloop cisco-nx3;command;rancid::RunCommand;term no monitor-force cisco-nx3;command;nxos::ShowVersion;show version cisco-nx3;command;nxos::WriteTerm;show running-config but this will not: cisco-nx3;script;rancid -t cisco-nx3 cisco-nx3;login;clogin cisco-nx3;module;nxos cisco-nx3;inloop;nxos::inloop cisco-nx3;command;rancid::RunCommand;term no monitor-force Is there any way for the /user/ to know which commands can be missing and which cannot be or is that on like a perl module basis? That is really confusing. I still need to figure out how to get RANCID to stop trying to send email entirely but baby steps I guess. but thanks at least this one problem is no longer a thing. On 2026-05-15 04:14, Jethro Binks wrote: > Seems odd on the face of it, but a couple of suggestions: > > Verify which rancid.conf is in use; there are PATHs and PERL5LIB > variables in there. Check ENVFILE in /opt/rancid/bin/rancid-run is > pointing to where you think it is. > > Also perhaps: > > cisco-nx2;script;rancid -t cisco-nx > > Needs to be: > > cisco-nx2;script;rancid -t cisco-nx2 > > (I recently did an "alt version" like this for testing a dev version of > a module that others has the same package name etc, and it took a > couple of goes to get it right, it now works ok with: > > ### dev version > arubaoscx-dev;script;rancid -t arubaoscx-dev > arubaoscx-dev;login;clogin > arubaoscx-dev;inloop;arubaoscx::inloop > arubaoscx-dev;module;arubaoscx-dev > arubaoscx-dev;command;rancid::RunCommand;no page > arubaoscx-dev;command;arubaoscx::CommentOutput;show ip pim rp-set > arubaoscx-dev;command;arubaoscx::ShowConfiguration;show running-config > > ) > > Jethro. > > . . . . . . . . . . . . . . . . . . . . . . . . > . > > Jethro R Binks, Network Manager, > > Information Services Directorate, University Of Strathclyde, Glasgow, > UK > > The University of Strathclyde is a charitable body, registered in > Scotland, number SC015263. > > ------------------------- > > From: Andrew Weaver > Sent: 14 May 2026 8:21 PM > To: Jethro Binks > Cc: rancid-discuss at www.shrubbery.net > Subject: Re: [rancid] Completely disable mail functionality in 3.14? > > Okay, > > Thank you very much for that debug command that was helpful in > illustrating another problem I'm having. > > Note: I specifically built version 3.14 with /opt/rancid (using these > flags) because I have a 3.07 installed already in /usr/local/rancid... > > ./configure --prefix=/opt/rancid --localstatedir=/opt/rancid > > I created this in /opt/rancid/etc/rancid.types.conf [for NXOS] > > cisco-nx2;script;rancid -t cisco-nx > cisco-nx2;login;clogin > cisco-nx2;module;nxos > cisco-nx2;inloop;nxos::inloop > cisco-nx2;command;rancid::RunCommand;term no monitor-force > cisco-nx2;command;nxos::WriteTerm;show running-config > > In router.db I have the device specified as this: > > nxlab1;cisco-nx2;up > > env NOPIPE=YES PATH=${PATH}:/opt/rancid/bin rancid -t cisco-nx2 -d > nxlab1 > loadtype: device type cisco-nx2 > loadtype: found device type cisco-nx2 at > /opt/rancid/etc/rancid.types.conf:21 > executing clogin -t 90 -c"term no monitor-force;show running-config" > nxlab1 > PROMPT MATCH: NX65(\([^)#]+\))?\# > HIT COMMAND:NX65# term no monitor-force > In RunCommand: NX65# term no monitor-force > HIT COMMAND:NX65# show running-config > In WriteTerm: NX65# show running-config > nxlab1: found exit > nxlab1: End of run not found > nxlab1: found_end is false > > The crazy part is that when rancid-run executes either in cron (using > this rancid /opt/rancid/bin/rancid-run > /dev/null 2>&1) > > or run manually on the CLI like this: /opt/rancid/bin/rancid-run -r > nxlab1 > > It's not actually using the cisco-nx2 "command" at all. > > I know this because I edited this line > > ProcessHistory("","","","!RANCID-CONTENT-TYPE: $devtype\n!\n"); > > to be > > ProcessHistory("","","","!RANCID-CONTENT-TYPE: > QUICKLYLOSINGMYMIND\n!\n"); > > in /opt/rancid/lib/rancid/nxos.pm > > In the config file rancid-run creates it says this: > > !RANCID-CONTENT-TYPE: cisco > > In the config file that this creates > > env NOPIPE=YES PATH=${PATH}:/opt/rancid/bin rancid -t cisco-nx2 -d > nxlab1 > > it says: !RANCID-CONTENT-TYPE: QUICKLYLOSINGMYMIND > > Do you have any idea why /opt/rancid/bin/rancid-run is doing it totally > differently than the debug command? > > Also assuming I can even fix this issue is there some way to suppress > the logging of "End of run not found" that you are aware of? > > Since it is expected that there would be no "end of run" for NXOS that > message probably doesn't need to be logged. > > thank you very much. > > On 2026-05-14 14:38, Jethro Binks wrote: > > So rancid.types.base (from github repo) currently says: > > # SMC and Dell PowerConnect N2048, 34xx (config is incomplete), 35xx > (3524, > # 3524P, 3548, 3548P), N4032F, N4064, 62xxx, M6348, 64xx (6428), 7048, > # M8024(-k), and R1-2401. > smc;script;rancid -t smc > smc;login;hlogin > smc;timeout;90 > smc;module;smc > smc;inloop;smc::inloop > smc;command;rancid::RunCommand;terminal datadump > smc;command;smc::ShowSys;show system > smc;command;smc::ShowVer;show version > smc;command;smc::Dir;dir > smc;command;smc::ShowVlan;show vlan > smc;command;smc::WriteTerm;show running-config > > Is your device one of the listed models? It might be poorly tested if > not. (It might be poorly tested if it is ? ). > > Anyway, it calls hlogin to log into the device and that was originally > written for "hp" devices - but I guess it was functional enough to not > need to write something specific. But it sends "no page" (directly in > the script), which I guess isn't applicable for SMC. Google does > suggest "terminal length 0" might work. On some systems there is no > way to turn off paging (no idea about yours though), and so the parsing > script has to handle finding and filtering out "--- more ---" lines and > similar, which can often be painful. > > Smc.pm.in has several instances of: "# pager remnants like: ^H^H^H > ^H^H^H content" so I guess there is some known paging imperfection > here, and it might be a code versions have made changes. > > If your only problem is the directory listing changes, then simplest > thing to do is to comment out the dir line: > > #smc;command;smc::Dir;dir > > If you want to keep all but the volatile ones, then you might look in > smc.pm (or smc.pm.in if you are building from source) in sub Dir and > modify it in some suitable way to match ones you don't want, maybe: > > ??????next if ( > ????????/^aaafile\.prv/ || > /^syslog\d+\.sys/ > );???????? > > (is 'aaafile.prv' a real SMC file, or just a placeholder filename in > the code?) > > It's very hard to keep on top of all the slight differences that appear > even between different models in the same family or different code > versions for a particular one from the same vendor, let alone between > all vendors and their constantly shifting names, and the maintainer of > rancid can only directly test a few of them and relies on reports or > patches. Oxidized has similar issues, if their repo is anything to go > by; I found the remark "I removed the "terminal datadump" from the > porwerconnect.rb as these models doesn't have the command" in there at > least. > > A well-written script should catch when an invalid command is sent and > just move on. It should also catch valid commands for which the > current user doesn't have permissions neatly too. > > For debugging, I'd do something like: > > env NOPIPE=YES PATH=${PATH}:/usr/local/rancid/bin rancid -t smc -d > devicename > > And you will get a .new and a .raw file that you can see a bit more > about what's going on. > > Jethro. > > . . . . . . . . . . . . . . . . . . . . . . . . > . > > Jethro R Binks, Network Manager, > > Information Services Directorate, University Of Strathclyde, Glasgow, > UK > > The University of Strathclyde is a charitable body, registered in > Scotland, number SC015263. > > ------------------------- > > From: Andrew Weaver > Sent: 14 May 2026 6:27 PM > To: Jethro Binks > Cc: rancid-discuss at www.shrubbery.net > Subject: Re: [rancid] Completely disable mail functionality in 3.14? > > We use many different types. > > The one I am trying to fix right now is "smc" > > it doesn't seem like it sends 'term length 0' before looking at the > configuration so there ends up being spaces in the configuration file > in weird places as it paginates so it counts the exact same > "configuration file" as having a diff in it.. > > It was this: > > smc;script;rancid -t smc > smc;login;hlogin > smc;timeout;90 > smc;module;smc > smc;inloop;smc::inloop > smc;command;rancid::RunCommand;terminal datadump > smc;command;smc::ShowSys;show system > smc;command;smc::ShowVer;show version > smc;command;smc::Dir;dir > smc;command;smc::ShowVlan;show vlan > smc;command;smc::WriteTerm;show running-config > > I'm not sure what "terminal datadump" is supposed to do as that command > doesn't exist on our dell switches. > > So we'll end up seeing things like this in the configs and the configs > are "updated" every time RANCID goes out to check the configuration > file and I cannot figure out why since the configurations almost never > actually change. > > "! > > interface vlan 1" > > So I tried changing it to: > > smc;script;rancid -t smc > smc;login;hlogin > smc;timeout;90 > smc;module;smc > smc;inloop;smc::inloop > smc;command;rancid::RunCommand;terminal length 0 > #smc;command;smc::ShowSys;show system > #smc;command;smc::ShowVer;show version > #smc;command;smc::Dir;dir > #smc;command;smc::ShowVlan;show vlan > smc;command;smc::WriteTerm;show running-config > > Is there any way to log what it's actually doing when it is running > like as far as the commands and the responses? I'd like to get it to > stop thinking that there is a configuration change every single time > rancid-run is ran. > > thanks. > > On 2026-05-14 05:43, Jethro Binks wrote: > > What "devices" are you backing up? What rancid type are you using? > > Many of the rancid types have an exclusion for filenames that are known > to be volatile and change and filter them out from processing, or else > the time fields are filtered out. > > (eg in ios.pm: > > sub ShowFlash { > ... > # Drop these files entirely. > /\s+(private-multiple-fs|multiple-fs|LISP-MapCache-IPv\S+|nv_hdr)$/ && > Next; > > ) > > Jethro. > > . . . . . . . . . . . . . . . . . . . . . . . . > . > > Jethro R Binks, Network Manager, > > Information Services Directorate, University Of Strathclyde, Glasgow, > UK > > The University of Strathclyde is a charitable body, registered in > Scotland, number SC015263. > > ------------------------- > > From: Rancid-discuss on > behalf of Andrew Weaver > Sent: 13 May 2026 7:55 PM > To: rancid-discuss at www.shrubbery.net > Subject: Re: [rancid] Completely disable mail functionality in 3.14? > > Hello, > > I apologize for replying to myself but it seems like the reason it's > trying to send that many emails is because it thinks that this is a > change and so it's creating a diff for things like this: > > 38,39c38,39 > < ! syslog1.sys r- 131072 -- 26-Apr-2016 > 15:15:24 > < ! syslog2.sys r- 131072 -- 26-Apr-2016 > 15:15:24 > --- >> ! syslog1.sys r- 131072 -- 26-Apr-2016 >> 15:26:39 >> ! syslog2.sys r- 131072 -- 26-Apr-2016 >> 15:26:39 > > We're solely using RANCID as a way to backup the configuration files on > our devices. > > Is there any way to globally disable it checking the file dates on the > syslog files on network devices? > > I noticed on other switches it appears to think that the wattage being > used by the PSUs is a configuration change. > > Do I need to make a custom version of whatever commands it's running to > exclude things that change constantly? > > On 2026-05-13 14:37, Andrew Weaver wrote: > > Hello, > > I noticed that the logs on our RANCID machine were growing quite large. > > I determined that it is because it's writing 10MB of this half of the > time rancid-run runs: > > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > No configuration file found at /home/rancid/.esmtprc or /etc/esmtprc > > So then I created a blank .esmtprc file that caused it to start logging > two lines for each thing that I don't want it doing in the first place. > ;) > > File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) > permissions. > open: /home/rancid/.esmtprc: Success > > OK fine, I fixed that. > > How do I just disable every single thing to do with SMTP .esmtprc, etc? > > Thank you so much if anyone can assist me. > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss > > _______________________________________________ > Rancid-discuss mailing list > Rancid-discuss at www.shrubbery.net > https://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss _______________________________________________ Rancid-discuss mailing list Rancid-discuss at www.shrubbery.net https://www.shrubbery.net/mailman/listinfo/rancid-discuss -------------- next part -------------- An HTML attachment was scrubbed... URL: From randy at psg.com Sat May 16 11:28:07 2026 From: randy at psg.com (Randy Bush) Date: Sat, 16 May 2026 12:28:07 +0100 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: <8398adaf850192235b295808f7036097@ee.net> References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> <67d94e10a1b4025759a40773dec1883e@ee.net> <8398adaf850192235b295808f7036097@ee.net> Message-ID: > I figured out that the reason it was always using the "cisco" type is > because that is what I told it to do originally in router.db and I > didn't know I needed to delete the device from router.db, re-run > rancid-run so that it "deletes it", and then re-add it with the > "right" type before it would notice that the type had changed. i am probably misunderstanding, but ,,, not my experience. rancid seems to look for and process changes in router.db before using it randy From heas at shrubbery.net Sat May 16 13:50:07 2026 From: heas at shrubbery.net (heasley) Date: Sat, 16 May 2026 13:50:07 +0000 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: References: <73af9dde56734a95e58b0ae630da3b84@ee.net> <4ef56d4ee3c7a464cb5f3764295c91ea@ee.net> <67d94e10a1b4025759a40773dec1883e@ee.net> <8398adaf850192235b295808f7036097@ee.net> Message-ID: Sat, May 16, 2026 at 12:28:07PM +0100, Randy Bush: > > I figured out that the reason it was always using the "cisco" type is > > because that is what I told it to do originally in router.db and I > > didn't know I needed to delete the device from router.db, re-run > > rancid-run so that it "deletes it", and then re-add it with the > > "right" type before it would notice that the type had changed. > > i am probably misunderstanding, but ,,, > > not my experience. rancid seems to look for and process changes in > router.db before using it you are correct. it always reads the router.db file. From heas at shrubbery.net Sat May 16 13:56:00 2026 From: heas at shrubbery.net (heasley) Date: Sat, 16 May 2026 13:56:00 +0000 Subject: [rancid] Completely disable mail functionality in 3.14? In-Reply-To: <73af9dde56734a95e58b0ae630da3b84@ee.net> References: <73af9dde56734a95e58b0ae630da3b84@ee.net> Message-ID: Wed, May 13, 2026 at 02:37:00PM -0400, Andrew Weaver: > File /home/rancid/.esmtprc must have no more than -rwx--x--- (0710) > permissions. > open: /home/rancid/.esmtprc: Success > > OK fine, I fixed that. > > How do I just disable every single thing to do with SMTP .esmtprc, etc? I have no idea about this kinky esmtprc thing. imo, ignore that. If you wish to discard all email, create a script that discards its input and update rancid.conf to use it. something like: # Set to the name of the sendmail executable (or script) that will accept the # -t option to take its rcpt and other headers from stdin and $MAILOPTS (see # below). SENDMAIL="/home/rancid/bin/discard" % cat > /home/rancid/bin/discard << EOF #!/bin/bash cat > /dev/null EOF