Have a look at the attachement. These are bits and pieces extracted from the perl source, I hope it is readable enough. A few comments: - I use a "pipe" of values to average read points taken at each run of the loop. This way I can avoid voting for shutdown just because of a single glitch, and add some inertia to the system. That's not the brightest system, for example a recent activity mark might be more meaningful than one that is 10 min. old. - the sum of each pipes gives the active/idle status of each feature (afp, nfs...), then this value is modified with a weight %. The weight is useful when debugging (set to 0 to disable a cause of suspension) and to deal with stuck connections. - In the attached code I finally check against a magic value of 0.185 to decide if the machine is active or not. This was defined through trail and error.
About Net:: Daemon, you can have a look on CPAN ( www.cpan.org ) to learn more. HTH +-------------------------------------------------------------------+ |Filename: bits_pl.txt | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=8897| +-------------------------------------------------------------------+ -- epoch1970 ------------------------------------------------------------------------ epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711 View this thread: http://forums.slimdevices.com/showthread.php?t=72608 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/unix
