-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 20/08/08 06:43 PM, Thomas Guyot-Sionnest wrote: > On 20/08/08 11:07 AM, James wrote: >> I am using Solaris and there is no %s so I tried %S. > > This will give you the current second (0-59) which won't work. Try this > instead: > > $((`perl -e "print time"` - $LASTHOSTUP$)) > > You may need the full path to perl though... >
Or this which is almost twice as fast on my 200MHz SPARC: $((`nawk 'BEGIN{print srand()}'` - $LASTHOSTUP$)) - -- Thomas -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIrJ8T6dZ+Kt5BchYRAinSAJwMxe+5m+9OIwSst/TQ4ERuSyhtyACfQC8E hQkkV8sdrAPPon4b5yMlMB0= =nB/w -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null