All other Cisco networking related discussions.
User avatar
m4rtin
Senior Member
Posts:
398
Joined:
Thu Sep 17, 2009 3:06 pm

"service timestamps log" uptime or datetime

Fri Feb 03, 2012 4:06 am

In which case it's useful or needed to timestamp log or debug messages with time since the last reload("service timestamps log uptime")? Is anyone using this in practice? :roll:

User avatar
Dinger
Post Whore
Posts:
1397
Joined:
Fri Apr 25, 2008 2:16 pm
Certs:
CCNP, CCNA:Sec, MCSE

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 9:06 am

I use 'service timestamps log datetime localtime' on all my stuffs.
"A problem well stated is a problem half solved". (Charles Kettering)

User avatar
Teebor
Ultimate Member
Posts:
581
Joined:
Thu Jun 23, 2011 3:17 pm
Certs:
CCNA, CCNA Security

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 9:13 am

Same here, always on
Networking is much like making love to a beautiful woman
Slide your equipment in to the rack, Stick your plug in the socket, and if you have done it right at the end everyone is happy

User avatar
ristau5741
Post Whore
Posts:
10340
Joined:
Tue Aug 21, 2007 2:15 pm
Certs:
Instanity

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 9:59 am

we add the msec option in the logging, for more accurate event timing

service timestamps log datetime msec localtime
Tips of the day:
- The human mind is the ultimate creation invention.
- I have so many customers, my customers have customers.
- Sausage time
- POP, stack, and store

User avatar
swagger
Post Whore
Posts:
1395
Joined:
Mon Nov 23, 2009 7:55 pm
Certs:
CCNP, CCNA Sec

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 11:29 am

I always use datetime and msec for more accurate timing. If you use uptime, you have to do math which wastes time in my opinion.

User avatar
Carlitos_30
Post Whore
Posts:
1222
Joined:
Mon Feb 08, 2010 9:30 am
Certs:
CCENT, CCNA,CCNP R&S

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 12:08 pm

I always use datetime and msec for more accurate timing. If you use uptime, you have to do math which wastes time in my opinion.


Not to mention when days or weeks have elapsed:

18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.142.1 not on common subne
t for Vlan14
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.139.1 not on common subne
t for Vlan11
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.141.1 not on common subne
t for Vlan13
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.139.1 not on common subne
t for Vlan11
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.141.1 not on common subne
t for Vlan13
Feb 3 14:08:40: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastE
thernet0/4 (10), with SWITCH2 FastEthernet0/5 (2).
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.139.1 not on common subne
t for Vlan11
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.142.1 not on common subne
t for Vlan14
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.138.1 not on common subne
t for Vlan10
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.139.1 not on common subne
t for Vlan11
18w5d: IP-EIGRP(Default-IP-Routing-Table:150): Neighbor 10.6.141.1 not on common subne

How the hell do you know at what time an event has ocurred?
Last edited by Carlitos_30 on Fri Feb 03, 2012 12:11 pm, edited 3 times in total.

User avatar
jdsilva
Post Whore
Posts:
5347
Joined:
Mon Jan 17, 2005 11:01 pm
Certs:
CCNP

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 12:10 pm

At a previous job we had a customer who had the uptime stamps on their gear... And there was a specific reason why they could not use the datetime stamps... But I'll be damned if I remember what that was.

uptime sucks. I avoid it.

User avatar
ristau5741
Post Whore
Posts:
10340
Joined:
Tue Aug 21, 2007 2:15 pm
Certs:
Instanity

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 1:34 pm

Carlitos_30 wrote:
How the hell do you know at what time an event has ocurred?



show ver
tells you time singe last reboot, little math and your in.
Tips of the day:
- The human mind is the ultimate creation invention.
- I have so many customers, my customers have customers.
- Sausage time
- POP, stack, and store

User avatar
Carlitos_30
Post Whore
Posts:
1222
Joined:
Mon Feb 08, 2010 9:30 am
Certs:
CCENT, CCNA,CCNP R&S

Re: "service timestamps log" uptime or datetime

Fri Feb 03, 2012 3:53 pm

show ver
tells you time singe last reboot, little math and your in.


Yes, but if you rest "18w5d" to the "show ver" uptime, doesn't tell you an specific hour like 13:51:24, and this specific hour is always important.

'

Return to Cisco General

Who is online

Users browsing this forum: SzymonS92 and 10 guests

      cron