Incoming network traffic per uid / projid
Hi,
I am running Solaris10 (11/04) on x86.
Because it's running nice I would like to give some of my friends access to it.
But there is one problem, I've got a traffic limit with my ISP and if I get over the limit I have to pay additional for the next beginning GBs.
I am afraid some of my friends could waste traffic (unwilling).
That's why I would like to set limits for them.
I already got ipqos accounting working, getting the count of outgoing bytes for uid ... for example.
Unfortunately its not possible to count the incoming traffic for specific uids or projids, since both are -1 for incoming traffc.
But my ISP counts incoming + outgoing traffic of course.
How could I get the count of incoming bytes, for a specific uid / projid ?
Help would be very appreciated.
[850 byte] By [
J0hnM] at [2007-11-26 0:43:58]

# 2
hi, for outgoing traffic its easy, just follow the steps below.
Unfortunately for incoming traffic its impossible yet. I would like to see this changed in the final sol10, but I don't think it will be realized.
I have to keep using Linux and a patched version of the ipt_owner module. (It's easily done and works)
I don't need any of Solaris great new features as long as it's not possible to control the amount of traffic for my users. It's a shame to see Solaris 10, the "most modern Unix operating environment" lacking this ability.
Anyone knows where to suggest it to the developers of the ipqos project ?
I hope someone will get notice of this.
To get the outgoing traffic for user root:
1. flush old config
ipqosconf -f
2. put this to /etc/inet/ipqosconf
fmt_version 1.0
action {
module ipgpc
name ipgpc.classify
filter {
name myfilter
class meter_myapp
user root
}
class {
name meter_myapp
enable_stats true
next_action acct
}
params {
global_stats true
}
}
action {
module flowacct
name acct
params {
global_stats true
max_limit 2048
next_action continue
}
}
3. apply the config
cat /etc/inet/ipqosconf | ipqosconf -va -
4. check the stats
kstat -m flowacct
Also you may want to take a look at the docs:
http://docs.sun.com/app/docs/doc/816-4554/6maoq027n?q=ipqos&a=view
J0hnM at 2007-7-5 19:39:36 >
