# LTM Pulling traffic stats with CLI

**URL:** <https://community.f5.com/t/ltm-pulling-traffic-stats-with-cli/56547>\
**Category:** Technical Forums\
**Tags:** devops, ltm\
**Created:** [March 26, 2020, 7:32pm UTC](https://community.f5.com/t/ltm-pulling-traffic-stats-with-cli/56547 "2020-03-26T19:32:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarryC](https://avatars.discourse-cdn.com/v4/letter/h/d26b3c/32.png) [@HarryC](https://community.f5.com/u/HarryC)\
**Post date:** [March 26, 2020, 7:32pm UTC](https://community.f5.com/t/ltm-pulling-traffic-stats-with-cli/56547/1 "2020-03-26T19:32:18Z")

</div>

Need to get historic data in csv, or some kind of text.

I need to do some calculations against the number of visits in each day - as shown in

Statistics \>\> Moule Stats :Local Traffic \>\>Pools&nbsp;the [Connections | Total / Pool} number .

**Is there a way to pull the historic data from the CLI ?**

If only the Total/Member number is available then I can do the math.

As a fall back I can gather and clear periodically, if I could only clear from the CLI - **how do I clear the counters from the CLI ?**

[harryc@bigipprod05:Active:Changes Pending] ~ # tmsh show ltm node

------------------------------------------

Ltm::Node: AEMweb01 (192.168.3.91)

------------------------------------------

Status

Availability&nbsp;&nbsp;: available

State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: enabled

Reason&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Node address is available

Monitor&nbsp;&nbsp;&nbsp;&nbsp;: /Common/icmp (default node monitor)

Monitor Status : up

Session Status : enabled

Traffic&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ServerSide&nbsp;General

Bits In&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;61.1G&nbsp;&nbsp;&nbsp;&nbsp;-

Bits Out&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.7T&nbsp;&nbsp;&nbsp;&nbsp;-

Packets In&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;40.3M&nbsp;&nbsp;&nbsp;&nbsp;-

Packets Out&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;57.6M&nbsp;&nbsp;&nbsp;&nbsp;-

Current Connections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25&nbsp;&nbsp;&nbsp;&nbsp;-

Maximum Connections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;178&nbsp;&nbsp;&nbsp;&nbsp;-

Total Connections&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.4M&nbsp;&nbsp;&nbsp;&nbsp;-

Total Requests&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;2.7M

Current Sessions&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;0

------------------------------------------

Ltm::Node: cq5redir03 (192.168.3.51)

------------------------------------------

Status

Availability&nbsp;&nbsp;: available

---

<div class="post-metadata">

**Author:** ![Siavash](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@Siavash](https://community.f5.com/u/Siavash)\
**Post date:** [March 31, 2020, 10:17am UTC](https://community.f5.com/t/ltm-pulling-traffic-stats-with-cli/56547/2 "2020-03-31T10:17:19Z")

</div>

The simplest way is to create a script and schedule them via cron and execute them daily. the output of script had to write in a file.
