Hi All,
This is regarding Cisco Routers. I need to find out updated or
modified date and time of the running config file. I have to get that
in my program and check against another date.
Connection to the Cisco router is through SSH or TELNET.
How can I get the modified date? Any Idea?
Thanks in Advance
Kiran
|
|
0
|
|
|
|
Reply
|
kiranreddyd (7)
|
1/11/2005 9:57:10 AM |
|
Hi,
<kiranreddyd@gmail.com> schrieb im Newsbeitrag =
news:1105437430.574927.259790@f14g2000cwb.googlegroups.com...
| How can I get the modified date? Any Idea?
In enable mode, just set it manually:
clock set 2005 jan 11 12:20:00
Or by a NTP Server:
ntp <IP address from a NTP Server>
maybe your router doesn=B4t understand "ntp", just use "sntp" <IP =
adress>
Maybe you find a ntp server from this link:
http://ntp.isc.org/bin/view/Servers/NTPPoolServers
or just google for ntp server lists.
If your router support "ntp master", then you can also use it as a ntp =
server for your own hosts.
With the command clock timezone, you can specify a timezone, maybe "+" =
or "-" a few hours of UTC time. Or specify set the clock automaticcly =
when summer or wintertime starts.
Regards
Carsten Remien
--=20
(Use ROT13 to see my email address)
|
|
0
|
|
|
|
Reply
|
Remien
|
1/11/2005 11:30:51 AM
|
|
Remien, Carsten wrote:
> If your router support "ntp master", then you can also use it as a ntp server for your own hosts.
That's a popular misconception. However, 'ntp master' is not needed for
a Cisco router to serve time to clients. It will do that by default when
it is synchronized to another NTP server.
What it is for, is to have it serve time even if it itself is *not*
synchronized to another NTP server.
Regards,
Marco.
|
|
0
|
|
|
|
Reply
|
M
|
1/11/2005 11:44:37 AM
|
|
Hi,
"M.C. van den Bovenkamp" <marco@linuxgoeroe.dhs.org> schrieb im =
Newsbeitrag news:41e3bc25$0$46723$e4fe514c@dreader13.news.xs4all.nl...
| That's a popular misconception.
Thank=B4s, I=B4ll try that out
Regards
Carsten Remien
--=20
(Use ROT13 to see my email address)
|
|
0
|
|
|
|
Reply
|
Remien
|
1/11/2005 12:33:35 PM
|
|
In article <34hrnaF4bhndqU1@individual.net>,
Remien, Carsten <arjf.erzvra@tzk.vasb> wrote:
:<kiranreddyd@gmail.com> schrieb im Newsbeitrag =
:news:1105437430.574927.259790@f14g2000cwb.googlegroups.com...
:| How can I get the modified date? Any Idea?
:In enable mode, just set it manually:
:clock set 2005 jan 11 12:20:00
The OP was asking about the modification date of the configuration
files, not about how to set the system clock.
--
Feep if you love VT-52's.
|
|
0
|
|
|
|
Reply
|
roberson
|
1/11/2005 12:46:39 PM
|
|
Excatly, I am referring to the modified date of the Running Config File
and not how to set the system clock.
That too I need to know that date in the program for my
manipulations....
Is there any command(s) for that purpose?
Regards
Kiran
|
|
0
|
|
|
|
Reply
|
kiranreddyd
|
1/11/2005 1:04:30 PM
|
|
In article <1105437430.574927.259790@f14g2000cwb.googlegroups.com>,
<kiranreddyd@gmail.com> wrote:
:This is regarding Cisco Routers. I need to find out updated or
:modified date and time of the running config file. I have to get that
:in my program and check against another date.
:Connection to the Cisco router is through SSH or TELNET.
:How can I get the modified date? Any Idea?
My IOS system isn't connected right at the moment, so I can't tell
if there are easier methods, but one mechanism is to
tftp the running config to a system, and then look at the first
few lines of the output. For example,
!
! Last configuration change at 22:35:26 CST Tue Dec 14 2004
! NVRAM config last updated at 22:07:56 CST Tue Dec 14 2004
-Possibly- the same information would show up at the top of
"show running-configuration", but I do not know for sure.
--
"WHEN QUINED, YIELDS A TORTOISE'S LOVE-SONG"
WHEN QUINED, YIELDS A TORTOISE'S LOVE-SONG. (GEB)
|
|
0
|
|
|
|
Reply
|
roberson
|
1/11/2005 1:26:12 PM
|
|
Thanks!
But I have to get the modified date programatically to do some
manipulation.....
Even if show running-config gives me the inforamtion...the whole
config info has to be retrieved for this purpose...
I have to retrieve the modfied date very frequently in my program
and retrieving the whole config info every time will be a performance
issue.
Is there any better ways of retrieving the modified date?
Regards
Kiran
|
|
0
|
|
|
|
Reply
|
kiranreddyd
|
1/11/2005 2:18:24 PM
|
|
The date is not stored outside of the file, if you do a "dir nvram:"
you will see that the files have no date.
If you dont want to get the config file, you could try to use the
Expect application, to telnet to the device and get only the
information you are looking for.
Search for expect cisco as many scripts already exist.
|
|
0
|
|
|
|
Reply
|
spolifemo
|
1/11/2005 3:17:18 PM
|
|
The date is not stored outside of the file, if you do a "dir nvram:"
you will see that the files have no date.
If you dont want to get the config file, you could try to use the
Expect application, to telnet to the device and get only the
information you are looking for.
Search for expect cisco as many scripts already exist.
|
|
0
|
|
|
|
Reply
|
spolifemo
|
1/11/2005 3:17:33 PM
|
|
In article <1105453104.809905.8950@f14g2000cwb.googlegroups.com>,
<kiranreddyd@gmail.com> wrote:
:But I have to get the modified date programatically to do some
:manipulation.....
:Even if show running-config gives me the inforamtion...the whole
:config info has to be retrieved for this purpose...
The examples on cisco.com indicated that 'show running-config'
gives you the desired information, so you could set the terminal
page length to very short before sending the command, and then quit out at
the first pager prompt.
:I have to retrieve the modfied date very frequently in my program
:and retrieving the whole config info every time will be a performance
:issue.
:Is there any better ways of retrieving the modified date?
For performance, up to roughly 50 times a second, you would
be best off finding an SNMP OID that gave the required information.
I do not know if there is one; if there is, it probably depends
on the IOS version and the hardware model. But the existance of
the OID is a moot point as you indicated that you would be using
telnet or ssh for the programatic access.
See also the fairly new changes documented at
http://www.cisco.com/en/US/products/sw/iosswrel/ps5207/products_feature_guide09186a00801d1e81.html
Would it perhaps make more sense to be actively notified of
configuration changes via an snmp trap? See the 'snmp-server' command.
--
Whose posting was this .signature Google'd from?
|
|
0
|
|
|
|
Reply
|
roberson
|
1/11/2005 3:43:48 PM
|
|
In article <1105456653.017767.47470@f14g2000cwb.googlegroups.com>,
<spolifemo@aquarionwater.com> wrote:
:The date is not stored outside of the file, if you do a "dir nvram:"
:you will see that the files have no date.
The second clause of that sentance may be true but the first clause
is not. If you show running-config then the system displays the
two dates as one of the very first things. When you show running-config
the system is not displaying an actual file: it is building
up a representation of the in-memory configuration and printing
that out in a human readable form. In order for it to be able
to do that and show the change timestamps, the implication
is that the date -is- stored somewhere on the system.
--
'ignorandus (Latin): "deserving not to be known"'
-- Journal of Self-Referentialism
|
|
0
|
|
|
|
Reply
|
roberson
|
1/11/2005 3:56:47 PM
|
|
|
11 Replies
233 Views
(page loaded in 0.108 seconds)
|