Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

TCL script current data and time stamp

Hello I try found easy way add current data and time stamp to my file (generated from TCL script)

syslog message type is:

Jul 11 21:39:31: %ILPOWER-5-IEEE_DISCONNECT: Interface Fa0/6: PD removed

I plan do it uses

regular variables

array set arr_einfo $marr_einfo(1)

set syslog_msg [regexp {first 17 simbols}$arr_einfo(msg)]

Maybe I not see more easy way?

Thank you.

3 REPLIES
Cisco Employee

TCL script current data and time stamp

Just use arr_einfo(event_pub_time).

New Member

TCL script current data and time stamp

Hello Joseph, thank you for reply. I try use this erly and i recieve not regular data (unix time)

It is normal?

1373609941.467

New Member

Re: TCL script current data and time stamp

I cannot fount, than format Cisco provide for this variable arr_einfo(event_pub_time) [current time or unix epoch timestamp]

But on my devise work this code:

set syslog_time [clock format $arr_einfo(event_pub_sec)]

729
Views
0
Helpful
3
Replies