TrafIP is a handy little tool for monitoring your traffic and bandwidth. It's super lightweight, just three files, and works great with PHP and Linux (or any Unix/BSD system). You’ll love how it keeps you updated every 6 seconds, showing you real-time data right when you need it. Plus, did I mention it's FREE?
With TrafIP, you get some cool options:
Getting started with TrafIP is a breeze! Just add a few lines to your firewall or set it up to run automatically. After that, modify the collect.sh
script using results from iptables -L -n
. And don’t forget to place those .php files where you can access them through the web!
The output file needs to be in the same directory as your PHP files. By default, if nothing is selected, it shows traffic from the last hour. It’s pretty much live—updating every 6 seconds!
[root@lair trafip]# iptables -A OUTPUT -s 0.0.0.0/0 -d 127.0.0.1
[root@lair trafip]# iptables -A INPUT -d 0.0.0.0/0 -s 127.0.0.1
[root@lair trafip]# iptables -L -n|grep 127|grep -v ACCEPT|grep -v LOG|grep -v DROP
all -- 127.0.0.1 0.0.0.0/0
all -- 0.0.0.0/0 127.0.0.1
You’ll want to grab those strings "127.0.0.1 0.0.0.0/0" and "0.0..." from above and plug them into collect.sh
. Make sure everything matches perfectly!
Edit img.php
, setting up variables like:
Your output file will look something like: 11/12/02... OUTPUT_counter
Go to the Softpas website, press the 'Downloads' button, and pick the app you want to download and install—easy and fast!
SoftPas is your platform for the latest software and technology news, reviews, and guides. Stay up to date with cutting-edge trends in tech and software development.
Subscribe to newsletter
© Copyright 2024, SoftPas, All Rights Reserved.