lastcomm-duration.pl 4
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 2 May 2009 14:46:34 +0000 (14:46 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 2 May 2009 14:46:34 +0000 (14:46 +0000)
will return all commands longer than 4s

git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@40 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/acct/lastcomm-duration.pl

index b3f7ea3..ed83a04 100755 (executable)
@@ -5,7 +5,7 @@ use strict;
 
 use YAML;
 
-my $too_long = 0.5; # s
+my $too_long = shift @ARGV || 0.5; # s
 my $stats;
 
 open(my $lastcomm, '-|', 'lastcomm');