Suspend when no network traffic
I've got a small Gentoo Linux box set up as http server.
Not much people will visit it, so I want to suspend the system when there's no network traffic.
I've already done some little research, so here's my plan:
When transfer values in /proc/net/dev aren't changed, let's say, for 15 minutes, then the system will enter S3 sleep state.
I don't have any Perl scripting experience, so is there anyone who can help me out?
Thanks in advance!
|