Forum Discussion
How to remove iStats keys
Hi Piotr,
unfortuantely there is no easy to use
istats remove all
command... 😞
A while ago, I've used the following bash command to delete my ISTATS data.
istats dump 2>&1>/dev/null | sed "s/\[//g;s/\]//g;s/=/ /g" | awk '{ print "istats remove \"" $1 " " $2 " counter " $3 "\"" }' | bash -x ;
sleep 15s
istats dump 2>&1>/dev/null | sed "s/\[//g;s/\]//g;s/=/ /g" | awk '{ print "istats remove \"" $1 " " $2 " string " $3 "\"" }' | bash -x ;
sleep 15s
istats dump 2>&1>/dev/null | sed "s/\[//g;s/\]//g;s/=/ /g" | awk '{ print "istats remove \"" $1 " " $2 " gauge " $3 "\"" }' | bash -x ;
sleep 15s
istats dump 2>&1>/dev/null | sed "s/\[//g;s/\]//g;s/=/ /g" | awk '{ print "istats remove \"" $1 " " $2 " min " $3 "\"" }' | bash -x ;
sleep 15s
istats dump 2>&1>/dev/null | sed "s/\[//g;s/\]//g;s/=/ /g" | awk '{ print "istats remove \"" $1 " " $2 " max " $3 "\"" }' | bash -x ;
Note: The command parses the output of
and then creates and executes a tailordered script to finaly remove the containing data. Its unfortunately required to call the command up to 5 times in a row, since istats dump
does not output the used istats dump
(but it has to match while removing). The measure-type
command makes sure that ISTATS updates the statistic between the independent executions to reduce overhead.sleep 15s
Note: Use the script at your own risk 😉
Cheers, Kai
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com