Forum Discussion
how to capture bigtop output to file
as u know ,in linux ,we can capture top command output to file,like this url: http://www.thegeekstuff.com/2009/10/how-to-capture-unix-top-command-output-to-a-file-in-readable-format/
but bigtop is no parameters like "-n" and only have "once" ,Unfortunately,with “once” ,can't get "bits in prior" data every 4 second
my purpose is get virtual server traffic like this (bold):
VIRTUAL name |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up--
/Common/something 6.215T 140.9T 17.54M 46.61M 1.125G 114 1
help,thanks!
7 Replies
- nathe
Cirrocumulus
See the following Devcentral post:
It shows the following command which you could then output to a text file:
while [ 1==1 ]; do bigtop -bytes -nosort -n -vips 10 -nodes 0 -once |grep "10\.254\.254\.10"; sleep 2; doneDoes this help?
N
- nitass
Employee
e.g.
[root@ve11b:Active:In Sync] tmp bigtop -n -scroll 0<&- > /var/tmp/bigtop.out ^C [root@ve11b:Active:In Sync] tmp cat /var/tmp/bigtop.out | bits since | bits in prior | current | Feb 19 18:55:48 | 0 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:41 ve11b.acme.local 6.110G 674.8M 1011 0 0 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:45 ve11b.acme.local 6.111G 674.8M 1011 239080 0 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:49 ve11b.acme.local 6.111G 674.8M 1011 247816 8096 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:53 ve11b.acme.local 6.111G 674.8M 1011 240800 0 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:57 ve11b.acme.local 6.112G 674.8M 1011 357760 0 0- shengyun_152433
Nimbostratus
thanks! if remove ctrl c that is better - Snl
Cirrostratus
can this output send to email
- nitass_89166
Noctilucent
e.g.
[root@ve11b:Active:In Sync] tmp bigtop -n -scroll 0<&- > /var/tmp/bigtop.out ^C [root@ve11b:Active:In Sync] tmp cat /var/tmp/bigtop.out | bits since | bits in prior | current | Feb 19 18:55:48 | 0 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:41 ve11b.acme.local 6.110G 674.8M 1011 0 0 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:45 ve11b.acme.local 6.111G 674.8M 1011 239080 0 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:49 ve11b.acme.local 6.111G 674.8M 1011 247816 8096 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:53 ve11b.acme.local 6.111G 674.8M 1011 240800 0 0 VIRTUAL ip:port |---In----Out---Conn-|---In----Out---Conn-|-Nodes Up-- /Common/172.28.24.10:80 46256 92584 10 0 0 0 2 /Common/0.0.0.0:any 0 0 0 0 0 0 0 NODE ip:port |---In----Out---Conn-|---In----Out---Conn-|--State---- /Common/200.200.200.101:8080 16760 54760 2 0 0 2 UNCHECKED /Common/200.200.200.111:8080 7424 10976 2 0 0 2 UNCHECKED /Common/200.200.200.111:80 0 0 0 0 0 0 UNCHECKED | bits since | bits in prior | current | Feb 19 18:55:48 | 4 seconds | time BIG-IP ACTIVE |---In----Out---Conn-|---In----Out---Conn-| 18:46:57 ve11b.acme.local 6.112G 674.8M 1011 357760 0 0- shengyun_152433
Nimbostratus
thanks! if remove ctrl c that is better - Snl
Cirrostratus
can this output send to email
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
