07-22-2010 03:57 AM
Hello,
How can the floating point be modified in a event manager tcl script ?
Currently I am trying to write a tcl script to check for disk utilization. I am dividing the free space upon the total space to get a percentage.
and I am always getting "0", so no floating point.
I have tried to modifiy the "floating point" with set tcl_precision but I get the following error :
--> can't set "tcl_precision": can't modify precision from a safe interpreter
Is there a way to modify the floating point ?
I appreciate very much the help on this issue,
Thank you in advance,
Solved! Go to Solution.
07-22-2010 06:51 AM
IOS doesn't do floating point. You can trick it, though, with something like:
set used [expr ${free}.0 / ${total}.0]
07-22-2010 06:51 AM
IOS doesn't do floating point. You can trick it, though, with something like:
set used [expr ${free}.0 / ${total}.0]
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide