File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
# This script receive tcpdump output through STDIN and does:
4
4
#
5
- # 1. extract outgoing TCP packet length on all devices port 5432 and 6543
5
+ # 1. extract outgoing TCP packet length on the 1st non-loopback device port 5432 and 6543
6
6
# 2. sum the length up to one minute
7
7
# 3. save the total length to file (default is /tmp/pg_egress_collect.txt) per minute
8
8
#
9
9
# Usage:
10
10
#
11
- # tcpdump -s 128 -Q out -i any - nn -tt -vv -p -l 'tcp and (port 5432 or port 6543)' | perl pg_egress_collect.pl -o /tmp/output.txt
11
+ # tcpdump -s 128 -Q out -nn -tt -vv -p -l 'tcp and (port 5432 or port 6543)' | perl pg_egress_collect.pl -o /tmp/output.txt
12
12
#
13
13
14
14
use POSIX;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ Description=Postgres Egress Collector
3
3
4
4
[Service]
5
5
Type=simple
6
- ExecStart=/bin/bash -c "tcpdump -s 128 -Q out -i any - nn -tt -vv -p -l 'tcp and (port 5432 or port 6543)' | perl /root/pg_egress_collect.pl"
6
+ ExecStart=/bin/bash -c "tcpdump -s 128 -Q out -nn -tt -vv -p -l 'tcp and (port 5432 or port 6543)' | perl /root/pg_egress_collect.pl"
7
7
User=root
8
8
Slice=services.slice
9
9
Restart=always
You can’t perform that action at this time.
0 commit comments