D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Strange network / perl problem



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 02 July 2002 5:32 pm, Steve Marvell wrote:
open(IPTABLES, "-|", "/sbin/iptables -L cust_acct -n -v -x");

Why do you call that twice?

i call -L cust_acct once, and -L tcp_acct once - one time is for TCP 
accouting, the other for the customers transfer rate.

- If it's inetd, I guess it just dups your stdout to its accepted
  socket. Or does it feed it by readin your stdout. In any case,
  you might be beuffering, so that might be worth sorting.

inetd reads from socket and feeds into stdin of the script, and then sends 
stdout to the socket - i don't think it dup()'s at all iirc, just a plain 
feed.

i've $|=1 now, lets see if that helps, though it shouldn't at all.

- Does this happen if you run it outside of inetd?

by running from the console? nope... though it seems to be very irregular, so 
can't be 100% sure.

- Any chance you can keep a running total of the data incoming from the
  socket and print it at the end of the error message. That might give
  some clue, if it's a "round" number.

goood idea.

- -w, as said.

added, after a bit of tweaking (so it doesn't print useless messages), but 
didn't help just now :/ I'll add to the client, too.

~ Theo

- -- 

Theo Zourzouvillys
http://zozo.org.uk/

You will experience a strong urge to do good; but it will pass.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Idgk448CrwpTn6YRAtARAJ4v4YgJdRaJDEnBgO+j0zaYGXVjfACfWwlZ
mSxq220q3SLj97vcOVpMUgA=
=9xMb
-----END PGP SIGNATURE-----


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly