LASTHOSTUP

Thomas Guyot-Sionnest dermoth at aei.ca
Thu Aug 21 00:47:47 CEST 2008


-----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 at 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





More information about the Users mailing list