cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2810
Views
0
Helpful
3
Replies

TCL script current data and time stamp

peraocompany
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

Just use arr_einfo(event_pub_time).

View solution in original post

3 Replies 3

Joe Clarke
Cisco Employee
Cisco Employee

Just use arr_einfo(event_pub_time).

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

It is normal?

1373609941.467

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)]

Review Cisco Networking for a $25 gift card