Page 1 of 1

how to define SERVICE-LEVEL

Posted: Mon Dec 06, 2010 7:09 am
by packets
By default service level of user was 0. Is there a way wherein new added user should have a service level of 25. I created a rule which has service level of 25 and I want all users including new users to have a service level of 25.

Thanks,


Packets

Re: how to define SERVICE-LEVEL

Posted: Mon Dec 06, 2010 12:51 pm
by packets
If not possible, I think the solution is to monitor if there are other user and change its service level. My problem how would I know if there are new created user?

Re: how to define SERVICE-LEVEL

Posted: Tue Dec 07, 2010 8:43 am
by les
packets wrote:If not possible, I think the solution is to monitor if there are other user and change its service level. My problem how would I know if there are new created user?


You could write a script which did something like....

# Very crude example, i'm sure it could be done better ;)
# Who isn't at service level 25?
omshowu -v ne25 > /tmp/list

for each in `cut -f2 -d"=" /tmp/list |grep -v "The Following"
do
ommodu -o "$each" -s 25
mail -s "modified $each service level" admin@myserver.com < /dev/null
done

Run it regularly via cron.

That should give you a good starting point.

Re: how to define SERVICE-LEVEL

Posted: Tue Dec 07, 2010 10:54 am
by packets
les wrote:
packets wrote:If not possible, I think the solution is to monitor if there are other user and change its service level. My problem how would I know if there are new created user?


You could write a script which did something like....

# Very crude example, i'm sure it could be done better ;)
# Who isn't at service level 25?
omshowu -v ne25 > /tmp/list

for each in `cut -f2 -d"=" /tmp/list |grep -v "The Following"
do
ommodu -o "$each" -s 25
mail -s "modified $each service level" admin@myserver.com < /dev/null
done

Run it regularly via cron.

That should give you a good starting point.


Thanks. But as someone recommended on my other post, it will be much better if I create the same rule but with Service Level 0. With this, I don't need to think anymore of new users because service level 0 was already define

Re: how to define SERVICE-LEVEL

Posted: Tue Dec 07, 2010 4:47 pm
by les
packets wrote:
Thanks. But as someone recommended on my other post, it will be much better if I create the same rule but with Service Level 0. With this, I don't need to think anymore of new users because service level 0 was already define


That was me on your other post ;)