Leser: 1
![]() |
|< 1 ... 4 5 6 7 8 9 10 ... 12 >| | ![]() |
119 Einträge, 12 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
a:
print ' ' x 2 . "$key" . ' ' x (30-length($key)) . "$value\n";
b:
pen FH, '<', $file or ...
c:
$alias->{DiskMajor} = $1;
$alias->{DiskMinor} = $2;
$alias->{DiskReadRequests} = $4;
$alias->{DiskReadBytes} = $6 * $block_size;
$alias->{DiskWriteRequests} = $8;
d:
(split /\s+/, <PRC>)[0..6,9..18,21..22,35..36,38];
print ' ' x 2, "$key", ' ' x (30-length($key)), "$value\n";
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
sub new {
my $pkg = shift;
my $self; { my %hash; $self = bless(\%hash, $pkg); }
# the options hash
my $options = {};
$self->{options} = $options;
# set default parameters in options hash
%$options = (
debug => 0,
stack_debug => 0,
timing => 0,
search_path_on_include => 0,
cache => 0,
blind_cache => 0,
file_cache => 0,
file_cache_dir => '',
file_cache_dir_mode => 0700,
cache_debug => 0,
shared_cache_debug => 0,
memory_debug => 0,
...
...
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- Statistics.pm.orig 2005-12-21 07:28:46.000000000 +0100
+++ Statistics.pm 2005-12-22 00:30:12.000000000 +0100
@@ -6,6 +6,8 @@
use Linux::Statistics;
+initStats;
+
$stats = getStats( SysInfo => 1,
ProcStats => 1,
MemStats => 1,
@@ -27,6 +29,10 @@
release number. To run this module it is necessary to start it as root or another user
with the authorization to read the /proc filesystem and the /etc/passwd file.
+Some of the statistics are deltas since the last time that the main function was called.
+Therefore it's needed to initialize some values at the beginning of the program. This
+can be done using the I<initStats> function.
+
![]() |
|< 1 ... 4 5 6 7 8 9 10 ... 12 >| | ![]() |
119 Einträge, 12 Seiten |